GNOME Bugzilla – Bug 539548
[udpsrc] Fails to bind with permission denied when trying to play RTSP stream as normal user
Last modified: 2008-09-25 14:23:30 UTC
Please describe the problem: The video at http://www.archive.org/stream/uncovered_interviews/uncovered_interviews_3_256kb.mp4 doesn't play. I get a grey screen/page icon thing instead of the movie. Pressing the play button makes the plugin lock up for a few seconds. Launching from the console I can see: $ epiphany -p http://www.archive.org/stream/uncovered_interviews/uncovered_interviews_3_256kb.mp4 sys:1: Warning: value "((GaProtocol) 2)" of type `GaProtocol' is invalid or out of range for property `flags' of type `GaProtocol' sys:1: Warning: g_hash_table_unref: assertion `hash_table != NULL' failed ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: GetValue variable 1 (1) ** Message: GetValue variable 2 (2) ** Message: NP_Initialize ** Message: NP_Initialize succeeded ** Message: totemPlugin ctor [0xa0c8e90] ** Message: Init mimetype 'video/quicktime' mode 1 ** Message: Base URI is 'http://www.archive.org/stream/uncovered_interviews/uncovered_interviews_3_256kb.mp4' ** Message: Real mimetype for 'video/quicktime' is 'video/quicktime' argv[0] bgcolor #000000 argv[1] src /images/blank.mov argv[2] qtsrc rtsp://ia300135.us.archive.org:554/0/items/uncovered_interviews/uncovered_interviews_3_256kb.mp4 argv[3] starttime argv[4] endtime argv[5] pluginspage http://www.apple.com/quicktime/download/ argv[6] width 600 argv[7] height 400 ** Message: mSrc: /images/blank.mov ** Message: mCache: 0 ** Message: mControllerHidden: 0 ** Message: mShowStatusbar: 0 ** Message: mHidden: 0 ** Message: mAudioOnly: 0 ** Message: mAutostart: 1, mRepeat: 0 ** Message: mHref: ** Message: mTarget: ** Message: Launching: /usr/lib/totem/gstreamer/totem-plugin-viewer --plugin-type narrowspace --user-agent Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9) Gecko/20080528 Epiphany/2.22 --mimetype video/quicktime ** Message: Viewer spawned, PID 14951 ** Message: GetValue variable 14 (e) ** Message: Initial window set, XID 48001a7 size 600x400 ** Message: No viewer proxy yet, deferring SetWindow ** Message: NewStream mimetype 'video/quicktime' URL 'http://www.archive.org/images/blank.mov' ** Message: Viewer not ready, aborting stream ** Message: Viewer DBus interface name is 'org.gnome.totem.PluginViewer_14951' ** Message: NameOwnerChanged old-owner '' new-owner ':1.102' ** Message: Viewer now connected to the bus ** Message: ViewerSetup ** Message: Calling SetWindow Viewer: SetWindow XID 75497895 size 600:400 TotemEmbedded-Message: Viewer state: STOPPED ** Message: SetWindow reply ** Message: ViewerReady ** Message: IsSchemeSupported scheme 'rtsp': no TotemEmbedded-Message: totem_embedded_open_uri: uri rtsp://ia300135.us.archive.org:554/0/items/uncovered_interviews/uncovered_interviews_3_256kb.mp4 base_uri: http://www.archive.org/images/blank.mov TotemEmbedded-Message: totem_embedded_open_internal 'rtsp://ia300135.us.archive.org:554/0/items/uncovered_interviews/uncovered_interviews_3_256kb.mp4' is-browser-stream 0 start-play 1 TotemEmbedded-Message: BEFORE _open ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" TotemEmbedded-Message: AFTER _open (ret: 1) ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" TotemEmbedded-Message: Viewer state: PLAYING ** Message: OpenURI reply ** Message: DoCommand 'Play' ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" ** (totem-plugin-viewer:14951): WARNING **: unknown transport field "rtp/avp/udp" ** Message: Error: The stream is in the wrong format. gstrtspsrc.c(3808): gst_rtspsrc_setup_streams (): /play/source: No supported stream was found. TotemEmbedded-Message: Viewer state: STOPPED TotemEmbedded-Message: totem_embedded_set_error: 'The stream is in the wrong format.' TotemEmbedded-Message: totem_embedded_set_error_logo called by browser plugin ** Message: totemPlugin dtor [0xa0c8e90] ** Message: NP_Shutdown Steps to reproduce: Actual results: Expected results: Some kind of message saying what the problem with the movie is to be displayed in the plugin area :) Does this happen every time? Other information:
Does this play? gst-launch-0.10 playbin uri=rtsp://ia300135.us.archive.org:554/0/items/uncovered_interviews/uncovered_interviews_3_256kb.mp4 Most likely a GStreamer problem...
Indeed it does not: $ gst-launch-0.10 playbin uri=rtsp://ia300135.us.archive.org:554/0/items/uncovered_interviews/uncovered_interviews_3_256kb.mp4 Setting pipeline to PAUSED ... ** (gst-launch-0.10:25607): WARNING **: unknown transport field "rtp/avp/udp" ** (gst-launch-0.10:25607): WARNING **: unknown transport field "rtp/avp/udp" ERROR: Pipeline doesn't want to pause. ERROR: from element /playbin0/source: The stream is in the wrong format. Additional debug info: gstrtspsrc.c(3808): gst_rtspsrc_setup_streams (): /playbin0/source: No supported stream was found. Setting pipeline to NULL ... FREEING pipeline ... However it would be neat if the error was reported to the user in some useful way. Preferably not a pop-up error, but by drawing some text in the plugin window (with a text area so that the user can copy/paste it!)
Ok, I can play that stream with current CVS and with being root, running as normal user gives me (with debug level 2): Setting pipeline to PAUSED ... 0:00:01.276472971 3043 0x890c688 WARN udpsrc gstudpsrc.c:853:gst_udpsrc_start:<udpsrc1> error: bind failed -1: Permission denied (13) 0:00:01.276757886 3043 0x890c688 WARN basesrc gstbasesrc.c:2632:gst_base_src_activate_push:<udpsrc1> Failed to start in push mode 0:00:01.276847404 3043 0x890c688 WARN GST_PADS gstpad.c:684:gst_pad_set_active:<udpsrc1:src> Failed to activate pad 0:00:01.277147762 3043 0x890c688 WARN rtspsrc gstrtspsrc.c:3901:gst_rtspsrc_setup_streams:<source> error: Could not setup transport. ERROR: Pipeline doesn't want to pause. ERROR: from element /playbin0/source: Could not get/set settings from/on resource. Additional debug info: gstrtspsrc.c(3901): gst_rtspsrc_setup_streams (): /playbin0/source: Could not setup transport. Setting pipeline to NULL ... FREEING pipeline ... So there's at least a problem with udpsrc now...
Works more or less for me now with latest CVS, only the sound is garbled here. 2008-06-25 Sebastian Dröge <sebastian.droege@collabora.co.uk> * gst/udp/gstudpsrc.c: (gst_udpsrc_start): Call getsockname() after the call to bind() to get updated values for the port, etc. This fixes the usage of udpsrc on anonymous binding and it's usage by rtspsrc. Fixes bugs #539372, #539548. Thanks to Aurelien Grimaud for pointing out the obvious fix.
The sound is garbled because it uses RTP interleaving which is not supported yet.
FYI, Interleaved mpeg4-generic streams are now supported in CVS and this files plays fine now.