This commit is contained in:
Matt
2022-07-08 15:06:47 +10:00
committed by GitHub
4 changed files with 10 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
package encoders
import (
"fmt"
"image"
"io"
"os"
@@ -25,13 +26,12 @@ func (enc *VP8ImageEncoder) Init(videoFileName string) {
if !strings.HasSuffix(videoFileName, fileExt) {
videoFileName = videoFileName + fileExt
}
binary := "./ffmpeg"
cmd := exec.Command(binary,
cmd := exec.Command(enc.FFMpegBinPath,
"-f", "image2pipe",
"-vcodec", "ppm",
//"-r", strconv.Itoa(framerate),
"-vsync", "2",
"-r", "5",
"-r", fmt.Sprint(enc.Framerate),
"-probesize", "10000000",
"-an", //no audio
//"-vsync", "2",

View File

@@ -1,6 +1,7 @@
package encoders
import (
"fmt"
"image"
"io"
"os"
@@ -24,12 +25,11 @@ func (enc *DV9ImageEncoder) Init(videoFileName string) {
if !strings.HasSuffix(videoFileName, fileExt) {
videoFileName = videoFileName + fileExt
}
binary := "./ffmpeg"
cmd := exec.Command(binary,
cmd := exec.Command(enc.FFMpegBinPath,
"-f", "image2pipe",
"-vcodec", "ppm",
//"-r", strconv.Itoa(framerate),
"-r", "5",
"-r", fmt.Sprint(enc.Framerate),
//"-i", "pipe:0",
"-i", "-",
"-vcodec", "libvpx-vp9", //"libvpx",//"libvpx-vp9"//"libx264"

View File

@@ -2,6 +2,7 @@ package encoders
import (
"errors"
"fmt"
"image"
"io"
"os"
@@ -33,7 +34,7 @@ func (enc *HuffYuvImageEncoder) Init(videoFileName string) {
"-f", "image2pipe",
"-vcodec", "ppm",
//"-r", strconv.Itoa(framerate),
"-r", "12",
"-r", fmt.Sprint(enc.Framerate),
//"-re",
//"-i", "pipe:0",

View File

@@ -3,6 +3,7 @@ package encoders
import (
"errors"
"image"
"fmt"
"io"
"os"
"os/exec"
@@ -32,7 +33,7 @@ func (enc *QTRLEImageEncoder) Init(videoFileName string) {
"-f", "image2pipe",
"-vcodec", "ppm",
//"-r", strconv.Itoa(framerate),
"-r", "12",
"-r", fmt.Sprint(enc.Framerate),
//"-re",
//"-i", "pipe:0",