[MPlayer-users] Re: Again on 5.1 vorbis encoding

Rémi Guyomarch rguyom at pobox.com
Sun Jan 5 22:12:19 CET 2003


On Sun, Jan 05, 2003 at 09:24:31PM +0100, Alessio Sangalli wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> I've read the relevant topics on the mailing list archives, and I think 
> the conclusion is that there are problems to playback a ogg file with 
> vorbis 5.1 audio if you use an external digital amplifier.
> 
> That's because you have a vorbis 5.1 stream and the amplifier only 
> understands ac3 audio. Mplayer can't (yet!?) convert realtime from 
> vorbis to ac3.
> 
> However, if the sound card already have the 5.1 outputs directly driven 
> (as many nowadays do, I have such an audio device integrated on the 
> motherboard) there should be no problems. Even in the cased you only 
> have stero speakers Mplayer should be able to downmix the 5.1 vorbis 
> audio (am I correct?).

It does. Life isn't beautiful ? :)

> Now what I ask is: understanding all the problems and limits of this 
> approach, how can I extract the 5.1 audio from a DVD title and encode it 
> into a vorbis file?

You must be aware that AFAIK channel coupling is only for stereo
mode. The Vorbis encoder doesn't know anything about 5.1, this means
even if you can encode 6 channels into an Vorbis stream, this won't
get you much and will probably be way less efficient than with AC3.
And now there's also the problem of channel mapping : who will decide
which Vorbis channel will go where ?

That said, if you want to experiment, try something like that :

rm -f audiodump.pcm ; mkfifo -m 600 audiodump.pcm
mplayer -quiet -vc null -vo null -channels 6 -noframedrop -aid 128 -ao pcm -nowaveheader $1 &
oggenc --raw --raw-bits=16 --raw-chan=6 --raw-rate=48000 -q 2 -o audio6-en.ogg audiodump.pcm &
wait

mplayer -quiet -vc null -vo null -channels 2 -noframedrop -aid 129 -ao pcm -nowaveheader $1 &
oggenc --raw --raw-bits=16 --raw-chan=2 --raw-rate=48000 -q 1 -o audio2-it.ogg audiodump.pcm &
wait
rm -f audiodump.pcm

(this assume -aid 128 is the 5.1 english track and -aid 129 is the 2.0
italian track)

> Will I be able to merge multiple audio streams in an OGM file? (for 
> example, english and german audio tracks) What if I merge 5.1 AND stereo 
> streams all together? (sometimes the english sound track is 5.1 and the 
> italian one is only stereo)

Why not ? ;)

-- 
Rémi



More information about the MPlayer-users mailing list