Fixed bitrate on VideoWriter

This commit is contained in:
Alex Eidt 2021-12-02 10:44:42 -08:00
parent a5d84e72af
commit ff24be3154
2 changed files with 5 additions and 10 deletions

View file

@ -29,7 +29,7 @@ func NewVideo(filename string) *Video {
}
// Execute ffmpeg -i command to get video information.
cmd := exec.Command("ffmpeg", "-i", filename, "-")
// FFMPEG output piped to Stderr.
// ffmpeg output piped to Stderr.
pipe, err := cmd.StderrPipe()
if err != nil {
panic(err)
@ -47,7 +47,7 @@ func NewVideo(filename string) *Video {
}
}
cmd.Wait()
video := &Video{filename: filename, channels: 3, pipe: nil, framebuffer: nil}
video := &Video{filename: filename, channels: 3}
parseFFMPEGHeader(video, string(buffer))
return video
}