Commit 5175f36d authored by Markus Seidl's avatar Markus Seidl

Found settings that work, unfortunately go is removing arguments

parent fb44ea32
......@@ -7,7 +7,7 @@ import (
"os/exec"
)
const ffmpegLocation = "/usr/bin/ffmpeg"
const ffmpegLocation = "./ffmpeg.sh"
func Convert(infile *os.File) (outfile *os.File) {
_ = infile.Sync() // make sure everything is on disk
......@@ -17,15 +17,10 @@ func Convert(infile *os.File) (outfile *os.File) {
outfile, _ = ioutil.TempFile("", "ffmpeg")
var args []string
args := []string{infile.Name(), outfile.Name(), "test"}
// ffmpeg -loop 1 -i koala.png -c:v libx264 -t 5 -pix_fmt yuv420p -vf scale=1920:1080 out.mp4
args = append(args, "-loop 1", "-i",
infile.Name(),
// "-y", "-c:v", "libx264", "-f", "mp4", "-t", "5", "-pix_fmt", "yuv420p", "-vf", "scale=460:574", "-b:v", "50K", "-profile:v", "main",
"-y", "-vcodec", "h264_omx", "-f", "mp4", "-t", "5",
outfile.Name(),
)
// args = append(args, infile.Name(), outfile.Name(), "test")
app := ffmpegLocation
cmd := &exec.Cmd{
......
#!/bin/bash -xe
echo $0
echo $1
echo $2
/usr/bin/ffmpeg -loop 1 -i $1 -y -vcodec libx264 -profile:v main -preset veryfast -crf 18 -b-pyramid none -t 20 -pix_fmt yuv420p -f h264 -vf scale=1024:768 $2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment