views:

60

answers:

1

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?

+4  A: 

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

Evert
This is what I was going to suggest.
Derek Gathright