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 726709 - playback-test: Segment seeks do not work anymore
playback-test: Segment seeks do not work anymore
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-19 13:40 UTC by Nicolas Dufresne (ndufresne)
Modified: 2015-05-29 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test looping over a part of a file (3.55 KB, text/plain)
2015-04-03 19:34 UTC, Nicolas Dufresne (ndufresne)
Details

Description Nicolas Dufresne (ndufresne) 2014-03-19 13:40:55 UTC
I can't get loop playback working on any file using playback-test (the loop checkbox). Then I also tested that with an old test of mine, and could not get this to work either. There seems to be a regression somewhere.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2014-03-22 20:58:11 UTC
I use seeks with SEGMENT flag in buzztrax and there it works just fine. When using playback-test it does indeed not work though. This comes up in the warning-level

0:00:14.893876710 13349      0x156c800 WARN                 playbin gstplaybin2.c:1962:gst_play_bin_set_current_audio_stream:<playbin> can't switch audio, the stream combiner's sink pads don't have the "active-pad" property
Comment 2 Vincent Penquerc'h 2015-01-29 13:09:54 UTC
I've now reverted all the way back to 1.0 core and -base, and it still does not loop at the end. I'm wondering if it ever worked. When is your old test of yours from, Nicolas ? Pre 1.0 ?
Comment 3 Nicolas Dufresne (ndufresne) 2015-03-31 01:10:02 UTC
Last time it worked for me (and I didn't have time to fix it for all demuxers) it was during the hackfest in Milano in 2013. I don't remember if it worked in the playback-test or just my own. I have re-done some test recently, and it worked there, do you need me to share ?
Comment 4 Vincent Penquerc'h 2015-03-31 10:28:07 UTC
I just tried again with the latest git, and the way I'm testing it does not work:

./tests/examples/playback/playback-test 0 file:///path/to/file

Enable the "loop" option and press play.

I tried with a FLAC file and a MP3 file. In both cases, playback reaches the end and does not loop.

How did you test a working example ?
Comment 5 Sebastian Dröge (slomo) 2015-04-03 18:57:58 UTC
There's also tests/icles/test-segment-seeks in gst-plugins-good. That one seems to work more or less, but there are weird artifacts.

Also changing it to repeat things, e.g. with start = start + SEGMENT_DURATION / 2;, seems to work except for artifacts.

(Testing this with MP4)


OTOH non-flushing seeks in general seem to be broken. Just doing them in playback-test causes playback to stop until you do a flushing seek again.


So I think what is broken here is not segment seeks... but non-flushing seeks. And really there is not much you can potentially do wrong with segment seeks vs non-segment seeks inside demuxers, and at least in qtdemux that looks absolutely correct. While non-flushing seeks require more work, and can easily cause things to go wrong because of miscalculations inside the segments.
Comment 6 Nicolas Dufresne (ndufresne) 2015-04-03 19:30:14 UTC
I just tried with playback-test, work "sometimes" with MOV, but fails with Matroska. I concluded it's not entirely playback-test fault even though it forgets to seek (hence update) from time to time. Let me attach that example I was playing with.
Comment 7 Sebastian Dröge (slomo) 2015-04-03 19:32:33 UTC
The artefacts I saw were because of gst-libav. Commenting out all lines in avviddec that flush the buffers made it work without artefacts. So also something to look at.


Then the gst-plugins-good example also fails completely on mewmew, which might be related to subtitles or matroska.

On MP4 the example works, it also works if you play [0,1],[0.5,1.5],[1,2],[1.5,2.5], etc... or [0,5], [5, 10], [5, 10], [5, 10], ...
But non-flushing seeks in playback-test are still broken on exactly the same file.
Comment 8 Nicolas Dufresne (ndufresne) 2015-04-03 19:34:38 UTC
Created attachment 300912 [details]
Test looping over a part of a file

This is also an experiment to fade audio with segment boundary, you can forget about this part. Over MOV it works for me (in master).
Comment 9 Sebastian Dröge (slomo) 2015-04-07 02:39:44 UTC
I pushed some changes in core, base and good (for the icles thing) related to this. For me the icles thing works now on the files I tested, including Matroska. Only remaining problem here is that avviddec seems to flush too much from its buffers, so there are always artefacts :) Not flushing the buffers however causes old ones to come out of nowhere and causes crashes every now and then.
Comment 10 Sebastian Dröge (slomo) 2015-04-07 02:45:00 UTC
Not sure how the "loop" thing in the playback-test app should work at all. The only thing it seems to do is to set the SEGMENT seek flag... which is a bit pointless without being able to set a stop position.
Comment 11 Sebastian Dröge (slomo) 2015-04-07 02:52:42 UTC
Ah nevermind, it just starts again from the beginning after receiving SEGMENT_DONE. Makes sense and works here now

Only thing that is completely broken is non-flushing seeks in other situations.
Comment 12 Sebastian Dröge (slomo) 2015-04-07 03:17:25 UTC
And this here fixes non-flushing seeks in general in qtdemux: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=bf95f93c0189aa04f18e264b86b6527e431c5d53

Worked fine Matroska before already.
Comment 13 Sebastian Dröge (slomo) 2015-04-26 18:06:18 UTC
Nicolas, anything else necessary to be done here? It all seems to work fine for me with MP4 and Matroska.
Comment 14 Nicolas Dufresne (ndufresne) 2015-05-24 15:33:52 UTC
I guess that it's for now. I think it's fine to backport bf95f93 to 1.4 branch.