Skip to content

Re-opening the timestamp issue here. #10235

@warrentc3

Description

@warrentc3

it's also worth noting that the packets can finish before a presentation of a video stream does.
the majority of the time, I extract my own timecodes (which i usually have from remuxing anyway), because dts gets the subs out of sync with the video... it became quite noticeable in some of the edits i did some time back where the alignment with the waveform clearly drifted as the playback went along.

here's an example of the command I ran to generate timecodes for a file for comparison (selecting keyframes only for readability). output has been heavily truncated(obviously). the source was an mkv that I remuxed to split a multi-episode file (explains why the timecode side data has a jump).

ffprobe.exe -hide_banner -loglevel error -skip_frame nointra -select_streams 'V:0' -show_frames -show_entries 'frame=key_frame,pts_time,pkt_dts_time,best_effort_timestamp_time:timecode=value:frame_tags=:side_data=:frame_side_data=:timecodes=' -output_format csv=nokey=0:print_section=0 'd:\test.mkv' | Where-Object { -not [string]::IsNullOrEmpty($_) }

key_frame=1,pts_time=0.000000,pkt_dts_time=1.919000,best_effort_timestamp_time=0.000000,value=00:00:00:00
key_frame=1,pts_time=1.001000,pkt_dts_time=2.920000,best_effort_timestamp_time=1.001000,value=00:00:01:00
key_frame=1,pts_time=2.002000,pkt_dts_time=3.921000,best_effort_timestamp_time=2.002000,value=00:00:02:00
key_frame=1,pts_time=3.003000,pkt_dts_time=4.922000,best_effort_timestamp_time=3.003000,value=00:00:03:00
key_frame=1,pts_time=4.004000,pkt_dts_time=5.923000,best_effort_timestamp_time=4.004000,value=00:00:04:00
key_frame=1,pts_time=5.005000,pkt_dts_time=6.924000,best_effort_timestamp_time=5.005000,value=00:00:05:00
key_frame=1,pts_time=58.016000,pkt_dts_time=59.935000,best_effort_timestamp_time=58.016000,value=00:00:57:23
key_frame=1,pts_time=59.017000,pkt_dts_time=60.477000,best_effort_timestamp_time=59.017000,value=00:00:58:23
key_frame=1,pts_time=60.018000,pkt_dts_time=60.936000,best_effort_timestamp_time=60.018000,value=00:00:59:23
key_frame=0,pts_time=60.561000,pkt_dts_time=61.995000,best_effort_timestamp_time=60.561000,value=00:01:00:12
key_frame=1,pts_time=61.077000,pkt_dts_time=62.996000,best_effort_timestamp_time=61.077000,value=00:01:00:23
key_frame=1,pts_time=62.078000,pkt_dts_time=63.997000,best_effort_timestamp_time=62.078000,value=00:01:01:23
key_frame=1,pts_time=63.079000,pkt_dts_time=64.998000,best_effort_timestamp_time=63.079000,value=00:01:02:23
key_frame=1,pts_time=64.080000,pkt_dts_time=65.999000,best_effort_timestamp_time=64.080000,value=00:01:03:23
key_frame=1,pts_time=65.081000,pkt_dts_time=67.000000,best_effort_timestamp_time=65.081000,value=00:01:04:23
key_frame=1,pts_time=66.082000,pkt_dts_time=68.001000,best_effort_timestamp_time=66.082000,value=00:01:05:23
key_frame=1,pts_time=354.078000,pkt_dts_time=355.997000,best_effort_timestamp_time=354.078000,value=00:05:53:16
key_frame=1,pts_time=355.079000,pkt_dts_time=356.998000,best_effort_timestamp_time=355.079000,value=00:05:54:16
key_frame=1,pts_time=356.080000,pkt_dts_time=357.999000,best_effort_timestamp_time=356.080000,value=00:05:55:16
key_frame=1,pts_time=357.081000,pkt_dts_time=359.000000,best_effort_timestamp_time=357.081000,value=00:05:56:16
key_frame=1,pts_time=358.082000,pkt_dts_time=359.584000,best_effort_timestamp_time=358.082000,value=00:05:57:16
key_frame=1,pts_time=748.730000,pkt_dts_time=750.648000,best_effort_timestamp_time=748.730000,value=00:23:28:12
key_frame=1,pts_time=749.731000,pkt_dts_time=751.190000,best_effort_timestamp_time=749.731000,value=00:23:29:12
key_frame=1,pts_time=750.732000,pkt_dts_time=752.191000,best_effort_timestamp_time=750.732000,value=00:23:30:12
key_frame=1,pts_time=751.274000,pkt_dts_time=753.192000,best_effort_timestamp_time=751.274000,value=00:23:31:01
key_frame=1,pts_time=752.275000,pkt_dts_time=N/A,best_effort_timestamp_time=752.275000,value=00:23:32:01
key_frame=1,pts_time=753.276000,pkt_dts_time=N/A,best_effort_timestamp_time=753.276000,value=00:23:33:01

Originally posted by @warrentc3 in #9144

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions