Here’s a for working with Georgie & Mandy’s First Marriage S01E14 using ffmpeg — from basic remuxing to advanced filtering, subtitle embedding, and quality analysis. 1. Preliminary: Get the episode Assume you have the episode file (e.g., georgie_mandy_s01e14.mkv or .mp4 ). Check its streams:
ffmpeg -i input.mkv -itsoffset 0.2 -i input.mkv -map 1:v -map 0:a -c copy resync.mkv (Shifts audio 200 ms later; negative = earlier.) Goal: S01E14 to H.265, AAC 5.1 downmixed to stereo, English subs hardcoded, denoise + fade.
ffmpeg -i input.mkv -ss 00:12:34 -to 00:15:45 -c:v libx264 -c:a aac exact_cut.mp4 ffmpeg -i input.mkv -vf "hqdn3d=4:3:6:4" -c:v libx264 -crf 18 denoised.mp4 5c. Add intro/outro black fade: ffmpeg -i input.mkv -vf "fade=t=in:st=0:d=1, fade=t=out:st=29:d=1" -c:a copy faded.mkv 5d. Extract 1 frame every 10 seconds (for storyboard analysis): ffmpeg -i georgie_mandy_s01e14.mkv -vf "fps=1/10" thumb%04d.jpg 6. Subtitle hardcoding (burn-in) For accessibility or forced subtitles:
for f in *S01E*.mkv; do ffmpeg -i "$f" -c:v libx265 -crf 22 -c:a aac -b:a 128k "hevc_$f%.mkv.mp4" done Compare PSNR between original and re-encoded: ffmpeg -i original.mkv -i encoded.mp4 -lavfi "psnr" -f null - VMAF (requires libvmaf): ffmpeg -i original.mkv -i encoded.mp4 -lavfi libvmaf -f null - 10. Create a clip for social media (square + subtitles) ffmpeg -i input.mkv -ss 00:05:00 -t 30 \ -vf "crop=iw:iw,scale=1080:1080,subtitles=input.mkv" \ -c:v libx264 -crf 18 -c:a aac clip_square.mp4 11. Fix common sync issues If audio drifts after cutting:
ffmpeg -i georgie_mandy_s01e14.mkv \ -vf "hqdn3d=3:2:4:3, fade=t=in:st=0:d=0.5, subtitles=georgie_mandy_s01e14.mkv:si=0" \ -c:v libx265 -preset medium -crf 20 \ -af "pan=stereo|FL=FC+0.5*FL+0.5*BL|FR=FC+0.5*FR+0.5*BR, acompressor=threshold=0.1" \ -c:a aac -b:a 160k \ final_georgie_mandy_s01e14.mp4
ffprobe -v quiet -print_format json -show_streams georgie_mandy_s01e14.mkv Change container without quality loss: