Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#8725 closed defect (invalid)

ffprobe microseconds rounding error

Reported by: markfilipak Owned by:
Priority: minor Component: ffprobe
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
For a 24/1.001 FPS video, ffprobe is reporting 'frames.frame.x.pkt_duration_time="0:00:00.041700"' instead of 'frames.frame.x.pkt_duration_time="0:00:00.041708"'. The rounding to microseconds is off.

How to reproduce:

% ffprobe -i input
ffmpeg version ffmpeg-20200610-9dfb19b-win64-static
built on 20200610

Change History (13)

comment:1 by Carl Eugen Hoyos, 4 years ago

Priority: normalminor

Please provide the command line you tested together with the complete, uncut console output and attach an input sample to make this a valid ticket.

comment:2 by markfilipak, 4 years ago

I hope the problem (Priority) is "minor" and not a symptom of a deeper error.

The command line:
@ffprobe -hide_banner -sexagesimal -select_streams v -show_frames -of flat -read_intervals %%+#5404 -i %1 | FINDSTR /L "e.9 e.18 e.27 e.36 e.45 e.54" | FINDSTR /L "00.b 00.i 00.p 00.r 00.t 01.i 01.pkt_dur 01.r 01.t 02.i 02.pkt_dur 02.r 02.t 03.i 03.pkt_dur 03.r 03.t 04.i 04.pkt_dur 04.r 04.t" | FINDSTR /L "_time= _frame= _first= _pict=" & @ECHO. & CMD /K

Samples:
I could probably list every blu-ray movie I own. Pick any of these tested blu-ray movies:
A.I., Artificial Intelligence [2001] 097361244440
ALIEN [1979][2003] 024543711193
APOCALYPSE NOW [1979][2000] 031398126195
CAST AWAY [2000] 024543581734
DAS BOOT [1981] 043396451070
PATTON [1969] 024543835332
THE GODFATHER [1972] 097360756647
THE GOOD, THE BAD AND THE UGLY [1966] 883904362791
The Last Emperor [1987] 715515033725

PS: If you submit to the shell instead of in a script, change "%%+#5404" to "%+#5404" first.

Last edited 4 years ago by markfilipak (previous) (diff)

comment:3 by mkver, 4 years ago

Let me guess: Your input files are Matroska with a TimestampScale of 1000000 (i.e. ms precision)? (In this case the result you are seeing stems from the duration fields having ms precision (even when the container is able to specify a more precise duration via its DefaultDuration).)

in reply to:  3 comment:4 by markfilipak, 4 years ago

Replying to mkver:

Let me guess: Your input files are Matroska...

On a blu-ray disc? Hardly.

comment:5 by Carl Eugen Hoyos, 4 years ago

Resolution: needs_more_info
Status: newclosed

Feel free to reopen this ticket if you can provide a command line without hide_banner including the complete, uncut console output and an input sample.

comment:6 by markfilipak, 4 years ago

Resolution: needs_more_info
Status: closedreopened

The command line:
ffprobe -sexagesimal -select_streams v -show_frames -of flat -read_intervals %+#5404 -i 00000.m2ts | FINDSTR /L "e.9 e.18 e.27 e.36 e.45 e.54" | FINDSTR /L "00.b 00.i 00.p 00.r 00.t 01.i 01.pkt_dur 01.r 01.t 02.i 02.pkt_dur 02.r 02.t 03.i 03.pkt_dur 03.r 03.t 04.i 04.pkt_dur 04.r 04.t" | FINDSTR /L "_time= _frame= _first= _pict="

Output:
G:\BDMV\STREAM>ffprobe -sexagesimal -select_streams v -show_frames -of flat -read_intervals %+#5404 -i 00000.m2ts | FINDSTR /L "e.9 e.18 e.27 e.36 e.45 e.54" | FINDSTR /L "00.b 00.i 00.p 00.r 00.t 01.i 01.pkt_dur 01.r 01.t 02.i 02.pkt_dur 02.r 02.t 03.i 03.pkt_dur 03.r 03.t 04.i 04.pkt_dur 04.r 04.t" | FINDSTR /L "_time= _frame= _first= _pict=" & @ECHO. & CMD /K
ffprobe version git-2020-06-10-9dfb19b Copyright (c) 2007-2020 the FFmpeg developers

built with gcc 9.3.1 (GCC) 20200523
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 52.100 / 56. 52.100
libavcodec 58. 92.100 / 58. 92.100
libavformat 58. 46.101 / 58. 46.101
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100

[mpegts @ 0000023139f00700] start time for stream 7 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 8 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 9 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 10 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 11 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 12 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 13 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] start time for stream 14 is not set in estimate_timings_from_pts
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 13 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000023139f00700] Could not find codec parameters for stream 14 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '00000.m2ts':

Duration: 02:57:09.12, start: 11.650667, bitrate: 36115 kb/s
Program 1

Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s32 (24 bit)
Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:7[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:8[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:9[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:10[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:11[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:12[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:13[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:14[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

frames.frame.900.pkt_pts_time="0:00:49.188167"
frames.frame.900.pkt_dts_time="0:00:49.313289"
frames.frame.900.best_effort_timestamp_time="0:00:49.188167"
frames.frame.900.pkt_duration_time="0:00:00.041700" <<<<<----- should be "0:00:00.041708"
frames.frame.900.interlaced_frame=0
frames.frame.900.top_field_first=0
frames.frame.900.repeat_pict=0
frames.frame.901.pkt_duration_time="0:00:00.041700"
frames.frame.901.interlaced_frame=0
frames.frame.901.top_field_first=0
frames.frame.901.repeat_pict=0
frames.frame.902.pkt_duration_time="0:00:00.041700"
frames.frame.902.interlaced_frame=0
frames.frame.902.top_field_first=0
frames.frame.902.repeat_pict=0
frames.frame.903.pkt_duration_time="0:00:00.041700"
frames.frame.903.interlaced_frame=0
frames.frame.903.top_field_first=0
frames.frame.903.repeat_pict=0
frames.frame.904.pkt_duration_time="0:00:00.041700"
frames.frame.904.interlaced_frame=0
frames.frame.904.top_field_first=0
frames.frame.904.repeat_pict=0
frames.frame.1800.pkt_pts_time="0:01:26.725667"
frames.frame.1800.pkt_dts_time="0:01:26.850789"
frames.frame.1800.best_effort_timestamp_time="0:01:26.725667"
frames.frame.1800.pkt_duration_time="0:00:00.041700"
frames.frame.1800.interlaced_frame=0
frames.frame.1800.top_field_first=0
frames.frame.1800.repeat_pict=0
frames.frame.1801.pkt_duration_time="0:00:00.041700"
frames.frame.1801.interlaced_frame=0
frames.frame.1801.top_field_first=0
frames.frame.1801.repeat_pict=0
frames.frame.1802.pkt_duration_time="0:00:00.041700"
frames.frame.1802.interlaced_frame=0
frames.frame.1802.top_field_first=0
frames.frame.1802.repeat_pict=0
frames.frame.1803.pkt_duration_time="0:00:00.041700"
frames.frame.1803.interlaced_frame=0
frames.frame.1803.top_field_first=0
frames.frame.1803.repeat_pict=0
frames.frame.1804.pkt_duration_time="0:00:00.041700"
frames.frame.1804.interlaced_frame=0
frames.frame.1804.top_field_first=0
frames.frame.1804.repeat_pict=0
frames.frame.2700.pkt_pts_time="0:02:04.263167"
frames.frame.2700.pkt_dts_time="0:02:04.388289"
frames.frame.2700.best_effort_timestamp_time="0:02:04.263167"
frames.frame.2700.pkt_duration_time="0:00:00.041700"
frames.frame.2700.interlaced_frame=0
frames.frame.2700.top_field_first=0
frames.frame.2700.repeat_pict=0
frames.frame.2701.pkt_duration_time="0:00:00.041700"
frames.frame.2701.interlaced_frame=0
frames.frame.2701.top_field_first=0
frames.frame.2701.repeat_pict=0
frames.frame.2702.pkt_duration_time="0:00:00.041700"
frames.frame.2702.interlaced_frame=0
frames.frame.2702.top_field_first=0
frames.frame.2702.repeat_pict=0
frames.frame.2703.pkt_duration_time="0:00:00.041700"
frames.frame.2703.interlaced_frame=0
frames.frame.2703.top_field_first=0
frames.frame.2703.repeat_pict=0
frames.frame.2704.pkt_duration_time="0:00:00.041700"
frames.frame.2704.interlaced_frame=0
frames.frame.2704.top_field_first=0
frames.frame.2704.repeat_pict=0
frames.frame.3600.pkt_pts_time="0:02:41.800667"
frames.frame.3600.pkt_dts_time="0:02:41.925789"
frames.frame.3600.best_effort_timestamp_time="0:02:41.800667"
frames.frame.3600.pkt_duration_time="0:00:00.041700"
frames.frame.3600.interlaced_frame=0
frames.frame.3600.top_field_first=0
frames.frame.3600.repeat_pict=0
frames.frame.3601.pkt_duration_time="0:00:00.041700"
frames.frame.3601.interlaced_frame=0
frames.frame.3601.top_field_first=0
frames.frame.3601.repeat_pict=0
frames.frame.3602.pkt_duration_time="0:00:00.041700"
frames.frame.3602.interlaced_frame=0
frames.frame.3602.top_field_first=0
frames.frame.3602.repeat_pict=0
frames.frame.3603.pkt_duration_time="0:00:00.041700"
frames.frame.3603.interlaced_frame=0
frames.frame.3603.top_field_first=0
frames.frame.3603.repeat_pict=0
frames.frame.3604.pkt_duration_time="0:00:00.041700"
frames.frame.3604.interlaced_frame=0
frames.frame.3604.top_field_first=0
frames.frame.3604.repeat_pict=0
frames.frame.4500.pkt_pts_time="0:03:19.338167"
frames.frame.4500.pkt_dts_time="0:03:19.463289"
frames.frame.4500.best_effort_timestamp_time="0:03:19.338167"
frames.frame.4500.pkt_duration_time="0:00:00.041700"
frames.frame.4500.interlaced_frame=0
frames.frame.4500.top_field_first=0
frames.frame.4500.repeat_pict=0
frames.frame.4501.pkt_duration_time="0:00:00.041700"
frames.frame.4501.interlaced_frame=0
frames.frame.4501.top_field_first=0
frames.frame.4501.repeat_pict=0
frames.frame.4502.pkt_duration_time="0:00:00.041700"
frames.frame.4502.interlaced_frame=0
frames.frame.4502.top_field_first=0
frames.frame.4502.repeat_pict=0
frames.frame.4503.pkt_duration_time="0:00:00.041700"
frames.frame.4503.interlaced_frame=0
frames.frame.4503.top_field_first=0
frames.frame.4503.repeat_pict=0
frames.frame.4504.pkt_duration_time="0:00:00.041700"
frames.frame.4504.interlaced_frame=0
frames.frame.4504.top_field_first=0
frames.frame.4504.repeat_pict=0
frames.frame.5400.pkt_pts_time="0:03:56.875667"
frames.frame.5400.pkt_dts_time="N/A"
frames.frame.5400.best_effort_timestamp_time="0:03:56.875667"
frames.frame.5400.pkt_duration_time="0:00:00.041700"
frames.frame.5400.interlaced_frame=0
frames.frame.5400.top_field_first=0
frames.frame.5400.repeat_pict=0
frames.frame.5401.pkt_duration_time="0:00:00.041700"
frames.frame.5401.interlaced_frame=0
frames.frame.5401.top_field_first=0
frames.frame.5401.repeat_pict=0
frames.frame.5402.pkt_duration_time="0:00:00.041700"
frames.frame.5402.interlaced_frame=0
frames.frame.5402.top_field_first=0
frames.frame.5402.repeat_pict=0
frames.frame.5403.pkt_duration_time="0:00:00.041700"
frames.frame.5403.interlaced_frame=0
frames.frame.5403.top_field_first=0
frames.frame.5403.repeat_pict=0

Samples: I can't provide samples because the input is copyrighted. Choose any M2TS movie file on a blu-ray disc in your possession.

Last edited 4 years ago by markfilipak (previous) (diff)

comment:7 by Elon Musk, 4 years ago

I highly suggest to immediately close this ticket under grounds that there is no will to share samples.

comment:8 by Balling, 4 years ago

What? Rounding error is +- 1. In least significant digit.

Last edited 4 years ago by Balling (previous) (diff)

comment:9 by Carl Eugen Hoyos, 4 years ago

Resolution: needs_more_info
Status: reopenedclosed

comment:10 by markfilipak, 4 years ago

What more information do you need, Carl Eugen?

And Balling is right. It's not a rounding error. If it was a rounding error, then there would be a +/- .000001 discrepancy -- 0:00:00.041708 would be 0:00:00.041707 or 0:00:00.041709. What I see is a whole digit ...gone. That's not rounding. That's something else.

comment:11 by Balling, 3 years ago

Resolution: needs_more_info
Status: closedreopened

I can confirm that on WHITEOUT Blu-ray. It is VC1 actually, not even AVC (key frames are recognized correctly for VC1 in m2ts).
pkt.duration 3753 is indeed 3753/90000 == 0.041700

Then again, 3754 (remember that number is from DTS and PTS) /90000 == 0.0417111 which is too big.

So, I suppose DTS and PTS are not correctly applied for 24/1.001??? So I will reopen this, just in spite of all those crazy issues with CFR becoming VRF. Some more comments are needed here.

Last edited 3 years ago by Balling (previous) (diff)

comment:12 by Elon Musk, 3 years ago

Resolution: invalid
Status: reopenedclosed

comment:13 by Balling, 3 years ago

Here is the answer: https://superuser.com/a/1373512/1033761

Apparently to use both 3753 and 3754 is a bad idea. So...

Note: See TracTickets for help on using tickets.