0

I am looking at coding a site to upload, convert and play videos. I can code php. I want to use ffmpeg on my server. My question is, do i need to install and use ffmpeg-php when using ffmpeg? Thanks.

1 Answers1

0

The FFmpeg PHP extension is only required if you want a native PHP API for doing FFmpeg work. It is entirely possible to execute the `ffmpeg binary directly like you would any other.

I recommend using proc_open() to execute a child process and get its output from all streams. http://php.net/manual/en/function.proc-open.php

Brad
  • 159,648
  • 54
  • 349
  • 530
  • ok tks I will get reading, so I can use standard php to upload a video file and convert it to other video types etc I can already do this ok but not the ffmpeg conversion – user3745738 Apr 10 '15 at 17:32
  • There is no native FFmpeg PHP extension. The classic "ffmpeg-php" is a dead, third party product. There may be other, more recent versions with the same or similar name too. – llogan Apr 10 '15 at 17:32
  • @LordNeckbeard Good to know, thanks! The last time I used it was ~10 years ago... I haven't kept on it. I always just execute FFmpeg directly, for flexibility. – Brad Apr 10 '15 at 18:43
  • Yeah, understandably the way it's named seems to cause some confusion (same goes for a particular FFmpeg fork and its already-being-used name choices). – llogan Apr 10 '15 at 18:47