mirror of
https://github.com/amitbet/vnc2video.git
synced 2025-09-04 14:24:41 +00:00
Merge 1ac941ed96
into 9d50b9dab1
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package encoders
|
package encoders
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"image"
|
"image"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -25,13 +26,12 @@ func (enc *VP8ImageEncoder) Init(videoFileName string) {
|
|||||||
if !strings.HasSuffix(videoFileName, fileExt) {
|
if !strings.HasSuffix(videoFileName, fileExt) {
|
||||||
videoFileName = videoFileName + fileExt
|
videoFileName = videoFileName + fileExt
|
||||||
}
|
}
|
||||||
binary := "./ffmpeg"
|
cmd := exec.Command(enc.FFMpegBinPath,
|
||||||
cmd := exec.Command(binary,
|
|
||||||
"-f", "image2pipe",
|
"-f", "image2pipe",
|
||||||
"-vcodec", "ppm",
|
"-vcodec", "ppm",
|
||||||
//"-r", strconv.Itoa(framerate),
|
//"-r", strconv.Itoa(framerate),
|
||||||
"-vsync", "2",
|
"-vsync", "2",
|
||||||
"-r", "5",
|
"-r", fmt.Sprint(enc.Framerate),
|
||||||
"-probesize", "10000000",
|
"-probesize", "10000000",
|
||||||
"-an", //no audio
|
"-an", //no audio
|
||||||
//"-vsync", "2",
|
//"-vsync", "2",
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package encoders
|
package encoders
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"image"
|
"image"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -24,12 +25,11 @@ func (enc *DV9ImageEncoder) Init(videoFileName string) {
|
|||||||
if !strings.HasSuffix(videoFileName, fileExt) {
|
if !strings.HasSuffix(videoFileName, fileExt) {
|
||||||
videoFileName = videoFileName + fileExt
|
videoFileName = videoFileName + fileExt
|
||||||
}
|
}
|
||||||
binary := "./ffmpeg"
|
cmd := exec.Command(enc.FFMpegBinPath,
|
||||||
cmd := exec.Command(binary,
|
|
||||||
"-f", "image2pipe",
|
"-f", "image2pipe",
|
||||||
"-vcodec", "ppm",
|
"-vcodec", "ppm",
|
||||||
//"-r", strconv.Itoa(framerate),
|
//"-r", strconv.Itoa(framerate),
|
||||||
"-r", "5",
|
"-r", fmt.Sprint(enc.Framerate),
|
||||||
//"-i", "pipe:0",
|
//"-i", "pipe:0",
|
||||||
"-i", "-",
|
"-i", "-",
|
||||||
"-vcodec", "libvpx-vp9", //"libvpx",//"libvpx-vp9"//"libx264"
|
"-vcodec", "libvpx-vp9", //"libvpx",//"libvpx-vp9"//"libx264"
|
||||||
|
@@ -2,6 +2,7 @@ package encoders
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"image"
|
"image"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -33,7 +34,7 @@ func (enc *HuffYuvImageEncoder) Init(videoFileName string) {
|
|||||||
"-f", "image2pipe",
|
"-f", "image2pipe",
|
||||||
"-vcodec", "ppm",
|
"-vcodec", "ppm",
|
||||||
//"-r", strconv.Itoa(framerate),
|
//"-r", strconv.Itoa(framerate),
|
||||||
"-r", "12",
|
"-r", fmt.Sprint(enc.Framerate),
|
||||||
|
|
||||||
//"-re",
|
//"-re",
|
||||||
//"-i", "pipe:0",
|
//"-i", "pipe:0",
|
||||||
|
@@ -3,6 +3,7 @@ package encoders
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"image"
|
"image"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
@@ -32,7 +33,7 @@ func (enc *QTRLEImageEncoder) Init(videoFileName string) {
|
|||||||
"-f", "image2pipe",
|
"-f", "image2pipe",
|
||||||
"-vcodec", "ppm",
|
"-vcodec", "ppm",
|
||||||
//"-r", strconv.Itoa(framerate),
|
//"-r", strconv.Itoa(framerate),
|
||||||
"-r", "12",
|
"-r", fmt.Sprint(enc.Framerate),
|
||||||
|
|
||||||
//"-re",
|
//"-re",
|
||||||
//"-i", "pipe:0",
|
//"-i", "pipe:0",
|
||||||
|
Reference in New Issue
Block a user