[MPlayer-users] AC3 stream reordered on encode

Giacomo Comes comes at naic.edu
Fri Oct 21 18:38:41 CEST 2005


On Fri, Oct 21, 2005 at 05:06:15PM +0930, n0dalus wrote:
> I am using the following command to generate an mpeg2 file:
> nice -n 10 mencoder -of mpeg -vf expand=720:404,scale=720:576,harddup
> -oac lavc -ovc lavc -lavcopts
> acodec=ac3:abitrate=448:vcodec=mpeg2video:keyint=25:vbitrate=9500000:aspect=16/9:trell:mbd=2:vrc_maxrate=9600:vrc_buf_size=1835:vpass=1
> -mpegopts format=dvd -srate 48000 -speed 41708/40000 -ofps 25 -o
> video.mpg -channels 6 video.avi
> 
> The source sound is 5.1 ac3, and with '-channels 6' the output sound
> is also 5.1 ac3, but either mplayer or mencoder is getting the
> channels around the wrong way.
> The original video.avi has channel order:
> 0 front left
> 1 front right
> 2 rear left
> 3 rear right
> 4 centre
> 5 lfe
> 
> Which is the standard AC3 5.1 order.
> 
> The encoded video.mpg appears to have channel order:
> 0 front
> 1 rear
> 2 rear
> 3 centre
> 4 front
> 5 lfe

To be more accurate what you have is:

0 front left
1 rear left
2 rear right
3 centre
4 front right
5 lfe

Probably nobody has noticed the bug because nobody will
reencode an ac3 5.1 stream to an ac3 5.1 stream with libavcodec.

> Is there something I can do to fix this? I can't hear the difference

add -af channels=6:6:0:0:4:1:1:2:2:3:3:4:5:5 to you command line.

Giacomo

> between the left/right channels but I know parts of the video where
> the rear channels are different and that's what I listen for. I know I
> could use -af channels to reorder them if I knew which ones were in
> the wrong place, but I would rather mencoder/mplayer just do it right
> in the first place (unles I've done something wrong?).
> 
> Any help would be appreciated.
> 
> n0dalus.
> 
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users

-- 




More information about the MPlayer-users mailing list