1

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?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
adrianTNT
  • 1,077
  • 6
  • 22
  • 43

1 Answers1

1

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.

becomingwisest
  • 3,328
  • 20
  • 18
  • 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 00:46