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 709833 - souphttpsrc: Cannot set playspeed !=1 on Mpeg TS played on non-seekable HTTP sources
souphttpsrc: Cannot set playspeed !=1 on Mpeg TS played on non-seekable HTTP ...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-10 16:27 UTC by Eric
Modified: 2014-11-24 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric 2013-10-10 16:27:59 UTC
I tried the following cmd with a moded gst-launch to handle a playspeed parameter.

./gst-launch-1.0 -p 2 playbin uri=http://10.1.117.4:61498/mal/I/MY11/146.mpeg
 
----------------------------------------------------------
Here is the output, the file plays at speed 1
 
===============================================================================================
This is a moded version of gst-inspect-1.0 to accept a -p %f param and apply it as playspeed.
===============================================================================================
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Prerolled, waiting for buffering to finish...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Setting playspeed to 2.00x
 
(gst-launch-1.0:27468): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed
Failed to set playspeed!
New clock: GstAudioSinkClock



If I download the file with wget and play it trough the filesrc element, the file play at the requested speed.

am I missing something, or is there a bug for this kind of media?
Mpeg PS file works well...

Regards, 
Eric
Comment 1 Edward Hervey 2013-10-11 09:19:57 UTC
Just tried with gst-plugins-base/tests/examples/playback/playback-test and it works fine (no assertion, a slight pause when switching rate, but it does playback at 2x).

When do you send the seek request ?

What does you seek event look like ?
Comment 2 Edward Hervey 2013-10-11 09:20:20 UTC
Oh, and I tested with current git master.
Comment 3 Eric 2013-10-11 10:01:12 UTC
I added a seek after pipeline is set to playing in gst-launch around line 1079

	  if( playspeed != 1)	  {
		  PRINT (_("Setting playspeed to %.2fx\n"), playspeed);
		  if( !gst_element_seek(GST_ELEMENT(pipeline),playspeed, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_SNAP_NEAREST, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE) )		  {
			  PRINT(_("Failed to set playspeed!\n"));
		  }
	  }

after :

	PRINT (_("Setting pipeline to PLAYING ...\n"));

      if (gst_element_set_state (pipeline,
              GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
        GstMessage *err_msg;
        GstBus *bus;

        g_printerr (_("ERROR: pipeline doesn't want to play.\n"));
        bus = gst_element_get_bus (pipeline);
        if ((err_msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, 0))) {
          print_error_message (err_msg);
          gst_message_unref (err_msg);
        }
        gst_object_unref (bus);
        res = -1;
        goto end;
      }

playspeed is set via a command arg I added.
Comment 4 Eric 2013-10-11 10:11:23 UTC
if it can help, the audio is AC3
Comment 5 Eric 2013-10-11 10:26:05 UTC
I gave a try to the playback example. And i have the same problem, the seek fails :
(lt-playback-test:25039): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed
seek failed
Comment 6 Eric 2013-10-11 13:42:43 UTC
here is a link were you can download the file I'm working on :
https://www.dropbox.com/s/kxmvq4eb7y04raa/test_mpeg_ts_ac.mpeg
Comment 7 Olivier Crête 2013-10-13 15:16:39 UTC
Works fine for me with playback-test and your file
Comment 8 Eric 2013-10-14 08:34:24 UTC
Did you try to read the file trough http?
Comment 9 Olivier Crête 2013-10-14 15:59:19 UTC
Yes, my bet is that your seek goes through before the demuxer is added so goes straight to souphttpsrc and triggers some bug there.. But I can't reproduce it.
Comment 10 Eric 2013-10-16 09:54:12 UTC
I think it my be due to the absence of Content-Length in the response header.

I tried streaming from an Apache server which adds the Content-Length header in the response, and everything works well.

But if the server doesn't give the Content-Length, we are unable to seek or set a play-speed for that media.

We don't have the problem with MPEG_PS, even when there is no Content-Length in the response header.
Comment 11 Olivier Crête 2013-10-16 13:46:30 UTC
Make sense, souphttpsrc declares the content non-seekable without Content-Length (it assumes it's live content). Which server are you using ?
Comment 12 Eric 2013-10-17 08:38:21 UTC
It's certification tool's server. It doesn't give the content length, so it's ok not being able to seek forward. but we shouldn't we be able to set a play speed and maybe seek back?
Comment 13 Edward Hervey 2014-11-24 09:48:40 UTC
If the server doesn't provide a content-length, then souphttpsrc will consider it as non-seekable. So the problem isn't the playspeed, it's just that you won't be able to seek at all.

Tempted to close this since it's an issue with the server (and not GStreamer).
Comment 14 Tim-Philipp Müller 2014-11-24 10:07:53 UTC
Agreed, let's close it.

(The server might support seeking DLNA-style in time format, but there are other bugs for that IIRC).