Possible Duplicates:
How to convert wmv to mp4?
Suggest ffmpeg tweaks for converting from WMV to FLV?

I've installed ffmpeg through MacPorts using the following Terminal command:

$ sudo port install ffmpeg

After this is done I can use ffmpeg to convert videos, which works well for the non-WMV video files I've tried:

$ ffmpeg file1.mov file2.mpg

However, when I try the same command with a WMV file, I get an error:

$ ffmpeg file1.mov file2.mpg
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    1. 4. 0 /  1. 4. 0
  libswscale     1. 7. 1 /  1. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Jan 15 2010 13:26:39, gcc: 4.2.1 (Apple Inc. build 5646)
  WindowsMedia.wmv: Unknown format

This leads me to think that there must be some missing codec in the Mac port of ffmpeg or some option I've neglected to enable. I must admit that I am not an ffmpeg guru and really I don't know what prevents me from converting the WMV file this way. From what I've read the ffmpeg project is supposed to support WMV files.

Any help is appreciated.


marked as duplicate by alex, random, BinaryMisfit Jan 16 '10 at 12:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Have you considered trying Handbrake (handbrake.fr/details.php). It's a bit easier to use and it's highly regarded. It's also free, open-source and cross-platform. – alex Jan 16 '10 at 7:13
  • Handbrake does not support WMV decoding/encoding, right? Anyway, as I said in the comments below it was my source file that was corrupted, preventing ffmpeg from doing anything with it. Shame on me for not checking this first. Thanks for your time! – Form Jan 16 '10 at 14:58

I'm running 10.6.2 with the exact ffmpeg (installed using MacPorts) and I can convert wmv to mpg using ffmpeg -i file1.wmv file2.mpg. My complete output for a random WMV file I found on my Boot Camp partition is at pastebin but here's the main part:

Input #0, asf, from 'SportsMainBackground.wmv':
  Duration: 00:00:13.97, start: 3.065000, bitrate: 3135 kb/s
    Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 48 kb/s
    Stream #0.1: Video: wmv3, yuv420p, 720x480, 8000 kb/s, PAR 6:5 DAR 9:5, 29.97 tbr, 1k tbn, 1k tbc
File 'test.mpg' already exists. Overwrite ? [y/N] y
Output #0, mpeg, to 'test.mpg':
    Stream #0.0: Video: mpeg1video, yuv420p, 720x480 [PAR 6:5 DAR 9:5], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
    Stream #0.1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame=  510 fps=161 q=31.0 Lsize=    1020kB time=16.98 bitrate= 492.0kbits/s    
video:877kB audio:133kB global headers:0kB muxing overhead 0.917210%

Just thought of something. What is the output of ffmpeg -formats | grep wmv? On my system, I get:

 DEVSD  wmv1            Windows Media Video 7
 DEVSD  wmv2            Windows Media Video 8
 D V    wmv3            Windows Media Video 9
  • Oh god. Shame on me for not trying more files before posting my question; turns out my files were corrupted. I did what you suggested and indeed I have the Windows Media Video codecs installed. It works now. Thanks for your time. – Form Jan 16 '10 at 14:55

flip4mac might be what you're looking for.

  • 1
    flip4mac is good, but ffmpeg is free, open source and I prefer a CLI than a GUI for this particular task. Thanks for the suggestion though! – Form Jan 16 '10 at 14:18

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