Hello, I'm trying to run this command in godot 4:
ffmpeg -v error -i "/home/komi/Videos/meteor-fall.mp4" -map 0:1 -f null - 2> /tmp/result.log
This command worked if I ran them from terminal.
I tried this:
func _ready():
#ffmpeg -v error -i "/home/komi/Videos/meteor-fall.mp4" -map 0:1 -f null - 2> /tmp/result.log
var output = []
var arguments = ["-v","error","-i","/home/komi/Videos/meteor-fall.mp4","-map","0:1","-f","null","-","2>","/tmp/result.log"]
var err = OS.execute("ffmpeg",arguments,output)
printt(err,output)
But this doesn't work,
it prints 234 [""]
, and the file that is supposed to be in /tmp/result.log
is not there. Unlike when calling it from terminal.
How would I ran command I mentioned above using OS.execute?
note, using arguments = ["-version"]
gives correct output.
using var arguments = ["-v error -i '/home/komi/Videos/meteor-fall.mp4' -map 0:1 -f null - 2> /tmp/result.log"]
also didn't work.
using /usr/bin/ffmpeg
as path doesn't work either.