Tell me more ×
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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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