Hi guys,

I'm using ffmpeg to mux variable framerate source to MKV format, each frame
I send to av_write_frame has correct timestamp and duration set.

Because it's variable frame rate source, I set codecctx->time_base = 1/1000
(because timestamp is in miliseconds)

The generated MKV file however, if dumped by ffprobe -show_frames
-select_streams v, pkt_duration = 1. (thats 1/1000 second, not the duration
I set to avframe).

After some investigation, *I found that video packet is written
by mkv_write_block, which always write simple block instead of block group,
so that blockduration (which is not a child of simple block) is never
written.*

*But the mkv spec says: Block duration is mandatory when DefaultDuration is
set for the track.
https://www.matroska.org/technical/specs/index.html#Cluster
<https://www.matroska.org/technical/specs/index.html#Cluster>*
*Ffmpeg does write the default track duration in mkv_write_track,but
doesn't write block duration, is that a possible bug?*

Thanks
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to