AW: splitmuxsink and timestamps

Thornton, Keith keith.thornton at zeiss.com
Mon Jun 4 06:33:32 UTC 2018


This is what splitmuxsink is supposed to do. The files can then be played in sequence using splitmuxsrc.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Filip Štedronský
Gesendet: Donnerstag, 31. Mai 2018 13:53
An: gstreamer-devel at lists.freedesktop.org
Betreff: splitmuxsink and timestamps

Hi all,

I'm trying to use splitmuxsink to split a video into several segments like
this:

    gst-launch-1.0  -e filesrc location=input.mkv ! matroskademux ! h264parse     \
                       ! splitmuxsink location=%02d.mkv max-size-time=15000000000 \
                       muxer=matroskamux

The problem is that all the created segments keep the original timestamps. For example, the timestamps of the second segment start at 0:15 instead of 0:00:


    $ mkvinfo -v 00.mkv
    [...]
    | + Duration: 00:00:14.540000000
    [...]
    |+ Cluster
    | + Cluster timestamp: 00:00:00.000000000
    | + Simple block: key, track number 1, 1 frame(s), timestamp 00:00:00.000000000
    [...]

versus:

    $ mkvinfo -v 01.mkv
    [...]
    | + Duration: 00:00:13.964000000
    [...]
    |+ Cluster
    | + Cluster timestamp: 00:00:14.580000000
    | + Simple block: key, track number 1, 1 frame(s), timestamp 00:00:14.580000000
    [...]

This causes problems with seeking e.g. in mpv.

Is this by design or a bug?

Could a "reset timestamps at start of each segment" option be added?
(akin to -reset_timestamps option in ffmpeg)

Is there some other way to fix the timestamps using other gstreamer elements? (googling hasn't yielded much)

The used test files are (but any mkv file will do):
    http://regnarg.cz/tmp/input.mkv
    http://regnarg.cz/tmp/00.mkv
    http://regnarg.cz/tmp/01.mkv

Thanks for any pointers.

Filip Stedronsky
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list