[MEncoder-users] amateur hour: reencoding a Canon Powershot movie

Charles Ulrich charles at bityard.net
Tue May 16 08:04:14 CEST 2006


On 5/15/06, Guillaume POIRIER <poirierg at gmail.com> wrote:
> I wouldn't suggest using lame during the encoding. I'd do smth similar to this:
>
> mencoder LN2pool.avi -o LN2pool_small.avi -oac copy -ovc lavc -srate
> 11025 -channels 1 -af-adv force=1 -lavcopts
> vcodec=mpeg4:vbitrate=496:vpass=1 -vf harddup
>
> mencoder LN2pool.avi -o LN2pool_small.avi -oac copy -ovc lavc -srate
> 11025 -channels 1 -af-adv force=1 -lavcopts
> vcodec=mpeg4:mbd=2:trell:vbitrate=496:vpass=2 -vf harddup
>
> then extract the audio as pcm, encode it with lame, and remux with:
>
> mencoder LN2pool_small.avi -audiofile audio.mp3 -oac copy -ovc copy -o
> LN2pool_small-remuxed.avi
>

Hey, that worked great! No skipped frames this time and the video is
the exact same length as the audio. Thanks a bunch for your help!

For reference (so that future googlers will find the solution), here's
the exact set of commands that I used to (re)encode the video from a
Canon Powershot:

# Video encoding passes

mencoder LN2pool.avi -o LN2pool_small.avi -oac copy -ovc lavc -srate
11025 -channels 1 -af-adv force=1 -lavcopts
vcodec=mpeg4:vbitrate=496:vpass=1 -vf harddup

mencoder LN2pool.avi -o LN2pool_small.avi -oac copy -ovc lavc -srate
11025 -channels 1 -af-adv force=1 -lavcopts
vcodec=mpeg4:vbitrate=496:vpass=2 -vf harddup

# Dump audio (as audiodump.wav)

mplayer -vo null -ao pcm LN2pool.avi

# Encode audio with LAME

lame -h -V 4 -r -s 11.025 --bitwidth 8 -m mono audiodump.wav audiodump.mp3

# Remux audio

mencoder LN2pool_small.avi -audiofile audiodump.mp3 -oac copy -ovc
copy -o LN2pool_small-remuxed.avi

I'll now have to replace this series of commands with a very small
shell script. The only downside that I've found so far is that windows
media player doesn't seem to like mpeg4, so I'll have to toy around
with a few different codecs. (And upon further tinkering, Quicktime on
OS X 10.4.5 doesn't seem to like, well, anything I throw at it.)

Charles
-- 
http://bityard.net




More information about the MEncoder-users mailing list