Question

I have a script calling a command to run an ffmpeg conversion on an uploaded video. It works only at random times however. Sometimes the form will finish submitting and the ffmpeg process will be running; at other times, the ffmpeg command fails to run at all. Here is the command that I'm running in an exec() function:

ffmpeg -i  "uploaded_file -b 450k  "converted_file" >/dev/null 2>&1 &

Can anyone explain why this will only work on certain tries and not on others?

Was it helpful?

Solution

What if ffmpeg fails and throws and error? Right now you're sending all output to /dev/null so you'll never know.

Change >/dev/null into >>/tmp/ffmpeglog to keep a log

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top