How can I convert an m4v video to a widely viewable format using ffmpeg?

4

I have a m4v video generated by iMovie. I want to use ffmpeg to generate a widely viewable video on Windows. I cannot assume that the viewer will have VLC (or any other sophisticated viewer). It needs to be viewed by what is a default installation of Windows 7.

How do I do this? I tried ffmpeg -i video.m4v video.avi, and that did not directly work for my users. They say they get audio, but no video.

carlosdc

Posted 2012-08-15T19:15:43.140

Reputation: 328

1When you say "widely viewable video" do you mean in a codec that Windows natively supports? My understanding is that if the m4v file doesn't have DRM (which yours won't) then you can rename it to .mp4 and it'll play happily on many platforms. – Richard – 2013-12-02T10:59:48.100

Answers

3

Try the following command:

ffmpeg -i video.m4v -c:v libx264 -pix_fmt yuv420p -c:a aac -strict experimental \
-movflags +faststart video.mp4

But note, that this will re-encode your video file.

Nikita Krupenko

Posted 2012-08-15T19:15:43.140

Reputation: 424

1+1. As my mac did not accept h264, I did: ffmpeg -i in.m4v -strict experimental -acodec aac -vcodec libx264 out.avi, hopefully it is the same – carlosdc – 2012-08-15T19:43:33.870