This is letter is related to python code of freevo. (to save less python interested readers the trouble ;) )

Since I now have a soundcard with 6 channel output through analog outputs, I've been medling with getting 2 channel stereo signals with Dolby Surround encoding (like most tv-shows in my region) to play correctly.

First I setup Xine which I use for dvds which quickly worked as expected, using all 6 channels when needed. Mplayer does not detect how many channels is need, but you can append -channels 6 to the cmdline to use full output.

Problem first appears when I play a simple mp3 file, only the front left and front right plays. This sounds awfull as my sub isn't used. I solved this using .asoundrc which duplicates the stereo signal to the rear speakers and mixes the left and right signal and sends that to the sub and center. this is then a stereo pcm device I can play 2 channel audio to and get great sound (really, I can recommend.. )

TV-shows on the other hand sound alot better using dolby decoding, which extracts a center and rear channel from a stereo signal. Only Mplayer seems to have this feature, which requires a rather complicated argument to decode and mix up into 5.1.. While this is all well, using this argument on .avi's with ac3 sound messes up the sound as they already have the required channels and no encoded signals.

So I started hacking Freevo 1.5.4 in the video/videoitem.py to make the following selection:
for stereo audio use standard stereo output (which is upmixed by alsa)
for stereo video use the mplayer argument for surround decoding.
for ac3/multichannel output use the corresponding multichannel output.

However, it would seem the mmpython information block does not contain information regarding the number of channels, although using mminfo on a file correctly identifies at least 6 channel ac3 .. I try to fiddle near line 350 of video/plugin/mplayer.py trying to get the number of channels from the infoblock, but it seems to be nonexistant.

Any help regarding extracting this information?

- Jesper

Reply via email to