GNOME Bugzilla – Bug 645584
tsdemux: Add GST_SEEK_FLAG_SEGMENT support
Last modified: 2018-11-03 13:07:46 UTC
i've narrowed the problem down to the following a second PCR is required so that the stream bitrate can be approximated without this variable, seek operations are not permitted (line 2565) but the second PCR can't be recorded since the required difference of one second to the previous pcr is never reached (line 1855) i've experimentally patched that to 3000 and voilà i can seek. maybe somebody has a real solution for this though when mpegtsdemux first calculates the bitrate, i'm posting a "seekable" message now so that in my application i know when i can invoke the first seek operation. this is probably not the right way of doing this :)
Created attachment 184146 [details] [review] mpegtsdemux: make certain dvb recordings seekable
a relevant test stream can be found at http://opendreambox.org/~fraxinas/20110316_0020_-_RTL_HD_-_Dr_House.ts
tsdemux doesn't play this file.
Plays fine with current tsdemux
Created attachment 189887 [details] debug 5 log of trying to do a segmnet seek with tsdemux okay i'm using latest git of tsdemux now, including jannau's latest changes about seeking which edward pushed last week. still, no segment seeking can be done with my little app. to me it looks like it's actually stuck in mpegtsbase i'm still working with the same test stream as above.
Created attachment 190034 [details] test case doing a segment seek on a playbin2 also causes the playback to stall usage: playbin2segmentseek <uri>
let me bitch and moan here a little bit about the fact that it's still not possible to do segment seeking in mpeg ts files (and about my inability to fix it by myself). i'd be really grateful if somebody could take another look at it together with me!
Andreas, just pushed quite a few seek related commits to 1.0 master. Want to try again ? I tried seeking on that file and it works.
gst_element_seek ((app->pipeline), rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, in_pos, GST_SEEK_TYPE_SET, out_pos); with rate = 1.0; flags = GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_KEY_UNIT; in_pos = current_position; out_pos = -1 still fails :( 0:00:00.638619002 4676 0x113f120 WARN tsdemux tsdemux.c:563:gst_ts_demux_srcpad_event: seeking failed
I just tried with the file in comment #2, it works. What are you doing exactly ? And are you using master (and not the 1.0 branch, my fault)
ping ?
i still try to perform a segment seek with seek flags having GST_SEEK_FLAG_SEGMENT set 0:00:00.034986193 9061 0x1b09f00 WARN mpegtsbase mpegtsbase.c:1256:mpegts_base_handle_seek_event: seek flags 0xd are not supported 0:00:00.035002812 9061 0x1b09f00 WARN tsdemux tsdemux.c:563:gst_ts_demux_srcpad_event: seeking failed
Ah ok, sorry, got confused. Changing title accordingly.
Comment on attachment 184146 [details] [review] mpegtsdemux: make certain dvb recordings seekable I assume this is not needed anymore then? Just support for SEGMENT seeks needed? That should be trivial to add btw, main difference between a normal seek is just that messages are sent and the demuxer doesn't go EOS
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/37.