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 516041 - [Jokosher] Splitting mp3 and moving stops playback at the end of first piece
[Jokosher] Splitting mp3 and moving stops playback at the end of first piece
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal blocker
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-12 15:59 UTC by Peteris Krisjanis
Modified: 2008-06-05 10:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
GST_DEBUG=2,mad:5,gnl*:5 log of app activity, gzipped (94.48 KB, application/x-gzip)
2008-02-12 16:01 UTC, Peteris Krisjanis
  Details
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5 (899.70 KB, application/x-bzip)
2008-02-13 09:18 UTC, Peteris Krisjanis
  Details
mp3parse.diff (1.48 KB, patch)
2008-02-13 12:56 UTC, Sebastian Dröge (slomo)
none Details | Review
mp3parse.diff (2.27 KB, patch)
2008-02-13 13:02 UTC, Sebastian Dröge (slomo)
none Details | Review
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5 (982.53 KB, text/x-log)
2008-02-13 13:16 UTC, Peteris Krisjanis
  Details
mp3parse.diff (2.28 KB, patch)
2008-02-13 13:21 UTC, Sebastian Dröge (slomo)
committed Details | Review
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5 (592.87 KB, text/x-log)
2008-02-13 13:33 UTC, Peteris Krisjanis
  Details
oggdemux level 5 log (758.73 KB, text/plain)
2008-02-14 21:17 UTC, Felipe Contreras (banned)
  Details

Description Peteris Krisjanis 2008-02-12 15:59:54 UTC
Please describe the problem:
For some time ago last year MP3 seeking problem was fixed in Gstreamer. I tested it in January and it worked. However, now it fails.

Steps to reproduce:
Tradicional steps of this bug see https://bugs.launchpad.net/jokosher/+bug/191273


Actual results:
Jokosher fails to play futher than end of last piece

Expected results:
Jokosher plays piece and plays gap as silence between pieces

Does this happen every time?
Yes

Other information:
Log 2,mad*:5,gnl*:5
Comment 1 Peteris Krisjanis 2008-02-12 16:01:48 UTC
Created attachment 105062 [details]
GST_DEBUG=2,mad:5,gnl*:5 log of app activity, gzipped
Comment 2 Sebastian Dröge (slomo) 2008-02-13 07:50:50 UTC
Could you please attach a log with GST_DEBUG_NO_COLOR=1 GST_DEBUG=5? You probably have to bzip/gzip it.
Comment 3 Peteris Krisjanis 2008-02-13 09:18:15 UTC
Created attachment 105126 [details]
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5
Comment 4 Sebastian Dröge (slomo) 2008-02-13 09:42:33 UTC
Ok, it seems mp3parse doesn't handle segment seeks properly... and I wonder how it can handle them properly at all in push mode.

Upstream (which runs the pipeline), is supposed to post SEGMENT_START/SEGMENT_END messages on the bus. It unfortunately only knows about bytes, not time and it doesn't even know that this is a segment seek if we do accurate seeks (as mp3parse needs all data for time tracking anyway).

Any idea how to support segments seeks in push based elements at all?
Comment 5 Sebastian Dröge (slomo) 2008-02-13 12:56:50 UTC
Created attachment 105136 [details] [review]
mp3parse.diff
Comment 6 Sebastian Dröge (slomo) 2008-02-13 13:02:57 UTC
Created attachment 105138 [details] [review]
mp3parse.diff

improve debugging
Comment 7 Peteris Krisjanis 2008-02-13 13:16:04 UTC
Created attachment 105141 [details]
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5

Additional log with newest patch applied.
Comment 8 Sebastian Dröge (slomo) 2008-02-13 13:21:04 UTC
Created attachment 105142 [details] [review]
mp3parse.diff
Comment 9 Peteris Krisjanis 2008-02-13 13:33:29 UTC
Created attachment 105143 [details]
GST_DEBUG_NO_COLOR=1 GST_DEBUG=mp3parse:5

Additional log after last patch.
Comment 10 Jan Schmidt 2008-02-13 17:08:22 UTC
slomo: Does this patch actually fix the bug?
Comment 11 Sebastian Dröge (slomo) 2008-02-13 21:41:48 UTC
Unfortunately not and I have no idea what exactly causes this bug yet :/
The patch is correct though, will commit after release ;)
Comment 12 Jan Schmidt 2008-02-13 23:16:37 UTC
Oh well. I'm going to make the pre-releases. Perhaps you'll be able to merge a fix before Monday.
Comment 13 Felipe Contreras (banned) 2008-02-13 23:18:51 UTC
The patch doesn't fix the issue.

Actually I tested with a vorbis clip and I had the same issue.

I tried to get a log with GST_DEBUG=oggdemux:4 and it worked just fine, then I tried with GST_DEBUG=oggdemux:3 and it failed the same way as with the MP3.
Comment 14 Peteris Krisjanis 2008-02-14 09:43:22 UTC
Interesting. I was aware that there is bug for Ogg Vorbis, which acted like this:
1) Import Ogg Vorbis file in Jokosher
2) Split it in several segments
3) move them so they have space between them, some secs
4) Do playback

Result: End of each segment gets "eaten", t.i. sound gets cut off, however, next segment starts precisely on time.

It bears some similarity to this bug (as in this bug, cursor gets freezen for some time), but I am not very sure that they technically the same. However, it seems Ogg Vorbis error don't mix spaces and segments starts on time.

It is kinda sad that this seems to be hard to fix, because it worked in January. I will try to get CVS from that date and test it and then give some logs/info about that.
Comment 15 Felipe Contreras (banned) 2008-02-14 09:54:20 UTC
I tried exactly the same thing on my work laptop, which is much more powerful, and there are no issues with any debug level, vorbis or MP3.

I hear a small segment of sound that is not supposed to be there, but that's it.
Comment 16 Sebastian Dröge (slomo) 2008-02-14 12:30:03 UTC
Ok, this seems to be a bug in core or base then as it also happens with ogg files.

Now lets summarize the two bugs that happen here:

a) Trying to play two segments of a file, for example from 0 to 5 seconds and then from 6 to 9 seconds. Between the two segments there's a pause of ~5 seconds (maybe because that's the duration of the previous segment? bug from gst-plugins-base 0.10.15 comes to mind). From the log it seems that something waits exactly that time after mp3parse returns UNEXPECTED and before it gets the next newsegment event.
Question now is, whether this only happens to segment seeks or all seeks and whether the state changes matter. Peteris tries to write a simple test case for this one.

This also only happens on some machines with latest CVS, probably slower ones.


b) Trying to play a segment of a file in jokosher, for example going from 2 to 5 seconds. Here something weird happens now, mp3parse gets a [0,-1] newsegment, pushes ~100 ms of buffers and then finally gets the [2,5] newsegment event and does the right thing. Felipe gets this with MP3s and Oggs too and it can be seen from Peteris log.
Comment 18 Sebastian Dröge (slomo) 2008-02-14 13:56:26 UTC
For a) Ok, as rebuilding everything from CVS "fixes" this it's not exactly a bug.


For b) That's a jokosher bug, it shouldn't use gnlfilesource but singledecodebin or whatever else pitivi uses. This will fix this bug and a bunch of others too probably.
Comment 19 Felipe Contreras (banned) 2008-02-14 21:17:11 UTC
Created attachment 105282 [details]
oggdemux level 5 log
Comment 20 Felipe Contreras (banned) 2008-02-14 21:17:43 UTC
The issue is not fixed with latest CVS stuff from today, neither for oggdemux nor mp3parse.

The problem I'm having is not a) or b) is something different. The playback stops completely before the split, as described in title of the bug.

I'm attaching the last part of a log with oggdemux stopping completely. This is with latest gstreamer, gst-plugins-{base,good,ugly}.
Comment 21 Jan Schmidt 2008-03-04 00:05:47 UTC
I'm doing the 0.10.17.2 pre-release with this bug still open. It needs resolving before the release itself (which is March 17th)
Comment 22 Felipe Contreras (banned) 2008-03-04 11:05:45 UTC
I think the consensus was to wait for the new Jokosher, or Gnolin, I can't remember.
Comment 23 Peteris Krisjanis 2008-03-04 12:32:47 UTC
Consesnus was to port Jokosher from using gnlfilesource to gnlsource + simpledecodebin and see if it really makes bug to disappear. This is done partly, as I have ran into serveral interesting problems. However, I need some assistance to finish it. I hope to deal with it during this working week.
Comment 24 Sebastian Dröge (slomo) 2008-05-05 15:35:44 UTC
Felipe, Peteris? Any news on this?
Comment 25 Jan Schmidt 2008-06-04 22:04:31 UTC
Hrmn, this bug is still open - any progress?
Comment 26 Sebastian Dröge (slomo) 2008-06-05 06:08:51 UTC
Probably not, I've asked in #jokosher but no answer yet.
Comment 27 Peteris Krisjanis 2008-06-05 09:26:23 UTC
This bug is gone with newest gst cvs and Jokosher svn, as we did convertion from gnlfilesource to gnlsource + simpledecodebin. Thanks people for suggestions.