== versions ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers Python 3.12.3 == source (CC0, Wikimedia Commons: File:Misty river.webm) stream|codec_name=vp9|width=1920|height=1080|r_frame_rate=50/1 format|duration=48.780000|size=46812944|bit_rate=7677399 == T1 size table from YouTube's recommended bit rates (python3 size-table.py) label | tier | Mbps | per minute | per 10 minutes | per hour | 12 hours | which limit comes first 2160p (4K) | 24-30 fps | 35 | 253 MB | 2.47 GB | 14.83 GB | 177.95 GB | 12 hours first (file 178.0 GB) 2160p (4K) | 24-30 fps | 45 | 325 MB | 3.17 GB | 19.02 GB | 228.24 GB | 12 hours first (file 228.2 GB) 2160p (4K) | 48-60 fps | 53 | 382 MB | 3.73 GB | 22.37 GB | 268.48 GB | 256 GB first, after 10.66 h if GB = 10^9 bytes, 11.44 h if GB = 2^30 bytes 2160p (4K) | 48-60 fps | 68 | 489 MB | 4.78 GB | 28.66 GB | 343.91 GB | 256 GB first, after 8.32 h if GB = 10^9 bytes, 8.93 h if GB = 2^30 bytes 1440p | 24-30 fps | 16 | 117 MB | 1.14 GB | 6.87 GB | 82.40 GB | 12 hours first (file 82.4 GB) 1440p | 48-60 fps | 24 | 174 MB | 1.70 GB | 10.22 GB | 122.63 GB | 12 hours first (file 122.6 GB) 1080p | 24-30 fps | 8 | 60 MB | 600 MB | 3.51 GB | 42.16 GB | 12 hours first (file 42.2 GB) 1080p | 48-60 fps | 12 | 89 MB | 886 MB | 5.19 GB | 62.28 GB | 12 hours first (file 62.3 GB) 720p | 24-30 fps | 5 | 39 MB | 385 MB | 2.26 GB | 27.08 GB | 12 hours first (file 27.1 GB) 720p | 48-60 fps | 7.5 | 56 MB | 564 MB | 3.30 GB | 39.65 GB | 12 hours first (file 39.6 GB) 480p | 24-30 fps | 2.5 | 21 MB | 206 MB | 1.21 GB | 14.50 GB | 12 hours first (file 14.5 GB) 480p | 48-60 fps | 4 | 31 MB | 314 MB | 1.84 GB | 22.05 GB | 12 hours first (file 22.0 GB) 360p | 24-30 fps | 1 | 10 MB | 99 MB | 594 MB | 6.96 GB | 12 hours first (file 7.0 GB) 360p | 48-60 fps | 1.5 | 13 MB | 135 MB | 809 MB | 9.47 GB | 12 hours first (file 9.5 GB) 8K (4320p) | 24-30 fps | 80 | 575 MB | 5.61 GB | 33.69 GB | 404.26 GB | 256 GB first, after 7.08 h if GB = 10^9 bytes, 7.60 h if GB = 2^30 bytes 8K (4320p) | 24-30 fps | 160 | 1.12 GB | 11.20 GB | 67.22 GB | 806.59 GB | 256 GB first, after 3.55 h if GB = 10^9 bytes, 3.81 h if GB = 2^30 bytes 8K (4320p) | 48-60 fps | 120 | 861 MB | 8.41 GB | 50.45 GB | 605.43 GB | 256 GB first, after 4.73 h if GB = 10^9 bytes, 5.07 h if GB = 2^30 bytes 8K (4320p) | 48-60 fps | 240 | 1.68 GB | 16.79 GB | 100.74 GB | 1,208.93 GB | 256 GB first, after 2.37 h if GB = 10^9 bytes, 2.54 h if GB = 2^30 bytes 8 Mbps + 384 kbps audio: time to reach 256 GB (10^9) = 67.854 h (12 h cap applies if larger) 8 Mbps + 384 kbps audio: time to reach 256 GiB (2^30) = 72.858 h (12 h cap applies if larger) 45 Mbps + 384 kbps audio: time to reach 256 GB (10^9) = 12.535 h (12 h cap applies if larger) 45 Mbps + 384 kbps audio: time to reach 256 GiB (2^30) = 13.459 h (12 h cap applies if larger) 160 Mbps + 384 kbps audio: time to reach 256 GB (10^9) = 3.547 h (12 h cap applies if larger) 160 Mbps + 384 kbps audio: time to reach 256 GiB (2^30) = 3.809 h (12 h cap applies if larger) CONTROL 8 Mbps + 384 kbps for 10 s = 10480000 bytes; expected 10480000; PASS == T2 formula against a real encode: 20 s of the source, 1080p 30 fps, H.264 High, target 8 Mbps video + 384 kbps AAC stereo (synthetic 440 Hz tone, the source has no audio) encode seconds: 13 stream|codec_name=h264|profile=High|width=1920|height=1080|avg_frame_rate=30/1|bit_rate=7974314 stream|codec_name=aac|profile=LC|sample_rate=48000|avg_frame_rate=0/0|bit_rate=235845 format|duration=20.133334|size=20617305|bit_rate=8192306 predicted from the targets: (8,000,000 + 384,000) x 20 / 8 = 20,960,000 bytes measured file: 20,617,305 bytes (-1.63% against the prediction) measured video bit rate 7.974 Mbps, audio 235.8 kbps, duration 20.133 s video bit rate against the 8 Mbps target: -0.32% one minute at 8 Mbps video + 384 kbps audio: 59.97 MB (1 MB = 1,048,576 bytes) formula on the measured stream bit rates: 20,662,234 bytes (container overhead = -44,929 bytes, -0.22% of the file) == T3 checker on five files (controls: each broken copy has exactly one known difference) --- good.mp4 OK container: mov,mp4,m4a,3gp,3g2,mj2 (recommended: MP4) OK fast start: moov atom before the media data OK edit lists: 0 edit list box(es) (recommended: none) OK video codec: h264 (recommended: H.264) OK profile: High (recommended: High) OK scan: progressive (recommended: progressive) OK audio codec: aac (recommended: AAC-LC or Opus) OK audio sample rate: 48000 Hz (recommended: 48 kHz) OK frame size: 1920x1080 OK aspect ratio: 1920:1080 is 16:9 OK video bit rate: 7.97 Mbps at 30.00 fps; YouTube lists 8 Mbps for 1080p standard frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit OK length limit: 20.1 s; limit 12 hours OK file size limit: 20617305 bytes; limit 256 GB --- nofast.mp4 OK container: mov,mp4,m4a,3gp,3g2,mj2 (recommended: MP4) DIFF fast start: moov atom is after the media data (recommended: at the front) OK edit lists: 0 edit list box(es) (recommended: none) OK video codec: h264 (recommended: H.264) OK profile: High (recommended: High) OK scan: progressive (recommended: progressive) OK audio codec: aac (recommended: AAC-LC or Opus) OK audio sample rate: 48000 Hz (recommended: 48 kHz) OK frame size: 1920x1080 OK aspect ratio: 1920:1080 is 16:9 OK video bit rate: 7.97 Mbps at 30.00 fps; YouTube lists 8 Mbps for 1080p standard frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit OK length limit: 20.1 s; limit 12 hours OK file size limit: 20617317 bytes; limit 256 GB --- editlist.mp4 OK container: mov,mp4,m4a,3gp,3g2,mj2 (recommended: MP4) OK fast start: moov atom before the media data DIFF edit lists: 2 edit list box(es) (recommended: none) OK video codec: h264 (recommended: H.264) OK profile: High (recommended: High) OK scan: progressive (recommended: progressive) OK audio codec: aac (recommended: AAC-LC or Opus) OK audio sample rate: 48000 Hz (recommended: 48 kHz) OK frame size: 1920x1080 OK aspect ratio: 1920:1080 is 16:9 OK video bit rate: 7.99 Mbps at 30.00 fps; YouTube lists 8 Mbps for 1080p standard frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit OK length limit: 20.1 s; limit 12 hours OK file size limit: 20661038 bytes; limit 256 GB --- audio441.mp4 OK container: mov,mp4,m4a,3gp,3g2,mj2 (recommended: MP4) OK fast start: moov atom before the media data OK edit lists: 0 edit list box(es) (recommended: none) OK video codec: h264 (recommended: H.264) OK profile: High (recommended: High) OK scan: progressive (recommended: progressive) OK audio codec: aac (recommended: AAC-LC or Opus) DIFF audio sample rate: 44100 Hz (recommended: 48 kHz) OK frame size: 1920x1080 OK aspect ratio: 1920:1080 is 16:9 OK video bit rate: 7.97 Mbps at 29.97 fps; YouTube lists 8 Mbps for 1080p standard frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit OK length limit: 20.2 s; limit 12 hours OK file size limit: 20560535 bytes; limit 256 GB --- portrait45.mp4 OK container: mov,mp4,m4a,3gp,3g2,mj2 (recommended: MP4) OK fast start: moov atom before the media data OK edit lists: 0 edit list box(es) (recommended: none) OK video codec: h264 (recommended: H.264) OK profile: High (recommended: High) OK scan: progressive (recommended: progressive) INFO audio: no audio stream INFO frame size: 1080x1350 is not one of the 16:9 sizes YouTube lists INFO aspect ratio: 1080:1350 is not 16:9; the player adapts and may pad (YouTube Help) INFO video bit rate: 7.59 Mbps; no recommendation row for height 1350 OK length limit: 10.0 s; limit 12 hours OK file size limit: 9496348 bytes; limit 256 GB --- parser control: count of 'elst' strings in the raw bytes must agree with the parser good.mp4 raw elst strings: 0 editlist.mp4 raw elst strings: 2 == T4 fast start by plain bytes: position of moov and mdat in nofast.mp4 vs good.mp4 good.mp4 moov at byte 36, mdat at byte 23483 nofast.mp4 moov at byte 20593870, mdat at byte 44 == T5 the checker on the original source (a WebM with VP9, so container and codec must be DIFF) DIFF container: matroska,webm (recommended: MP4) INFO fast start: no moov/mdat boxes found (not an MP4 file) OK edit lists: 0 edit list box(es) (recommended: none) DIFF video codec: vp9 (recommended: H.264) OK scan: unknown (recommended: progressive) INFO audio: no audio stream OK frame size: 1920x1080 OK aspect ratio: 1920:1080 is 16:9 INFO video bit rate: 7.68 Mbps at 50.00 fps; YouTube lists 12 Mbps for 1080p high frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit OK length limit: 48.8 s; limit 12 hours OK file size limit: 46812944 bytes; limit 256 GB == T6 the real 1080p source re-encoded at CRF (what a quality setting gives, 20 s): bit rate vs YouTube's 8 Mbps INFO video bit rate: 9.53 Mbps at 30.00 fps; YouTube lists 8 Mbps for 1080p standard frame rate (SDR). Within 10% counts as OK; the list is a recommendation, not a limit CRF 20 video bit rate 9.527 Mbps = +19.1% against the 8 Mbps YouTube lists for 1080p at 24-30 fps == T7 the live Koldflux video file size calculator on the page's scenarios (headless Chromium, calc-run.cjs) inputs found: 3 CONTROL 1000 kbps video, 0 kbps audio, 8 s (1,000,000 bytes; the tool counts 1 KB = 1,024 bytes, so it must read 977 KB) tool: size 977 KB, total 1,000 kbps, per minute 7.2 MB our arithmetic: 1,000,000 bytes = 0.95 MB (1,048,576 bytes) = 0.001 GB our T2 encode targets: 8000 + 384 kbps, 20 s tool: size 20.0 MB, total 8,384 kbps, per minute 60.0 MB our arithmetic: 20,960,000 bytes = 19.99 MB (1,048,576 bytes) = 0.020 GB 1080p 24-30 fps, 10 minutes: 8000 + 384 kbps, 600 s tool: size 599.7 MB, total 8,384 kbps, per minute 60.0 MB our arithmetic: 628,800,000 bytes = 599.67 MB (1,048,576 bytes) = 0.586 GB 4K 24-30 fps top of range, 1 hour: 45000 + 384 kbps, 3600 s tool: size 19.02 GB, total 45,384 kbps, per minute 324.6 MB our arithmetic: 20,422,800,000 bytes = 19476.70 MB (1,048,576 bytes) = 19.020 GB == T8 arithmetic for the Shorts paragraph (appended after the main run; same snippet is in test-run.sh) a 9:16 video that is 1080 px wide is 1920.0 px tall == T9 second clip: Ocean surface waves 06.ogv (Wikimedia Commons, CC0), 1080p 25 fps, 6.4 s, busy water, no audio. Same recipe as T2 and T6. stream|codec_name=theora|width=1920|height=1080|r_frame_rate=25/1 format|duration=6.400000 duration 6.467 s; predicted from the targets: (8,000,000 + 384,000) x 6.467 / 8 = 6,777,067 bytes measured file: 6,556,544 bytes (-3.25% against the prediction); video 7.947 Mbps (-0.66% against 8 Mbps), audio 235.6 kbps CRF 20 video bit rate 11.088 Mbps = +38.6% against the 8 Mbps YouTube lists for 1080p at 24-30 fps done