Quantcast
Viewing all articles
Browse latest Browse all 10

ffmpeg fails inside PHP exec(); [closed]

Image may be NSFW.
Clik here to view.
Question

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?

Image may be NSFW.
Clik here to view.
Answer

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.


Viewing all articles
Browse latest Browse all 10

Trending Articles