Updated on 2008-12-19

Yes, Apple is not close enough to OpenSource and portability as one might need/desire.

One of my collegues downloaded his video camera clips to his Apple iMac with Leopard, using probably iMovie (or iLife??) and produced a lot of MOV clips who he sent to me in a zip file.

When trying to open them under Windows, I couldn’t happen to view a single frame: I tried VLC, WMPlayer and, of course, QuickTime Player. No use.

I found anyway that:

  • The audio was hearable
  • The video had the codec fourcc name of: m2v1

I googled around and found that this must be an Apple codec encapsulation for MPEG2 videos.

So I tried to extract the raw streaming with MP4Box (using the GUI YAMB) and got a perfectly viewable mp2v streaming (.m2v).

That made me think: why the raw data is an m2v, but the fourccs are m2v1?!?!

Since I do not have time to investigate the MOV file format and, well, not knowledge at all, I tried the newbie method: search for m2v1 in the binary file with an hex editor.

Found 2 occurrencies: m2v1 and ‘m2v1′
The next obvious step was to try to change them to the real m2v fourccs: mp2v
Et voila! The mov played flawlessly in my VLC player (and others).

So I wanted to contribute and made a very skinny command line app for win that could change the fourccs for me.

Beware: this does not check for anything! Just changes up to two occurences of m2v1 to mp2v (anyware in the file).

Enjoy m2v1_to_mp2v ;-)


Update 2008-12-19

Yep, if you followed the comments, there’s another case where mp2v is not the right FourCC code, so I made an m2v1_to any FourCCs :)

m2v1_to FourCC

You must specify the fourcc destination code and you may add as many files as you like (also using jolly char): this enables you to run the tool on an entire directory with
m2v1_to -m2pv *.mov
Enjoy even more :-D

23 Responses to “Apple MOVs with codec m2v1 unreadable under Windows”

  1. Nobuo Okabe Says:

    Hi,

    Thank you for your interesting tool.

    It is just FYI.

    I patched a clip file with your tool.
    But, it can not be played with QuickTime
    on XP even though with MPEG2 plug-in.

    Sorry, I don’t have enough time for investigation.

    The long and winding load…..

    Thanks,

  2. Nobuo Okabe Says:

    FYI again.

    This issue may be well-known:

    http://discussions.apple.com/thread.jspa?messageID=7789424

    On Mac, MPEG2 plug-in cannot solve the issue:

    http://discussions.apple.com/thread.jspa?messageID=7988417

  3. MindSuburbian Says:

    Nobuo,
    I googled myself before posting this blog entry and I only found one single thread about the problem.
    Allow me to say that it doesn’t seem a really well-known problem ;-)

    Anyway I can’t test the tool myself with different files from Mac as I do not own a Mac (or Leopard Intel hacks).

    What I suggest, if you have time, is to search through your original file with a HEX editor for the string ‘m2v2′ and see if it falls in the case presented here or not (it may well be that it’s another format, e.g. some DV or DivX).

  4. JP Says:

    Your conversion tool is a lifesaver!! Thanks a million! It works great!

  5. JP Says:

    Hi… I’m the same JP as above. I’m having a problem with a few of my files. They are about 2.2 gigs or more, and the converter won’t even look at them. It immediately goes to “Parsing Done!” Any idea why?
    Thanks for your help! :)

  6. MindSuburbian Says:

    Hi JP!
    The tool should be fine up to 4Gb as it uses long ints for file seeking, but I never tested it with such files ;-)
    Try to discover the FourCC code opening it with a player (e.g. with Media Player, VLC…) and displaying properties.
    If it says the video codec is m2v1, then the tool has some problems :-P , if not, well it’s another format (see comments above), and I can’t fix the problem, at least not without knowing the FourCC code (and a sample would also be better)

  7. MindSuburbia » Blog Archive » Some JPG files cannot be open (JPEG8BIM and Adobe on Mac) Says:

    [...] they did it again! Well I don’t really know exactly how come this happened: someone sais it’s because of [...]

  8. Pierre Says:

    Congrats man !

    thanks for your usefull tool !

  9. arsix Says:

    excellent tool, thanks a lot!

  10. Filios Says:

    I have the same problem!
    Got some videos from a mac and just have the sound no picture.
    I read your instructions but have not managed to succeed.
    Can you please explain in more details what i should be doing?

  11. MindSuburbian Says:

    Well, the simplest you can do is:
    - unpack the tool in the same folder of your videos
    - run m2v1_to_mp2v filename.mov
    And you’re done.
    I’ll leave you an email for further info, but unfortunately there will be no official support for it (no time, sorry ;-) ).

  12. Filios Says:

    Unfortunately i haven’t managed to work it out!
    If anyone can give more details on this problem.

  13. MindSuburbian Says:

    Hi Filios, I’ll be glad to be of help, but you’ll have to write me your problem in details.
    Have you tried the tool? Errors? Results?

  14. Filios Says:

    Thanks for replying so soon. I went for holidays and have 20 gb of videos that a photographer took and i got them from his mac. I hope you can help me out.

    What i have done till now:
    1) I got the video and named it m2v1_to_mp2v 1.mov and the executive m2v1_to_mp2v.exe and it doesn’t work.
    2) I downloaded the XV132 and inserted a file in there. A huge code appears and when i search for m2v1 i get 0 results.
    3) I downloaded a program called yamb and i tried to change the format of the video. A friend managed to get the video without sound :( then he managed to get the video with sound in some way but it took like 10 minutes for 1 video of 40 seconds. I am not sure what he did though.
    4) I know took the video and dropped it onto the m2v1_to_mp2v.exe and i get a pop up window for 2 seconds and at the end it says parsing…?????
    5) When i insert a video in vlcplayer i get this notice:
    No suitable decoder module:
    VLC does not support the audio or video format “m2v1″. Unfortunately there is no way for you to fix this.

    I am sure there must be another way that you can help me with.

  15. MindSuburbian Says:

    Well, that’s a start :)
    The tool on this page only checks for m2v1 fourcc code. It appears that your videos are a little bit different.
    If you open the file in XVI32, and search for ‘Apple’ (without quotes), you’ll probably end up near the tail of the file.
    I have the text “Apple Video Media Handler”, then some unreadable stuff, then “stsd” and after another bunch of unreadable chars, “m2v1″, then again “m2v1″ after very little chars.

    The best you could do is to send me a very small video for me to examine. But if that is not possible, please send me via email (I wrote you an email yesterday: did you get it?) either a screenshot of XVI32 with the piece of file near “Apple”, or cut the interested part of the file with the commands “Delete to cursor” and “Delete from cursor”.
    Be sure to save to a *different* file name!! We don’t want to lose a video!

  16. Filios Says:

    Send me your email please…

  17. MindSuburbian Says:

    Filios,
    I got your email with the clip sample and replied.
    I’m writing here in case somebody else needed it.

    It seems your clip has some different formats in it (expecially in the audio), but still I could find two occurences of “m2v1″.
    So I ran the tool on the clip: it is still not played correctly neither by Quicktime Player, nor by Windows Media Plaer, but when I tried with VLC (Video Lan Client) I could watch the video! (it’s a couple of seconds clip of a windsurfer).

    So I suggest to everyone in trouble, to first try VLC if find problems, after running the tool.

  18. Andy Says:

    I found this idea and tool by google-ing incessantly on this weird Apple m2v1 format. I have gigs of home movie taken from a camera through iMovie and I want to play the raw clips through XBMC (clips are cataloged in iMovie). XBMC uses MPlayer and the m2v1 format obviously is not compatible. However, it doesn’t like mp2v either :-( Using a hex editor I changed the string to mpg2 and it works great (in XBMC/MPlayer). Am wondering if you could either share the source code ;-) *or* make a change that would allow the tool to accept the destination FourCC string, e.g.,

    m2v1_to_mp2v.exe -fourcc mpg2 mymovie.mov

    You may want to change the tools name!

    Thanks for a great find and (in advance) for some consideration in my request.

    -Andy

  19. MindSuburbian Says:

    Andy,
    I’ll be glad to be of help: let me one or two days to make the changes.
    If I have spare time problems or other issues, I’ll be happy to share the source code

    I assume you can do the tool testing, when ready… ;-)

  20. Andy Says:

    Awsome! Thanks! Ready to test…

  21. Michela Ledwidge Says:

    Thanks for that. Worked for me.

  22. Andy Says:

    Thanks for making the changes. Works great!

  23. Bill Says:

    OMG!! THANKS!!! I spent hours I mean relentless hours trying to find an answer to fix my problem. THIS DID IT!!! Your the best thank you so much.

Leave a Reply