Setting the widescreen flag on a (huge) .m2v file

If you have a video file that is 16:9 stretched into 4:3, but the “widescreen” flag isn’t set, and you either don’t have access to the source material for reexporting, or you don’t want to because of time or other logistics, you can edit the video file and set the flag manually.

Short answer: use a hex editor and change

00 00 01 B3 2D 01 E0 24

in line 0 to

00 00 01 B3 2D 01 E0 34

I tried using 2 hex editors for OS X, HexEditor and HexEdit. Neither of them worked, I’m not sure why. HexEdit seemed to not like huge files, and I couldn’t get HexEditor to modify any file (a shame, too, the interface is really nice).

Long answer (if you don’t have a working hex editor, or if the one you have can’t handle a huge file):

  1. You are going to be creating several different types of files, and a lot of them, so to keep things neat, first put your movie into its own directory.
  2. Create a hex “rendering” of your video file like this: xdd myfile.m2v myfile.m2v.hex
  3. That is still a huge file. Chop it up into a bunch of 100 meg files like this: split -b100m myfile.m2v.hex (this will take a long time).
  4. Now you see many files name with 3 characters, starting with xaa. Edit this first file with your favorite text editor, such as emacs: emacs xaa
  5. Change

    00 00 01 B3 2D 01 E0 24

    in line 0 to

    00 00 01 B3 2D 01 E0 34

    Save the file and exit out of your text editor.

  6. Next we will stick all the pieces back together. To make this easy, move everything we don’t need anymore out of the directory. This includes: myfile.m2v, myfile.m2v.hex, and other files that your text editor might have created (such as xaa~ in the case of emacs).
  7. Run this command to stick all the pieces back together: cat * > myfile_widescreen.m2v.hex(this will take a long time)
  8. Run this command to convert it from hex back into its original format: xxd -r myfile_widescreen.m2v.hex myfile_widescreen.m2v (this will take a long time)

Ta da! Even if you did have the option of reexporting, this probably took less time.

Note: this worked perfectly when viewing the movie in VLC, but didn’t seem to work for DVD Studio Pro. I am a complete DVD Studio Pro newbie though. Investigating…

update: i haven’t tried it out yet, but this is probably a little easier: The Anamorphiciser.

0 Responses to “Setting the widescreen flag on a (huge) .m2v file”


  1. No Comments

Leave a Reply




Close
Powered by ShareThis