Now I expected this to be hard. Or at least take a lot of fiddling to get right. However, it seems to be quite easy. This site has all the goodness. It requires three steps. Now assume we have a file called
movie.mpeg and we want to convert it to
movie.3GP. The steps required would be
mencoder movie.mpeg -nosound -ovc lavc \
-lavcopts vcodec=mpeg4 \
-vop expand=176:144,scale=176:-2 \
-o movie.avi -ofps 12
This will extract the video, scale it and reduce the frame rate. Now we need to extract the sound.
mplayer -vo null -ao pcm -af \
An output file called
audiodump.wav will be created that has the audio that we require. Finally we need to combine these two files together.
ffmpeg -i movie.avi -i audiodump.wav \
-b 48 -ac 1 -ab 12 -map 0.0 -map 1.0 movie.3GP
And that is that. I suppose I should add this to the HantsLUG wiki. Next I need to bundle this lot up into a script so I can then forget all about how this works 🙂