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

Charles Ulrich charles at bityard.net
Mon May 15 08:12:57 CEST 2006


Greetings,

This is my first foray into encoding. I have a Canon Powershot and
occasionally record a few movies with it, but the files that it
produces are huge. It saves them as a series of JPEG images (mjpeg)
with uncompressed PCM audio. Record more than a few seconds worth and
you end up with a file in the dozens of megabytes range. After hours
of googling and tinkering, I've almost found the best combination of
command-line options for transcoding these files. "Almost" meaning
"seems to be transcoded the way I want it, _except_ the audio is out
of sync (delayed) by about a half a second."

Here's the output of midentify on the file, for reference:
ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_CLIP_INFO_NAME0=Digitization\ Time
ID_CLIP_INFO_VALUE0=Sun\ Apr\ 23\ 11:51:02\ 2006
ID_CLIP_INFO_NAME1=Software
ID_CLIP_INFO_VALUE1=CanonMVI01
ID_CLIP_INFO_N=2
ID_FILENAME=LN2pool.avi
ID_DEMUXER=avi
ID_VIDEO_FORMAT=MJPG
ID_VIDEO_BITRATE=1739672
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=15.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=pcm
ID_AUDIO_FORMAT=1
ID_AUDIO_BITRATE=88192
ID_AUDIO_RATE=11024
ID_AUDIO_NCH=1
ID_LENGTH=95.00
ID_VIDEO_CODEC=ffmjpeg

The command line that I'm using is as follows (in two passes, "vpass"
is 1 on the first and 2 on the second, of course):

mencoder LN2pool.avi -o LN2pool_small.avi -oac mp3lame -ovc lavc
-srate 11025 -channels 1 -af-adv force=1 -lameopts preset=medium
-lavcopts vcodec=mpeg4:vbitrate=496:vpass=1

Now for the questions:

1) When encoding, I get many messages about "Skipping frame(s)!" Is
this good/bad/normal?

2) After the file is finished encoding, the following output is produced:

Video stream:  253.441 kbit/s  (31680 B/s)  size: 2914567 bytes
92.000 secs  1425 frames

Audio stream:   26.998 kbit/s  (3374 B/s)  size: 312252 bytes  92.526 secs

Notice that the audio stream is about 0.5 seconds longer than the
video stream. I'm assuming that this is the main cause of the problem,
but I've no idea how to overcome it. Suggestions?

3) The ID_AUDIO_RATE reported by midentify is 11024 whilst mencoder
fails with the error "Cannot set LAME options, check
bitrate/samplerate" if I set that on the commandline. Increment by one
and everything works fine. Could the 1Hz difference be causing the
problem? FWIW, encoded videos seem to be 0.5 seconds out of sync no
matter what the length of the video is.

Beaucoup thanks,
Charles
-- 
http://bityard.net




More information about the MEncoder-users mailing list