[FFmpeg-user] Converting DTS (timestamps) in mpegts to HH:MM:SS:FF

Kieran O Leary kieran.o.leary at gmail.com
Tue Jun 16 11:40:05 EEST 2020

OK, so I figured out that the dts needs to be divided by pkt_duration_time,
which in this instance was 3600. Not sure how to get that aside from using
ffprobe as I don't see it listed in the ffmpeg output.
And I also realised via this  https://github.com/bavc/qctools/issues/291
that just pulling frame level data via ffprobe is a better way to get this
ffprobe  2.m2t -show_log 16 -show_frames -of xml  > bla.xml

gives me lovely stuff like this:
     <frame media_type="video" stream_index="0" key_frame="0"
pkt_pts="5317200" pkt_pts_time="59.080000" pkt_dts="5317200"
pkt_dts_time="59.080000" best_effort_timestamp="5317200"
best_effort_timestamp_time="59.080000" pkt_duration="3600"
pkt_duration_time="0.040000" pkt_pos="180487708" pkt_size="183288"
width="1440" height="1080" pix_fmt="yuv420p" sample_aspect_ratio="4:3"
pict_type="P" coded_picture_number="1378" display_picture_number="0"
interlaced_frame="1" top_field_first="1" repeat_pict="0" color_range="tv"
color_space="bt709" color_primaries="bt709" color_transfer="bt709"
                <log context="mpeg2video" level="16" category="6"
message="[mpeg2video @ 000001df0605e000] ac-tex damaged at 84 42"/>
                <log context="mpeg2video" level="16" category="6"
message="[mpeg2video @ 000001df0605e000] Warning MVs not available"/>
                <side_data side_data_type="AVPanScan"/>
                <side_data side_data_type="QP table data"/>
                <side_data side_data_type="QP table properties"/>



More information about the ffmpeg-user mailing list