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 688803 - playbin: converters don't work? not-negotiated error with non-1/1 PAR and ximagesink
playbin: converters don't work? not-negotiated error with non-1/1 PAR and xim...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Linux
: Normal blocker
: 1.0.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-21 12:08 UTC by Tim-Philipp Müller
Modified: 2013-05-28 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playbin-not-negotiated.log.xz (990.70 KB, application/octet-stream)
2012-11-22 00:10 UTC, Tim-Philipp Müller
Details

Description Tim-Philipp Müller 2012-11-21 12:08:37 UTC
gst-launch-1.0 playbin uri=dvd:///home/tpm/samples/Dvds/dvd-test-futurama-menu-hover-deadlock/VIDEO_TS/

ERROR: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: The stream is in the wrong format.
Additional debug info:
gstaudiobasesink.c(1971): gst_audio_base_sink_render (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: sink not negotiated.


$ gst-launch-1.0 playbin uri=file:///home/tpm/foo.mkv  video-sink=ximagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0: GStreamer encountered a general stream error.
Additional debug info:
matroska-demux.c(4648): gst_matroska_demux_loop (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0:
stream stopped, reason not-negotiated


(Works fine with xvimagesink of course)
Comment 1 Tim-Philipp Müller 2012-11-22 00:10:54 UTC
Created attachment 229609 [details]
 playbin-not-negotiated.log.xz
Comment 2 Tim-Philipp Müller 2012-11-22 11:38:38 UTC
Bug #686459 might be related.
Comment 3 Wim Taymans 2012-12-12 15:20:08 UTC
This seems to work now:

gst-launch-1.0 playbin uri=http://mirrorblender.top-ix.org/movies/sintel-1280-surround.mp4 video-sink=ximagesink
Comment 4 Tim-Philipp Müller 2012-12-12 15:40:17 UTC
(In reply to comment #3)
> This seems to work now:
> gst-launch-1.0 playbin
> uri=http://mirrorblender.top-ix.org/movies/sintel-1280-surround.mp4
> video-sink=ximagesink

That works here as well, also as a local file, but it still fails for e.g. an mkv file I have, and the dvd menu (though that might be something else, as it's audio).
Comment 5 Mike Auty 2012-12-13 00:40:19 UTC
I'm also experiencing this with DVDs:


gst-launch-1.0 playbin uri=dvd:///dev/cdrom
...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: The stream is in the wrong format.
Additional debug info:
gstaudiobasesink.c(1971): gst_audio_base_sink_render (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse:
sink not negotiated.
Execution ended after 143897 ns.
...

gst-launch-0.10 can play the DVD fine (unfortunately totem is using the newer gstreamer).
Comment 6 Tim-Philipp Müller 2012-12-24 14:58:47 UTC
> This seems to work now:
> 
> gst-launch-1.0 playbin
> uri=http://mirrorblender.top-ix.org/movies/sintel-1280-surround.mp4
> video-sink=ximagesink

It appears the reason this works is because that file has a 1/1 pixel-aspect-ratio for the video. It fails with files with non-1/1 par, because the playsink videoconverter bin is using the 'identity' path instead of the videoconvert ! videoscale path for some reason. An additional observation: everything works fine with the deinterlace flag removed (e.g. just flags=video).

To reproduce:

gst-launch-1.0 playbin uri=http://people.freedesktop.org/~tpm/samples/bbcnews2.m2t video-sink=ximagesink
Comment 7 Tim-Philipp Müller 2013-03-03 17:59:35 UTC
Simpler pipeline to reproduce the issue:

gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,format=I420,pixel-aspect-ratio=11/10 ! sink.video_raw_sink  playsink name=sink video-sink='appsink caps=video/x-raw,width=320,height=240,framerate=10/1,pixel-aspect-ratio=1/1'

Josep investigated this and found that adding a pixel-aspect-ratio field to videoscale's source pad template fixes this, but I would still like to understand what the actual issue is, I believe that fix just works around the issue.
Comment 8 Sebastian Dröge (slomo) 2013-03-21 12:43:41 UTC
commit 9084bc151be66c7271a5b3679e0e3dc653e96fb2
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Mar 21 13:33:44 2013 +0100

    playsinkconvertbin: Make sure to return all allowed caps in the GET_CAPS query
    
    Add all the caps that we can convert to to the filter caps,
    otherwise downstream might just return EMPTY caps because
    it doesn't handle the filter caps but we could still convert
    to these caps, causing us to return EMPTY caps although
    conversion would be possible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688803
Comment 9 Austin Lund 2013-05-28 10:07:20 UTC
Did this fix make it into 1.0.7?  I'm still hitting this bug there.
Comment 10 Sebastian Dröge (slomo) 2013-05-28 10:37:02 UTC
Indeed still broken in 1.0.7 but not git master, although the above patch was backported to 1.0.7
Comment 11 Sebastian Dröge (slomo) 2013-05-28 11:47:25 UTC
One missing part is this:

commit ec0d03d2395bbfb9cf40702eeb62b9e46109bd06
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Tue Feb 19 11:14:11 2013 +0000

    dvbsuboverlay: don't forward CAPS event from subtitle pad
    
    May results in not-negotiated flow errors otherwise.
Comment 12 Sebastian Dröge (slomo) 2013-05-28 12:13:34 UTC
And this:

commit 4137391174087a72da6fe3e8828ca7e58c3e4fc9
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Feb 13 10:46:37 2013 +0100

    structure: Make sure that subsets have all fields of the superset
    
    "video/x-h264,parsed=(boolean)true" is not a superset of
    "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal"
    for example.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693365
Comment 13 Tim-Philipp Müller 2013-05-28 19:45:37 UTC
Hrm, I just hope this doesn't cause any other issues, I think I didn't cherry-pick it into 1.0 on purpose back then because I felt it was too risky:

> And this:
> 
> commit 4137391174087a72da6fe3e8828ca7e58c3e4fc9
> Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
> Date:   Wed Feb 13 10:46:37 2013 +0100
> 
>     structure: Make sure that subsets have all fields of the superset
> 
>     "video/x-h264,parsed=(boolean)true" is not a superset of
>     "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal"
>     for example.
> 
>     https://bugzilla.gnome.org/show_bug.cgi?id=693365
Comment 14 Sebastian Dröge (slomo) 2013-05-28 19:53:33 UTC
(In reply to comment #13)
> Hrm, I just hope this doesn't cause any other issues, I think I didn't
> cherry-pick it into 1.0 on purpose back then because I felt it was too risky:

I'm not aware of any that were not detected the few days after this commit (mostly in unit tests)... and nothing appearing for 3 months is a good sign, considering how many people are using git master currently.
Comment 15 Tim-Philipp Müller 2013-05-28 20:07:39 UTC
True, should be ok, esp. after you picked the other fixes related to that.