Initial commit
This commit is contained in:
commit
059f46f9ed
10 changed files with 511 additions and 0 deletions
24
demo.go
Normal file
24
demo.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
// Try it yourself!
|
||||
// Update "filename" to a video file on your system and
|
||||
// create and output file you'd like to copy this video to.
|
||||
filename := "input.mp4"
|
||||
output := "output.mp4"
|
||||
video := NewVideo(filename)
|
||||
|
||||
fmt.Println(video.bitrate)
|
||||
|
||||
writer := NewVideoWriter(output, video)
|
||||
defer writer.Close()
|
||||
|
||||
count := 0
|
||||
for video.NextFrame() {
|
||||
writer.Write(video.framebuffer)
|
||||
count += 1
|
||||
fmt.Println(count)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue