Opened 13 years ago

Last modified 13 years ago

#749 new defect

Problem using LADSPA plugins (Surround Encoder)

Reported by: sdiconov@… Owned by: reynaldo@…
Priority: normal Component: af
Version: HEAD Severity: normal
Keywords: Cc: reimar
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I have recently updated Mplayer to SVN22173 in hope that it becomes possible to use the LADSPA SurroundEncoder? plugin to pipe multichannel sound to my external Dolby Surround receiver through a stereo jack. (This is the only option with my hardware).

Though the support for >2 channel plugins seems in place, the surroundEncoder still does not work. The error message is:


bash-3.1$ mplayer -af ladspa=/usr/lib/ladspa/surround_encoder_1401.so:surroundEncoder chan-id.wav
MPlayer dev-SVN-r22173-4.1.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
107 audio & 228 video codecs

Playing chan-id.wav.

Audio file file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 6 ch, s16le, 4233.6 kbit/100.00% (ratio: 529200->529200)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
ladspa: (/usr/lib/ladspa/surround_encoder_1401.so:surroundEncoder): The number of audio inputs and audio outputs of the LADSPA plugin differ.
[libaf] Couldn't create or open audio filter 'ladspa'
Error at audio filter chain pre-init!

Exiting... (Fatal error)


The LADSPA plugin that I try to load is supposed to take 4-6 channels and turn them into just 2 for the external 5.0 Dolby Surround receiver. Could this be fixed?

I wonder if there are any other ways to convert AC3 or DTS into Dolby Surround in Mplayer. (liba52 seems to have some "downmix for external amplifiers" option, which is accessible in xmms-a52 and xine, but I still cannot hear rear channels with it. )

Change History (2)

comment:1 Changed 13 years ago by reimar

  • Cc Reimar.Doeffinger@… added

Try making the non-matching channel number case a non-fatal error. You might
have to use -af channels afterwards to remove the "bad" channels.
Patch that does this:
Index: libaf/af_ladspa.c
===================================================================
--- libaf/af_ladspa.c (revision 22215)
+++ libaf/af_ladspa.c (working copy)
@@ -267,7 +267,7 @@

if (setup->noutputs != setup->ninputs ) {

af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname,

MSGTR_AF_LADSPA_ErrInOutDiff);

  • return AF_ERROR;

+ return AF_ERROR;

}


af_msg(AF_MSG_VERBOSE, "%s: this plugin has %d input control(s)\n",

comment:2 Changed 13 years ago by sdiconov@…

Now it works, but strangely. The surroundEncoder should produce Left (0), Right (1) Center (2) and Rear (3) channels. The numbers indicate out channels as in the -af channels filter. So, I can hear Right, Center and Rear OK, BUT there is no Left!

The left speaker is attached and plays stereo perfectly, but with

mplayer -af channels=6:4:0:0:1:1:4:2:2:3,ladspa=/usr/lib/ladspa/surround_encoder_1401.so:surroundEncoder /mnt/video2/HD\ Audio\ Tests/chan-id.wav

the left channel (0:0) is dead while right (1:1), center (4:2) and rear-left for rear (2:3) play well. The left speaker only gives out echoes of the center.

mplayer -af channels=6:4:0:1:1:0:4:2:2:3,ladspa=/usr/lib/ladspa/surround_encoder_1401.so:surroundEncoder /mnt/video2/HD\ Audio\ Tests/chan-id.wav

the left channel (0:1) plays through the right speaker while right (1:0) is dead. Center (4:2) and rear-left for rear (2:3) play well. The left speaker gives out echoes of the center again.

What can be the reason?

Note: See TracTickets for help on using tickets.