Opened 10 months ago
Closed 10 months ago
#10799 closed defect (invalid)
Extend ffprobe/vf_showinfo time field to milliseconds
Reported by: | Andrew-R | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | time |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
ffmpeg -i ~/6029.mp4 -copyts -avoid_negative_ts make_zero -c:v copy -c:a pcm_s16le -to 64.600 /dev/shm/6029_cut_2.mp4 ffmpeg version N-112149-ga87a52ed0b Copyright (c) 2000-2024 the FFmpeg developers built with gcc 11.2.0 (GCC) ffprobe /dev/shm/6029_cut_2.mp4 ffprobe version N-112149-ga87a52ed0b Copyright (c) 2007-2024 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: libavutil 58. 36.101 / 58. 36.101 libavcodec 60. 37.100 / 60. 37.100 libavformat 60. 20.100 / 60. 20.100 libavdevice 60. 4.100 / 60. 4.100 libavfilter 9. 17.100 / 9. 17.100 libswscale 7. 6.100 / 7. 6.100 libswresample 4. 13.100 / 4. 13.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/6029_cut_2.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf60.20.100 Duration: 00:01:04.68, start: 0.080000, bitrate: 2273 kb/s Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, 734 kb/s, 25 fps, 25 tbr, 90k tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : JVT/AVC Coding Stream #0:1[0x2](und): Audio: pcm_s16le (ipcm / 0x6D637069), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0]
Note that ffprobe output says "Duration: 00:01:04.68" while MB4Box --info says:
MP4Box -info /dev/shm/6029_cut_2.mp4 * Movie Info * Timescale 1000 - 2 tracks Computed Duration 00:01:04.879 - Indicated Duration 00:01:04.879 Fragmented File: no File Brand isom - version 512 Compatible brands: isom iso2 avc1 mp41 Created: UNKNOWN DATE Modified: UNKNOWN DATE File has no MPEG4 IOD/OD iTunes Info: Encoder Software: Lavf60.20.100 1 UDTA types: meta (1) Track # 1 Info - TrackID 1 - TimeScale 90000 Media Duration 00:01:04.680 - Indicated Duration 00:01:04.800 Track has 2 edit lists: track duration is 00:01:04.879 Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 1617 samples Visual Sample Entry Info: width=720 height=400 (depth=24 bits) Visual Track layout: x=0 y=0 width=720 height=400 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 720 x 400 AVC Info: 1 SPS - 1 PPS - Profile High @ Level 3 NAL Unit length bits: 32 Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8 SPS#1 hash: E2ADECEA8531A9FC07EE08593AF65A2AD75A3533 PPS#1 hash: 6BBE60BFBE383CE9144FA78B782534A704912778 Self-synchronized RFC6381 Codec Parameters: avc1.64001E Average GOP length: 231 samples Max sample duration: 3600 / 90000 Track # 2 Info - TrackID 2 - TimeScale 48000 Media Duration 00:01:04.597 - Indicated Duration 00:01:04.597 Track has 2 edit lists: track duration is 00:01:04.699 Media Info: Language "Undetermined (und)" - Type "soun:ipcm" - 3100672 samples Unknown track type RFC6381 Codec Parameters: ipcm Alternate Group ID 1 All samples are sync Max sample duration: 1 / 48000
Note "track duration is 00:01:04.699"
I think extending ffprobe and vf_showinfo output to include milliseconds will be helpful in bugreporting about cut time inconsistencies
ffmpeg -i /dev/shm/6029_cut_2.mp4 -vf showinfo -f null /dev/null [skip] [Parsed_showinfo_0 @ 0xee102580] n:1616 pts:5828400 pts_time:64.76 duration: 0 duration_time:0 fmt:yuv420p cl:left sar:0/1 s:720x400 i:P iskey:0 type:P checksum:07418607 plane_checksum:[A672B48D A7D7BD5B 3D4D1410] mean:[83 158 79] stdev:[9.7 2.3 7.0] [Parsed_showinfo_0 @ 0xee102580] color_range:tv color_space:smpte170m color_primaries:smpte170m color_trc:bt709
Note pts_time:64.76
Change History (2)
comment:1 by , 10 months ago
comment:2 by , 10 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
There is a limitation with time value displays in showinfo but this is not it. showinfo uses a field width of 7 characters, so it can and does display e.g. 2.96667
. When there are fewer characters shown, it means the remaining digits are 0 i.e. pts_time:1
indicates 1.00000
.
As for ffprobe, using the bare command will just show the input dump (same as ffmpeg) which is meant to be a summary display. For precision, you should use the sectional display. For input container duration, you would use
ffprobe -show_entries format=duration -i INPUT
which will print with microsecond precision, e.g.
[FORMAT] duration=179.468005 [/FORMAT]
I have nothing to do with this ticket and was not consulted.
--Mark Filipak.