[FFmpeg-user] How can I force a 360kHz time base?

Jim DeLaHunt list+ffmpeg-user at jdlh.com
Sat Feb 27 03:05:11 EET 2021


On 2021-02-26 15:40, Mark Filipak (ffmpeg) wrote:

> 'ffmpeg -i input.mkv -vf "settb=expr=1/360000,showinfo" -codec:a copy 
> -codec:s copy -dn output.mkv'
> partial output shown below.
>
> input.mkv is 30.1.001fps constant frame rate. I expected deltaPTS to 
> be 12012.
>
> Look at the 1st frame:
> (0.033s/frame)*(360000ticks/s) = 11880ticks/frame,
> instead of:
> ((1.001/30)s/frame)*(360000ticks/s) = 12012ticks/frame.
>
> Why is that? It destroys the resolution improvement of the 
> 1/(360000Hz) time base.
>
> [Parsed_showinfo_1 @ 00000211128f2340] n:   1 pts:  11880 
> pts_time:0.033   pos:    10052 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:B checksum:3CF10BFE plane_checksum:[64208370 00B13226 
> C5775659] mean:[25 126 131] stdev:[12.8 6.1 1.6]
> [Parsed_showinfo_1 @ 00000211128f2340] n:   2 pts:  24120 
> pts_time:0.067   pos:     9213 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:B checksum:23A8A65F plane_checksum:[90DC2AA6 37E908C8 
> 779972F1] mean:[27 125 132] stdev:[14.8 7.1 1.9]
> [Parsed_showinfo_1 @ 00000211128f2340] n:   3 pts:  36000 
> pts_time:0.1     pos:    11086 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:B checksum:1CDF7A80 plane_checksum:[089DE80E C537F4C0 
> 8C4E9D94] mean:[29 125 132] stdev:[15.2 6.6 2.3]
> …[elided for brevity]…
> [Parsed_showinfo_1 @ 00000211128f2340] n:  28 pts: 336240 
> pts_time:0.934   pos:    45167 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:B checksum:8D724A43 plane_checksum:[CD1CE198 DC377EA5 
> 3D51E9E8] mean:[70 113 148] stdev:[46.3 11.6 11.5]
> [Parsed_showinfo_1 @ 00000211128f2340] n:  29 pts: 348480 
> pts_time:0.968   pos:    40163 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:P checksum:8F6C0D42 plane_checksum:[385DA9F1 7EA37D5A 
> AD78E5D9] mean:[70 113 148] stdev:[46.6 11.6 11.5]
> [Parsed_showinfo_1 @ 00000211128f2340] n:  30 pts: 360360 
> pts_time:1.001   pos:    50467 fmt:yuv420p sar:32/27 s:240x236 i:P 
> iskey:0 type:B checksum:B511B7BA plane_checksum:[9C9A49A0 B1D583BA 
> FA0EEA51] mean:[70 113 148] stdev:[46.5 11.4 11.6]


Does input1.mkv in fact have a constant frame rate of 24/1.001 
frames/second?  If you remove the settb video filter, and just use 
showinfo, what pts and pts_time values does it report for the first 30 
frames of input1.mkv?

It's important that input1.mkv have a constant Presentation Timestamp 
(PTS) increment, and a constant timebase which is a multiple of 24/1.001 
ticks/second. Obviously.

       —Jim DeLaHunt




More information about the ffmpeg-user mailing list