[MEncoder-users] rotate an MP4 by 90 degrees

Daniel Kirsten Daniel.Kirsten at gmx.net
Thu Dec 11 13:14:31 CET 2008


Hi, 

what is the best solution to rotate an MP4 by 90 degrees
(without loss of quality)?    I know gmplayer can rotate the 
MP4,  but  I want to have a rotated file.

Is there something like jpegtran for MP4?

I worked out the following solution:

I decoded the MP4 file as follows: 

mplayer -vo jpeg:quality=100 -ao pcm:fast  example.MP4

Then, I used a shell script to rotate all jpegs in the directory  
(using    jpegtran  -rotate 270 ).  Then, I tried to make a movie from 
the jpegs and audiodump.wav. 

I tried
mencoder "mf://*.jpg" -audiofile audiodump.wav -mf fps=30 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4 -oac copy
It worked quite good, but the file became 20% larger than the original file.

I also tried 
mencoder "mf://*.jpg" -audiofile audiodump.wav -mf fps=30 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc
The file became 50% smaller than the original file, but there is a small problem:
When I play the file in gmplayer it works. However, when I click on the progress bar to see the middle of the 
movy, then I see the middle of the movie but the sound starts from the beginning. 

Best regards, Daniel



More information about the MEncoder-users mailing list