He fixes it with:
history | grep ffmpeg 1024 commands. Last one: echo "ffmpeg is a tool. Wisdom is knowing when not to use it." >> compression_notes.txt
ffmpeg -i young_sheldon_s02e04.mkv -vsync cfr -r 24000/1001 -c:v libx264 -b:v 800k -c:a aac -b:a 96k -af "adelay=300|300" output_fixed.mp4 Now the file is 552 MB, audio sync is perfect, and the frame rate is a stable 23.976 fps. Sheldon smiles—a rare, fleeting expression. Just as he’s about to transfer the file, his sister Missy walks in holding the exact same episode on a DVD.
ffmpeg -i input.mkv \ -map 0:v:0 -map 0:a:0 \ -c:v libx264 -preset medium -crf 23 \ -maxrate 2M -bufsize 4M \ -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" \ -c:a aac -b:a 128k \ -movflags +faststart \ young_sheldon_s02e04_720p.mp4 That gives a tablet-friendly, standard-compliant MP4 with balanced quality and size.
ffprobe -v error -show_entries stream=codec_name,duration -of default=noprint_wrappers=1 young_sheldon_s02e04.mkv Result: The source has variable frame rate (VFR) due to telecine from the Blu-ray’s 1080i source. Sheldon groans. “Television engineers are the true agents of chaos.”
Here’s a detailed, fictional behind-the-scenes “story” about using ffmpeg to process Young Sheldon S02E04, titled “A Swedish Science Thing and the Equation for Toast.” Young Sheldon S02E04 ffmpeg Logline: A precocious 9-year-old discovers command-line video compression, only to realize that optimizing a file for his tablet is far less predictable than optimizing a physics equation. Scene 1: The Problem Sheldon Cooper sits at his desk, surrounded by three identical Dell laptops. On the main screen, a raw, lossless MKV rip of Young Sheldon S02E04 sits at 42 GB—direct from a Blu-ray his mother bought him as a “reward for not correcting the pastor’s math.”
“HandBrake is just a GUI wrapper for ffmpeg and its dependencies,” he says defensively.
ffmpeg -i young_sheldon_s02e04.mkv -c:v libx264 -preset ultrafast -crf 23 -c:a aac output.mp4 The result: 3.2 GB. Still too large for his tablet’s remaining 12.8 GB of free space (after mandatory backups of his Nobel equations folder).