GNOME Bugzilla – Bug 331690
playbin won't play my last.fm stream
Last modified: 2006-03-06 20:08:38 UTC
Please describe the problem: When I tell playbin to play my last.fm stream it goes into Prerolling and never plays anything. Steps to reproduce: Run gst-launch-0.10 playbin uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 Actual results: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... And no sound is heard Expected results: I would expect to hear music Does this happen every time? Yes. Other information: Running with debugging gives GST_DEBUG=gnomevfssrc:5 gst-launch-0.10 playbin uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 Setting pipeline to PAUSED ... DEBUG (0x80509a0 - 0:00:00.203913000) gnomevfssrc( 1486) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<source> pushing callbacks LOG (0x80509a0 - 0:00:00.374673000) gnomevfssrc( 1486) gstgnomevfssrc.c(1121):gst_gnome_vfs_src_start:<source> filesize not known DEBUG (0x80509a0 - 0:00:00.374762000) gnomevfssrc( 1486) gstgnomevfssrc.c(1058):gst_gnome_vfs_src_get_size:<source> size 18446744073709551615 DEBUG (0x80509a0 - 0:00:00.374839000) gnomevfssrc( 1486) gstgnomevfssrc.c(846):gst_gnome_vfs_src_pop_callbacks:<source> popping callbacks LOG (0x80509a0 - 0:00:00.452051000) gnomevfssrc( 1486) gstgnomevfssrc.c(1121):gst_gnome_vfs_src_start:<source> filesize not known DEBUG (0x80509a0 - 0:00:00.452135000) gnomevfssrc( 1486) gstgnomevfssrc.c(1058):gst_gnome_vfs_src_get_size:<source> size 18446744073709551615 Pipeline is PREROLLING ... DEBUG (0x80dbb58 - 0:00:00.453948000) gnomevfssrc( 1486) gstgnomevfssrc.c(942):gst_gnome_vfs_src_create: now at 0, reading 0, size 4096 Caught interrupt -- Pausing pipeline. Pipeline paused. WARNING: Element "playbin0" warns: pipeline interrupted iain@glosoli:~/Projects/Personal/last-exit$ gst-launch-0.10 playbin uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Caught interrupt -- Pausing pipeline. Pipeline paused. WARNING: Element "playbin0" warns: pipeline interrupted Possibly related to 325847 ?
It seems to be a typefind issue: luogni@bucefalo:~/Sorgenti/devel$ ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! typefind ! fakesink -v Setting pipeline to PAUSED ... Pipeline is PREROLLING ... This pipeline works "fine": luogni@bucefalo:~/Sorgenti/devel$ ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! mad ! audioconvert ! audioresample ! alsasink
If it is indeed a typefinding issue, could it be that the stream starts with the four chars "SYNC". Would this confuse the typefinder?
the mp3 typefinder should recognise it anyway because it is designed to look for mp3 sync markers even if there's some 'garbage' at the start, but if there's any id3 info it won't be read correctly.
After more debugging: - typefinding a local file works fine so this is not the issue this debug output seems quite strange (i've added a try to read g_print before gnome_vfs_read and a g_print after, the second g_print is never printed, also no buffers is received from identity): luogni@snow:~/Sorgenti/010$ GST_DEBUG=gnomevfssrc:5 ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! identity ! typefind ! fakesink -v Setting pipeline to PAUSED ... DEBUG (0x1001ae10 - 0:00:00.781067000) gnomevfssrc( 2708) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks open ok! LOG (0x1001ae10 - 0:00:00.977842000) gnomevfssrc( 2708) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known DEBUG (0x1001ae10 - 0:00:00.977928000) gnomevfssrc( 2708) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615 DEBUG (0x1001ae10 - 0:00:00.978038000) gnomevfssrc( 2708) gstgnomevfssrc.c(846):gst_gnome_vfs_src_pop_callbacks:<gnomevfssrc0> popping callbacks DEBUG (0x1001ae10 - 0:00:00.978837000) gnomevfssrc( 2708) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks open ok! LOG (0x1001ae10 - 0:00:01.167656000) gnomevfssrc( 2708) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known DEBUG (0x1001ae10 - 0:00:01.167734000) gnomevfssrc( 2708) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615 /pipeline0/identity0: last-message = "event ******* (identity0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0) 0x100cda90" Pipeline is PREROLLING ... DEBUG (0x10100fa8 - 0:00:01.171848000) gnomevfssrc( 2708) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 0, reading 0, size 4096 try to read 4096 I wanted to try ethereal to look at the network tgraffic but it doesn't want to work on my ibook.. This pipeline instead works fine: luogni@snow:~/Sorgenti/010$ GST_DEBUG=gnomevfssrc:5 ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! queue ! identity ! typefind ! fakesink -v Setting pipeline to PAUSED ... DEBUG (0x1001ae10 - 0:00:00.797921000) gnomevfssrc( 2782) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks open ok! LOG (0x1001ae10 - 0:00:01.676690000) gnomevfssrc( 2782) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known DEBUG (0x1001ae10 - 0:00:01.676778000) gnomevfssrc( 2782) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615 Pipeline is PREROLLING ... /pipeline0/identity0: last-message = "event ******* (identity0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0) 0x100cda90" DEBUG (0x101006a0 - 0:00:01.680605000) gnomevfssrc( 2782) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 0, reading 0, size 4096 try to read 4096 read 4 DEBUG (0x101006a0 - 0:00:04.256237000) gnomevfssrc( 2782) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 4, reading 4, size 4096 try to read 4096 /pipeline0/identity0: last-message = "chain ******* (identity0:sink)i (4 bytes, timestamp: 0:00:00.000000000, duration: 5124095:34:33.709551615, offset: 0, offset_end: -1, flags: 0) 0x100fc678"
more news..: - gst tries to activate gnomevfssrc in pull_mode - last.fm's stream doesn't have a size and seeking fails (random_access is false) - gst _stops gnomevfssrc - gst activates gnomevfssrc in push_mode - it seems that last.fm server doesn't like two very fast reconnection (or maybe there's a subtle bug in gnomevfssrc..) but my question is: - isn't better if gnomevfssrc creates the connection in the change_state function when going to READY? So we can avoid creating two connection.
I think this is a GstBaseSrc bug (or at least undesirable behaviour on GstBaseSrc's side), filed as bug #332611.
And it would probably be helpful if typefind did gst_pad_check_getrange() as well before trying to do activate_pull() ...
Should be fixed in CVS: 2006-03-06 Tim-Philipp Müller <tim at centricular dot net> * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_class_init), (gst_gnome_vfs_src_check_get_range): Override GstBaseSrc::check_get_range() in order to avoid opening the resource just to check whether we can operate in pull-mode or not - we can predict that pretty well from the URI alone. Should fix problems with last.fm (#331690). (Requires latest core CVS).