Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
2  
There is a great blog post about ffmpeg. Everything you need is in there (and more). blog.superuser.com/2012/02/24/… –  soandos Apr 4 '12 at 20:16
add comment

1 Answer

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
add comment

protected by slhck Dec 2 '13 at 8:02

Thank you for your interest in this question. Because it has attracted low-quality answers, 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.