splitmuxsink and timestamps
Filip Štědronský
r.ml at regnarg.cz
Thu May 31 11:52:32 UTC 2018
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
More information about the gstreamer-devel
mailing list