After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311423 - [playbin2] ac3/dts passthrough
[playbin2] ac3/dts passthrough
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 435123 (view as bug list)
Depends on:
Blocks: 663963
 
 
Reported: 2005-07-24 15:35 UTC by Jeroen Zwartepoorte
Modified: 2018-05-04 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeroen Zwartepoorte 2005-07-24 15:35:56 UTC
$ totem ~/Desktop/King_Kong_Trailer_1080i_DD5.1.ts
No accelerated IMDCT transform found
ERROR (0xbe2ba0 - 311727:33:54.078035000)             GST_PADS(29550)
gstpad.c(2562):gst_pad_set_explicit_caps:<a52dec0> failed to negotiate
(try_set_caps with "audio/x-raw-float, endianness=(int)1234, width=(int)32,
channels=(int)6, rate=(int)48000, buffer-frames=(int)0,
channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_LFE,
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >" returned REFUSED)
ERROR (0xbe2ba0 - 311727:33:54.078253000)            scheduler(29550)
gstoptimalscheduler.c(2800):gst_opt_scheduler_iterate:<optscheduler1> in error state

(totem:29550): GStreamer-WARNING **: element internal_thread claimed
state-change success,but state didn't change to PLAYING. State is PAUSED
(NONE_PENDING pending), fix the element
** Message: Couldn't initialize lirc.


(totem:29550): GStreamer-CRITICAL **: gst_element_get_factory: assertion
`GST_IS_ELEMENT (element)' failed
Comment 1 Ronald Bultje 2005-07-24 15:37:06 UTC
Try 'alsasink device=hw:0' in gstreamer-properties?
Comment 2 Ronald Bultje 2005-07-25 09:15:16 UTC
Oh, n/m, so this is SPDIF, which we indeed do not support yet.
Comment 3 Jeroen Zwartepoorte 2005-07-25 09:59:10 UTC
I'm not sure gstreamer even knows/tries to use SPDIF here. Xine plays the file
ok, but xine is told explicitly (~/.xine/config) to use SPDIF output. I haven't
configured gstreamer in any way to use a specific ALSA output type/port. This
only seems to happen with the a52dec element. Playing an mp3 or other non-ac3
video works fine with totem+gstreamer.

Perhaps the a52dec element detects AC3 output and encounters the SPDIF output
and can't deal with that?
Comment 4 Andy Wingo 2006-01-13 17:57:13 UTC
Copying Mike for comment on the SPDIF/ac3 issues and Totem. He has an element to do that that will land in CVS at some point.

I'm ignoring the crasher part now, because it seems to be 0.8 scheduling-related, and 0.8 is unmaintained.
Comment 5 Jan Schmidt 2006-02-03 16:52:23 UTC
To support SPDIF/raw ac3 output from playbin, we'll need to enhance playbin and decodebin's autoplugging logic. 

Adding the audiosink that supports ac3 output to CVS is easy enough, but at the moment playbin won't use it because decodebin always keeps plugging until it has decoded raw audio samples - there's no way (at the moment) to tell it to stop when it finds audio/x-ac3 
Comment 6 Tim-Philipp Müller 2006-05-02 16:53:59 UTC
Could someone remind me what the actual issue here is again, besides the 'would be nice if we had an alsaspdifsink and playbin could support that' (which should probably be two separate feature request bugs in -base, no?)?


So the sink _only_ supports SPDIF and that's why things fail?
Comment 7 Jeroen Zwartepoorte 2006-05-02 18:43:08 UTC
It shouldn't crash?
Comment 8 Tim-Philipp Müller 2006-05-02 18:59:58 UTC
Besides the crash I meant (which was - probably correctly - attributed to 0.8 scheduler/thread borkage in comment 4)  :)
Comment 9 David Schleef 2008-08-19 02:31:22 UTC
We now have an alsaspdifsink.  Playbin still does not support it.  Changing bug title and severity to reflect this.
Comment 10 Tim-Philipp Müller 2008-08-19 09:48:10 UTC
I think alsasink also handles SPDIF now, rendering alsaspdifsink obsolete (not that it matters much in terms of implementation).
Comment 11 Josselin Mouette 2008-09-26 11:00:41 UTC
I’m really interested in finally seeing SPDIF output work with Totem+GStreamer, probably enough to code some bits, so could anyone sum up what is missing and what should be done if we want to see it working?
Comment 12 Josselin Mouette 2008-11-09 16:01:54 UTC
(In reply to comment #10)
> I think alsasink also handles SPDIF now, rendering alsaspdifsink obsolete (not
> that it matters much in terms of implementation).

Actually it doesn’t seem to work. The following does not work:
 gst-launch-0.10 -v filesrc location=/tmp/toto.ac3 ! ac3iec958  ! alsasink
while the following does:
 gst-launch-0.10 -v filesrc location=/tmp/toto.ac3 ! ac3iec958  ! alsaspdifsink

but actually playbin does not use it.

AIUI, we need to extend playbin with a new property so that it actually understands that we want IEC958 output. Otherwise you may end up with no sound on other systems.

If this parameter is set and if the audio stream type is audio/ac3, we should replace the audio decoder by ac3iec958 and the output sink by alsaspdif sink. Does it feel like a correct approach?

I’m ready to code it, however I’m relatively new to GStreamer and don’t know where these are set in playbin, so if someone could point me to where to start, it would be very nice.
Comment 13 Edward Hervey 2009-03-11 08:07:26 UTC
Doesn't this work now with playbin2 ?

gst-launch-0.10 -v playbin2 uri=file:///tmp/toto.ac3
Comment 14 Sebastian Dröge (slomo) 2009-09-09 17:05:45 UTC
Closing as no additional information was provided (playbin2 should theoretically support this)
Comment 15 Tim-Philipp Müller 2009-09-09 22:43:34 UTC
> Closing as no additional information was provided

The NEEDINFO was bogus in the first place. Comment #12 has a summary of the situation. I don't think much has changed since then.


> (playbin2 should theoretically support this)

playbin2 still won't plug ac3iec958 or do AC3 passthrough for alsasink/spdif, so reopening.
Comment 16 Tim-Philipp Müller 2010-04-04 12:58:19 UTC
*** Bug 435123 has been marked as a duplicate of this bug. ***
Comment 17 Stefan Sauer (gstreamer, gtkdoc dev) 2010-07-09 11:31:52 UTC
Some design study on http://gstreamer.freedesktop.org/wiki/PlayBinPassthrough now.
Comment 18 Tim-Philipp Müller 2011-11-17 17:18:21 UTC
This should work now with the latest pulseaudio and gstreamer git, if passthrough is configured for these formats in the pulseaudio GUI.

Still needs implementing in alsasink, but that shouldn't keep this bug open really.
Comment 19 Thomas Pasch 2011-11-19 11:09:01 UTC
Dear Tim-Philipp, your last post (Comment 18) sounds interesting. But which pulseaudio GUI? pavucontrol? paprefs?
Comment 20 Tim-Philipp Müller 2011-11-20 22:49:15 UTC
http://www.pulseaudio.org/wiki/Passthrough
Comment 21 Edward Hervey 2013-07-18 06:11:11 UTC
Isn't this fixed with pulseaudio nowadays ?
Comment 22 Sebastian Dröge (slomo) 2018-05-04 08:45:44 UTC
Yes, also alsasink can do compressed passthrough. This should just work in theory nowadays in playbin, there's only an open issue about renegotiation in pulsesink which has another bug (devices might be replugged, losing AC3 support so that you suddenly need to start decoding).