[MEncoder-users] Sound problem when transcoding and joining 2 mpg-files

Jan Ehrhardt phpdev at ehrhardt.nl
Thu Sep 20 17:36:27 CEST 2012


I have sound problems while transcoding and joining 2 MPG-files.

Sources:
http://x32.elijst.nl/M2U00001.MPG (10MB)
http://x32.elijst.nl/M2U00002.MPG (25MB)
Unedited files from a Sony CX160 camcorder with standard quality.

Commandline:
mencoder -mc 1 -vf scale=448:256 -aspect 16:9 -sws 2
	-of lavf -lavfopts format=asf
	-ovc lavc -lavcopts vcodec=wmv2:vbitrate=336
	-oac lavc -lavcopts acodec=wmav2:abitrate=64
	-af volnorm
	-o joined-by-mencoder.wmv M2U00001.MPG M2U00002.MPG

Output:
http://x32.elijst.nl/joined-by-mencoder.wmv
As you can hear the sound in the second part (after 25 seconds) is
mangled.

Tested with:
mencoder r35200 (compiled by me in Windows 7)
mencoder r35203 (SB35) by Subjunk
mencoder r35204 (compiled by me in and for Ubuntu

The same commandline with MEncoder Sherpya-SVN-r33883-4.2.5 works fine.
http://x32.elijst.nl/joined-by-old-mencoder.wmv
OK as well with a MEncoder SVN-r33986 compiled by myself for Windows.

With a recent ffmpeg this works also fine:
ffmpeg -i concat:"M2U00001.MPG|M2U00002.MPG" -vf scale=448:256
	-aspect 16:9 -sws_flags bicubic -vcodec wmv2 -b:v 336k
	-acodec wmav2 -ab 64k -y joined-by-ffmpeg.wmv
http://x32.elijst.nl/joined-by-ffmpeg.wmv

Possible solutions:
1. Stick with the old mencoder (< r34000). No fancy idea.
2. Switch to FFMpeg. Real disadvantage: I lose the volnorm filter.
3. Transcode the files separately and knit them together with
   ASFbin.exe.
4. Fixing the bug. By whom?

Solution 3 is what I am using now. In a followup I will tell you this
also fails in some cases with recent MEncoders.

Moreover: ASFbin works for knitting WMV-files, FLVbind for knitting
FLV-files and MP4box for knitting MP4-files. But MP4box is terribly slow
when working on SD cards (it takes much longer than a transcode) and our
project requires that the sensitive videos do not use HD-space (not even
for temporary files). We want to switch to MP4 (x264/aac), which will
break solution 3. I will file an issue concerning MP4Box at the GPac
developers, but for the moment only sticking with the old MEncoder is
left open after we switch to MP4-files.

Obvious question: does anyone know what recent MEncoders are doing wrong
and how to fix it?

Jan



More information about the MEncoder-users mailing list