GNOME Bugzilla – Bug 576074
after re-buffering, playbin2 playback of a youtube stream stalls
Last modified: 2009-03-25 17:10:32 UTC
Please describe the problem: i try playing youtube mpeg 4 streams using playbin2. prebuffering counts up to 100% once during preroll, then playback starts and while it's playing, some time during the first seconds, it starts rebuffering and counting again. then it prints "Done buffering, setting pipeline to PLAYING ..." and at this point, sometimes the playback just stops. Steps to reproduce: gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=E_AhiIJzGbA&l=20&sk=AkrJIMSwvkty9zXfJUjyxDy5UT1K056oC&fmt_map=34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0&t=vjVQa1PpcFMWCoD1DyKRUrBPwwepMLOxz9qWmxxOs18%3D&hl=en&plid=AARlirnx7EAsGMse&cr=US&fmt=18" -v Actual results: root@dm8000:~# gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=E_AhiIJzGbA&l=20&sk=AkrJIMSwvkty9zXfJUjyxDy5UT1K056oC&fmt_map=34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0&t=vjVQa1PpcFMWCoD1DyKRUrBPwwepMLOxz9qWmxxOs18%3D&hl=en&plid=AARlirnx7EAsGMse&cr=US&fmt=18" -v Setting pipeline to PAUSED ... /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: connection-speed = 0 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: subtitle-encoding = NULL /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: uri = "http://www.youtube.com/get_video?video_id=E_AhiIJzGbA&l=20&sk=AkrJIMSwvkty9zXfJUjyxDy5UT1K056oC&fmt_map=34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0&t=vjVQa1PpcFMWCoD1DyKRUrBPwwepMLOxz9qWmxxOs18%3D&hl=en&plid=AARlirnx7EAsGMse&cr=US&fmt=18" /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-duration = -1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-size = -1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: source = (GstNeonhttpSrc) source Pipeline is PREROLLING ... /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind: force-caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20: sink-caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstQueue2:queue20.GstPad:sink: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstQueue2:queue20.GstPad:src: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:sink: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstGhostPad:sink.GstProxyPad:proxypad0: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstQTDemux:qtdemux0.GstPad:sink: caps = audio/x-m4a /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-buffers = 5 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-time = 2000000000 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-bytes = 2097152 /GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstSelectorPad:sink0: always-ok = FALSE /GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstSelectorPad:sink0: always-ok = FALSE WARNING: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0: No volume control found Additional debug info: gstplaysink.c(1224): gen_audio_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0: Volume/mute is not available /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:sink0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:src0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstSelectorPad:sink0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1.GstProxyPad:proxypad5: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src1.GstProxyPad:proxypad2: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstInputSelector:inputselector1: active-pad = (GstSelectorPad) sink0 /GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstTee:audiotee.GstPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstTee:audiotee.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstTee:audiotee.GstPad:src0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstTee:audiotee.GstPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstTee:audiotee.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:audio_sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:audio_sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:audio_sink.GstProxyPad:proxypad6: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 MIMETYPE audio/mpeg version 4 (AAC) /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstDVBAudioSink:dvbaudiosink0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin.GstGhostPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin.GstGhostPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin.GstGhostPad:sink.GstProxyPad:proxypad9: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:sink1: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:src1: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstSelectorPad:sink0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0.GstProxyPad:proxypad4: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src0.GstProxyPad:proxypad3: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstInputSelector:inputselector0: active-pad = (GstSelectorPad) sink0 /GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstPad:src: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstQueue:vqueue.GstPad:sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin.GstGhostPad:sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:video_sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:video_sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0.GstGhostPad:video_sink.GstProxyPad:proxypad7: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin.GstGhostPad:sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin.GstGhostPad:sink.GstProxyPad:proxypad8: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstQueue:vqueue.GstPad:src: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 H264 have codec data..! H264 baseline profile@1.1 MIMETYPE video/x-h264 VIDEO_SET_STREAMTYPE, 1 /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstDVBVideoSink:dvbvideosink0.GstPad:sink: caps = video/x-h264, codec_data=(buffer)0142000bfde1000e6742000bbb40a0fd8080f08042a001000668ce02412c80, width=(int)320, height=(int)240, framerate=(fraction)15/1 Prerolled, waiting for buffering to finish... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Buffering, setting pipeline to PAUSED ... Prerolled, waiting for buffering to finish... Done buffering, setting pipeline to PLAYING ... ...video and audio playback stall... Expected results: play normally at all times Does this happen every time? error occurs in >half of the tries. interesting it that it NEVER stops playback, when trying to create a debug log using GST_DEBUG="*queue2*:5,*decodebin*:5,*playbin2*:5" gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=E_AhiIJzGbA&l=20&sk=AkrJIMSwvkty9zXfJUjyxDy5UT1K056oC&fmt_map=34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0&t=vjVQa1PpcFMWCoD1DyKRUrBPwwepMLOxz9qWmxxOs18%3D&hl=en&plid=AARlirnx7EAsGMse&cr=US&fmt=18" >buffer_done_stall.log 2>&1 Other information: working on dreambox 8000 architecture, like usually. souphttpsrc is not an option due to dependencies
do you have a debug log? Also that url is now 'GONE' it says.
i can't create a debug log. really every time when i prefix with GST_DEBUG="???:5", it works! so maybe it's a race or timing issue where it works when it's delayed by the logging? youtube stream links time out after a short moment http://www.walkernews.net/2008/03/16/extract-url-to-direct-download-youtube-video/ will give you a new one, just enter the youtube video website url like http://www.youtube.com/watch?v=sD3SF6foL00 then it'll give you a new valid link to that video stream right now e.g. http://www.youtube.com/get_video?video_id=sD3SF6foL00&l=22&sk=1GGmnt3rl8momWlprWAQBrekZoGDaoqsC&fmt_map=&t=vjVQa1PpcFPVDPwtrg7GDsffsKM5JtEWE8KdDp5z4dY%3D&hl=en&plid=AARlkPpucCQu1af1&cr=US when you add &fmt=18 at the end, then you get it as mpeg4 with h.264 video
I can't reproduce. Can you attach to the process when it's locked with gdb -p <pid> then attach the output of thr apply all bt full
Created attachment 131349 [details] GST_DEBUG="*PADS*:5" gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=sD3SF6foL00&l=22&sk=5SOoF2hKRtkqxXv1_x6ymdFvva9OrKxGC&fmt_map=&t=vjVQa1PpcFNpQz5UFayrLV4Qx2Ql42K3Z-f-jcER3MI%3D&
not enough info. The video part is shut down. I bet it's the videosink returning wrong-state when going to PAUSED, for some reason.
Created attachment 131355 [details] GST_DEBUG="*SCHED*:5" gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=sD3SF6foL00&l=22&sk=mY7WgPCAEzFlLmzcZeeb1MXrsPCcRIdsC&fmt_map=&t=vjVQa1PpcFM0S1Pu_q9ztADDH4kq40y3VbQ37T71MPo%3D i unplugged the network shortly after playback started and replugged it when video came to stop. playback did not proceed.
Created attachment 131356 [details] GST_DEBUG="*SCHED*:5" gst-launch playbin2 uri="http://www.youtube.com/get_video?video_id=sD3SF6foL00&l=22&sk=mY7WgPCAEzFlLmzcZeeb1MXrsPCcRIdsC&fmt_map=&t=vjVQa1PpcFM0S1Pu_q9ztADDH4kq40y3VbQ37T71MPo%3D with a really tiny buffer size, the issue also happens when writing excessive debug logs
okay! thanks wim! this turned out to be a bug in my sink which didn't implement the unlock_stop vfunc.