Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get info from a file with ffmpeg, if inside php I have this code:

exec("ffmpeg -i ffmpeg_directory/4.flv");

Returns nothing, even tough same command inside SSH would print a large list of file info (fps, duration, etc).

But this command converts the file properly, so I am thinking it is no permission problem:

exec("ffmpeg -i ffmpeg_directory/4.flv ffmpeg_directory/4.avi");

It is the same for system() function too. Any idea why that -i command would not return anything?

share|improve this question

closed as off topic by freiheit, sysadmin1138 Jan 18 '12 at 0:23

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

If you run ffmpeg -i ffmpeg_directory/4.flv 2> /dev/null from the command line and get output, I don't know the answer. If it becomes blank, then I would say that when you specify an input file, but no output file, it is printing the output to standard error.

share|improve this answer
    
Yes, I think it WAS related to the output being an ERROR, I was able to do it by: system("ffmpeg -i ffmpeg_directory/4.flv 2>&1"); –  adrianTNT Jan 18 '12 at 0:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.