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 614460 - matroskademux: wrong H.264 demux in some file
matroskademux: wrong H.264 demux in some file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.21
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-31 13:20 UTC by Changwoo Ryu
Modified: 2010-04-07 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Disable syncing for non-subtitle streams (1.16 KB, patch)
2010-03-31 16:03 UTC, Mark Nauwelaerts
committed Details | Review

Description Changwoo Ryu 2010-03-31 13:20:20 UTC
I found a H264 video which was not played correctly. The matroskademux element seems to lost some H264 data. I made a short sample (~7MB, about 12 seconds):

http://people.debian.org/~cwryu/bugs/gst-matroskademux.mkv

With the following command, video stops after about 5 seconds from the start. 

$ gst-launch filesrc location=gst-matroskademux.mkv ! matroskademux ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink

It can be played correctly using ffdemux_matroska instead of matroskademux .

$ gst-launch filesrc location=gst-matroskademux.mkv ! ffdemux_matroska ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink
Comment 1 Mark Nauwelaerts 2010-03-31 16:03:23 UTC
Created attachment 157606 [details] [review]
Disable syncing for non-subtitle streams

It looks like this sample is not really muxed appropriately interleaved, that is, the audio data comes in rather big chunks, e.g.
----
| + SimpleBlock (key, track number 2, 8 frame(s), timecode 4.864s = 00:00:04.864000000)
|   + Frame with size 7423
|   + Frame with size 7488
|   + Frame with size 7785
|   + Frame with size 7716
|   + Frame with size 8319
|   + Frame with size 8827
|   + Frame with size 8475
|   + Frame with size 7676
<....>
| + SimpleBlock (key, track number 2, 8 frame(s), timecode 5.547s = 00:00:05.547000000)
|   + Frame with size 7684
|   + Frame with size 8208
|   + Frame with size 7731
|   + Frame with size 8097
|   + Frame with size 7886
|   + Frame with size 7983
|   + Frame with size 8402
|   + Frame with size 8995
----

This leads to lots of newsegment events from matroskademux resync mechanics.

I am not sure what can be done with such irregular interleaving.  Pending other suggestions or inspiration for some creative heuristic, attached patch naively restricts the current sync done to subtitle tracks only (which is/was likely the intention in the first place).

It turns out that increasing the lag to 1 sec (in stead of 0.5 sec) also works in this case, if there were arguments to go this way instead ...
Comment 2 Sebastian Dröge (slomo) 2010-04-02 17:05:03 UTC
1 second for the gaps is fine too I guess... I don't care much, both are workarounds ;)

After bug #611194 is fixed the resyncing should happen for all streams though
Comment 3 Sebastian Dröge (slomo) 2010-04-07 10:04:18 UTC
Mark, please push one of the two possible patches to get this fixed before -good freezes again :)
Comment 4 Mark Nauwelaerts 2010-04-07 10:52:13 UTC
I did not realize things were turning cold again ;)

Let's stick to the original one:

commit dc09ace2bdb3447f35bab7aed57acd80372ea8b3
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Wed Mar 31 17:54:21 2010 +0200

    matroskademux: restrict resyncing to subtitle tracks

    This should prevent skipping audio or video in not so well interleaved
    cases.

    Fixes #614460.