run: 2026-11-04 02:54 UTC ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers load before: 13.04 14.90 11.25 === 1. source: Wood Lake 0-20 s, 1280x720, 29.97 fps, no audio, H.264 CRF 23 (stands for your exported file) === $ ffmpeg -v error -y -t 20 -i woodlake.webm -an -vf scale=1280:720,fps=30 -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p work/source.mp4 seconds=7.35 source bytes: 12448217 === 2. soft: MP4 with mov_text track (video copied) === $ ffmpeg -v error -y -i work/source.mp4 -i captions.srt -map 0:v -map 1:0 -c:v copy -c:s mov_text -metadata:s:s:0 language=eng work/soft.mp4 seconds=0.08 === 3. soft: MKV with SRT track (video copied) === $ ffmpeg -v error -y -i work/source.mp4 -i captions.srt -map 0:v -map 1:0 -c copy -c:s srt work/soft.mkv seconds=0.10 === 4. burned: subtitles filter, x264 CRF 23 (same as source) === $ ffmpeg -v error -y -i work/source.mp4 -vf subtitles=captions.srt:force_style=Fontsize=22 -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p work/burn23.mp4 seconds=6.50 === 5. burned: x264 CRF 18 === $ ffmpeg -v error -y -i work/source.mp4 -vf subtitles=captions.srt:force_style=Fontsize=22 -c:v libx264 -crf 18 -preset medium -pix_fmt yuv420p work/burn18.mp4 seconds=7.18 === 6. CONTROL: re-encode with no subtitles, CRF 23 (generation loss without any caption) === $ ffmpeg -v error -y -i work/source.mp4 -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p work/regen23.mp4 seconds=6.42 === 7. sizes (bytes) === source.mp4 12448217 soft.mp4 12449114 soft.mkv 12445865 burn23.mp4 11281615 burn18.mp4 15912868 regen23.mp4 11416977 === 8. video stream md5 (ffmpeg -map 0:v -c copy -f md5); soft files must equal source (known answer), burned must differ === source.mp4 MD5=49189b44ddf6d666eda91c2909ecef63 soft.mp4 MD5=49189b44ddf6d666eda91c2909ecef63 soft.mkv MD5=49189b44ddf6d666eda91c2909ecef63 burn23.mp4 MD5=2f7926239070543a027d491dea6b4267 === 9. tracks (ffprobe) === soft.mp4 streams: h264,video mov_text,subtitle soft.mkv streams: h264,video subrip,subtitle burn23.mp4 streams: h264,video === 10. round trip: extract the soft track and diff its text against captions.srt (empty diff = same) === back-mp4 text diff lines: 0 back-mp4 timing lines: 00:00:00,500 --> 00:00:03,500;00:00:04,000 --> 00:00:07,000;00:00:07,500 --> 00:00:10,500;00:00:11,000 --> 00:00:13,800; back-mkv text diff lines: 0 back-mkv timing lines: 00:00:00,500 --> 00:00:03,500;00:00:04,000 --> 00:00:07,000;00:00:07,500 --> 00:00:10,500;00:00:11,000 --> 00:00:13,800; === 11. SSIM against the source (1.0000 = identical) === control source vs source: All:1.000000 soft.mp4 (video copied): All:1.000000 regen23 (control, no text): All:0.989260 burn23: All:0.975110 burn18: All:0.979394 === 12. SSIM in a caption-free window (cues end before 14.0 s? see captions.srt); frames 16-20 s only === regen23 16-20 s: All:0.988760 burn23 16-20 s: All:0.988763 burn18 16-20 s: All:0.993397 === 13. fix a typo later: replace the text, time it === $ ffmpeg -v error -y -i work/source.mp4 -i captions.srt -map 0:v -map 1:0 -c:v copy -c:s mov_text work/soft2.mp4 seconds=0.08 $ ffmpeg -v error -y -i work/source.mp4 -vf subtitles=captions.srt:force_style=Fontsize=22 -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p work/burn23b.mp4 seconds=6.40 load after: 9.43 13.71 11.02