Convert QuickTime .mov file to mpeg

⇠ Back to Blog:Hacks

Movies downloaded from a mac bearing the .mov extension may fail to reproduce the video on other platforms (linux, windows, etc.), although the sound would still be played correctly. Most linux players will content to play the audio on a black screen. Xine complains about an unknown 'm2v1' codec. That's this hint which brought me to Carlos Aranda's blog (un bruto con Debian, in Spanish).

In his blog entry Pseudo codec de Apple video/x-gst-fourcc m2v1, Carlos found the solution, which simplicity equals the magnitude of Apple's wrongdoings:

Simply replace the two occurrences of the string 'm2v1' in the file by 'mpeg', and this works.

Along with the solution we have to reproduce the original comments on this appalling practice:

Me parece muy triste que los de Apple se tengan que asegurar de esclavizar a sus usuarios usando un codec privativo compatible con un "estándar". (en)

Magnanimous, the author concludes "pero son cosas del software privativo" (en), which is true, but my personal belief is that the scorn and contempt this elicits should prevail and far from conceding to whatever ugly cheap tricks they find in the boundaries of their own business to indeed enslave and chain people, we should condemn this sabotaging.

The following line allows to convert .mov files according to this trick.

for f in *; do perl -i.bak -pe 's/m2v1/mpeg/g' "$f"; done