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 639710 - matroskamux: seeking messed up when remuxing H.264
matroskamux: seeking messed up when remuxing H.264
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-17 01:48 UTC by Tim-Philipp Müller
Modified: 2018-11-03 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2011-01-17 01:48:28 UTC
Remuxing H.264 from matroska to matroska like:

  ... demuxer.video_00 ! queue  ! muxer.video_0 ...

creates a file with a broken index. When seeking, we don't seem to land on a keyframe, but any frame. After a few seconds, at the next keyframe, the garbage clears up again.
Comment 1 Mark Nauwelaerts 2011-01-17 08:44:17 UTC
That is likely because (version 1) matroska files do not contain any keyframe information in the block data, so outgoing buffers cannot be marked properly that way, and the muxing matroskamux does not stand much of a chance then.

Seeking works in the original matroska because the index contains "seek points" (which presumably then point to keyframes, though not necessarily all of them, and these are likely to be found at cluster starts, but that is not certain either ...).
Comment 2 Sebastian Dröge (slomo) 2011-01-19 20:01:19 UTC
There's not much we can do about this if it's really caused by a Matroska v1 file. You can only add h264parse between the demuxer and muxer to correctly mark buffers as keyframe or not.

Is this a Matroska v1 file?
Comment 3 Edward Hervey 2013-07-24 07:27:33 UTC
fwiw putting h264parse between demuxer and muxer won't fix the issue because ... it will work in passthrough. We should have a way to force-disable passthrough in parsers for these use-cases.
Comment 4 Tim-Philipp Müller 2013-07-24 11:40:23 UTC
Ideally we should try to do something better by default. If we require a property to be enabled, it means we fail most people most of the time, because most app writers don't know that's needed etc.

Should matroskademux maybe set keyframe flags based on the index as well, if it doesn't do that yet?

Maybe h264parse should never operate in passthrough mode until it has gotten a buffer marked as keyframe?
Comment 5 Matej Knopp 2013-09-27 11:14:58 UTC
I've bitten by H.264 parse being in passthrough as well. Don't like that behavior much. I think when parser sets parsed=true it should parse the file, even if the input is packetized.
Comment 6 Sebastian Dröge (slomo) 2013-10-01 21:48:19 UTC
(In reply to comment #4)
> Ideally we should try to do something better by default. If we require a
> property to be enabled, it means we fail most people most of the time, because
> most app writers don't know that's needed etc.
> 
> Should matroskademux maybe set keyframe flags based on the index as well, if it
> doesn't do that yet?

No, because the index could point to arbitrary frames too.

> Maybe h264parse should never operate in passthrough mode until it has gotten a
> buffer marked as keyframe?

Yes, and until it saw any other signs of upstream providing a parsed stream.
Comment 7 GStreamer system administrator 2018-11-03 14:43:07 UTC
-- 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-good/issues/38.