[MEncoder-users] Adjusting audio in and concatenating MPEG1 files
Joe Emenaker
joe at emenaker.com
Thu Mar 13 03:01:48 CET 2008
I've got a bunch of MPEG1 (fairly close to VCD format) files that I'm
trying to put on my iPod.
I'd use mencoder to do this, but the one that comes with Debian has some
critical piece missing (I think it's AAC missing from ffmpeg, but I
don't remember exactly). So, I decided to do the conversion with Nero
Recode... which ain't so bad because it does auto-cropping, interlace
detection, and makes a pretty good estimation of how good the source
quality is so that it doesn't try to waste space with an unnecessarily
high bitrate.
The *problem* I'm having is that I want concatenate several of the files
and also normalize the audio. So, I tried
mencoder -af volnorm=1 -oac mp3lame -lameopts abr:br=160 -ovc copy
-mpegopts format=dvd:tsaf -of mpeg -o "$base.mpg" $sources
(the "dvd:tsaf" is a hold-over from when I was trying to concatenate
several dvd titles together into one and was getting muxer underflow or
overflow errors)
Anyway, this was giving me some weird video artifacting which (due to my
previous hassles with "dvd:tsaf") I figured was something the muxer
didn't like about the new size of the audio, so I decided to just spend
the extra CPU and have mencoder process everything...
mencoder -af volnorm=1 -oac mp3lame -ovc lavc -lameopts abr:br=160
-of avi -lavcopts vbitrate=800:vcodec=mpeg4 -o "$base.avi" $sources
but this is giving me lipsync problems. And the sync seems to be present
early on even in the video that came from the first source file in the
sequence. (In other words, if I were joining a bunch of 5-minute videos,
the sync happens well before the 5-minute point where the next video
would kick in).
Here are the vitals of the source material:
ID_VIDEO_ID=0
ID_AUDIO_ID=0
MPEG-PS file format detected.
VIDEO: MPEG1 352x240 (aspect 12) 29.970 fps 1319.2 kbps (164.9 kbyte/s)
ID_FILENAME=K_0100.MPG
ID_DEMUXER=mpegps
ID_VIDEO_FORMAT=0x10000001
ID_VIDEO_BITRATE=1319200
ID_VIDEO_WIDTH=352
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=363.46
Any guru's want to give me the magic incantation to normalize/join them
without introducing lipsync?
- Joe
More information about the MEncoder-users
mailing list