== ffmpeg ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers == A. Source excerpt in.mp4 (20 s of Big Buck Bunny from 90 s) {"frames": 600, "fps": 30.0, "vdur": 20.0, "adur": 20.0, "dur": 20.0, "size": 5355847, "kbps": 2142} == B. Duration, frames and size by speed (setpts=PTS/s plus atempo, default frame rate handling, x264 CRF 20) speed | atempo | duration s (expected) | video s | audio s | frames (expected) | fps | size KB | kbps | check 1x | atempo=1 | 20.002 (20.000) | 20.000 | 20.002 | 600 (600) | 30.0 | 5121 | 2097 | PASS 1.5x | atempo=1.5 | 13.400 (13.333) | 13.400 | 13.344 | 402 (400) | 30.0 | 4431 | 2709 | PASS 2x | atempo=2 | 10.067 (10.000) | 10.067 | 10.010 | 302 (300) | 30.0 | 3957 | 3220 | PASS 4x | atempo=2.0,atempo=2 | 5.067 (5.000) | 5.067 | 5.009 | 152 (150) | 30.0 | 2930 | 4737 | PASS 10x | atempo=2.0,atempo=2.0,atempo=2.0,atempo=1.25 | 2.067 (2.000) | 2.067 | 2.018 | 62 (60) | 30.0 | 1928 | 7641 | PASS CONTROL 1x: duration must equal the source, frames must equal 600 -> PASS SIZE: 1x 5121 KB; 2x 3957 KB = 77% of 1x for 50% of the length; 10x 1928 KB = 38% of 1x for 10% of the length == B2. Same speeds with an explicit fps=30 filter after setpts speed | duration s (expected) | frames (expected) | size KB | check 1.5x | 13.344 (13.333) | 400 (400) | 4426 | PASS 2x | 10.010 (10.000) | 300 (300) | 3950 | PASS 4x | 5.009 (5.000) | 150 (150) | 2898 | PASS 10x | 2.018 (2.000) | 60 (60) | 1900 | PASS == C. What happens to the frames at 2x and 10x 2x passthrough (keep every frame): frames 600 (expected 600), average 59.8 frames per second (expected 60 within 3%), stored rate reported by ffprobe 60.0 fps, duration 10.033 s, size 4382 KB -> PASS 2x default (drop frames to 30 fps): frames 302 (expected 300), stored frame rate 30.0 fps 10x passthrough (keep every frame): frames 600 (expected 600), average 295.1 frames per second (expected 300 within 3%), stored rate reported by ffprobe 240.0 fps, duration 2.033 s, size 3635 KB -> PASS 10x default (drop frames to 30 fps): frames 62 (expected 60), stored frame rate 30.0 fps == D. Speeding up only the picture (a common mistake: -vf setpts without touching the audio) 2x picture only: video stream 10.067 s (expected 10), audio stream 20.010 s (expected 20, unchanged), container 20.010 s -> PASS == E. Pitch of a 440 Hz test tone (zero-crossing count, tone 12 s) CONTROL source tone: 440.0 Hz (expected 440 +-2) -> PASS atempo=2 (2x): 440.0 Hz (expected 440) -> PASS atempo=2.0,atempo=2.0 (4x, chained): 440.0 Hz (expected 440) -> PASS atempo=4 (4x, single): 440.0 Hz (expected 440) -> PASS atempo=10 (10x, single): 440.0 Hz (expected 440) -> PASS asetrate=88200,aresample=44100 (2x by resampling): 880.0 Hz (expected 880) -> PASS == F. atempo range in this build (documented range [0.5, 100.0]) atempo=0.5: accepted (expected accepted) -> PASS atempo=0.4: rejected (expected rejected) -> PASS atempo=2: accepted (expected accepted) -> PASS atempo=4: accepted (expected accepted) -> PASS atempo=100: accepted (expected accepted) -> PASS atempo=101: rejected (expected rejected) -> PASS == G. Picture and sound stay together (white flash and 1 kHz beep both start at 6.0 s and last 1 s; 12 s clip) variant | speed | frames (expected) | flash starts s | beep starts s | expected s | picture late by frames | check setpts only | 1x | 360 (360) | 6.000 | 5.993 | 6.000 | 0.0 | PASS setpts only | 1.5x | 242 (240) | 4.067 | 3.994 | 4.000 | 2.0 | PASS setpts only | 2x | 182 (180) | 3.067 | 2.995 | 3.000 | 2.0 | PASS setpts only | 4x | 92 (90) | 1.567 | 1.486 | 1.500 | 2.0 | PASS setpts only | 10x | 38 (36) | 0.667 | 0.574 | 0.600 | 2.0 | PASS setpts + fps=30 | 1x | 360 (360) | 6.000 | 5.993 | 6.000 | 0.0 | PASS setpts + fps=30 | 1.5x | 240 (240) | 4.000 | 3.994 | 4.000 | 0.0 | PASS setpts + fps=30 | 2x | 180 (180) | 3.000 | 2.995 | 3.000 | 0.0 | PASS setpts + fps=30 | 4x | 90 (90) | 1.500 | 1.486 | 1.500 | 0.0 | PASS setpts + fps=30 | 10x | 36 (36) | 0.600 | 0.574 | 0.600 | 0.0 | PASS == H. Speeding up with a filter while copying the picture (-c:v copy) setpts with -c:v copy: exit code 218 (expected nonzero), message: Filtergraph 'setpts=PTS/2' was specified, but codec copy was selected. Filtering and streamcopy cannot be used together. -> PASS SUMMARY: 0 failed checks NOTE: in section B a row is marked PASS when the length is within 0.1 s and the frames within 3 of the expected value. Section G measures the exact lag: the plain setpts recipe puts the picture 2 frames (67 ms at 30 fps) behind the sound at 1.5x and above; adding fps=30 removes it.