scripts:ffmpeg:side_by_side_video

This is an old revision of the document!


Overlay videos side by side

This one I use quite often to A/B test videos or do before after runs.
This is particularly useful for example when comparing upscaled videos through say realesrgan and realsr or between two models. Or if you're comparing different interpolation methods.

Here is an example where I was comparing videos with different resolutions and had to scale them.

I also keep both audio tracks for easy comparison.

ffmpeg -i original.mp4 -i modified.mkv -filter_complex "[1:v]scale=1920x1080:flags=lanczos+full_chroma_inp+full_chroma_int[v1];[0:v][v1]hstack=inputs=2[out]" -map "[out]" -map 1:a -map 0:a -c:a copy -c:v libx264 -crf 18 comparison.mkv
  • scripts/ffmpeg/side_by_side_video.1703059904.txt
  • Last modified: 2023-12-20 08:11
  • by Tony