Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to convert FLV files to M4V files. What is the exec (PHP) Linux code for this conversion?

share|improve this question
There is a great blog post about ffmpeg. Everything you need is in there (and more).… – soandos Apr 4 '12 at 20:16

In the most simple case:

ffmpeg -i input.flv -an -c:v copy output.m4v

This will copy the raw video stream, discard audio, and change the container.

Just wrap this in your PHP exec line as you need it. For example:

<? exec("ffmpeg -y -i $infile -an -c:v copy $outfile"); ?>

Don't forget to update FFmpeg to the latest version depending on your operating system. And, as @soandos mentioned, check out my blog post on that subject: FFmpeg: The ultimate Video and Audio Manipulation Tool - Super User Blog

share|improve this answer

protected by slhck Dec 2 '13 at 8:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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