Playing 2 videos side by side

If you have 2 video files and you want to compare them (e.g. you've encoded them differently and want to look for differences), this is a simple gstreamer/gst-launch pipeline for playing both videos.

gst-launch-0.10 filesrc location=$VIDEO1 ! decodebin ! queue ! ffmpegcolorspace ! videobox border-alpha=0 right=-$WIDTH ! videomixer name=mix  ! ffmpegcolorspace ! autovideosink filesrc location=$VIDEO2 ! decodebin ! queue ! ffmpegcolorspace ! videobox border-alpha=0 left=-$WIDTH ! mix.

Replace $VIDEO1 with the filename of the first video, $VIDEO2 with the second, and $WIDTH with width (in pixels) of the videos. This assumes that both videos are the same size. $VIDEO1 will play on the left hand side, $VIDEO2 on the right.

For example to compare holidays.avi and holidays.mp4, both being 640×480, then you'd do this command:

gst-launch-0.10 filesrc location=holidays.avi ! decodebin ! queue ! ffmpegcolorspace ! videobox border-alpha=0 right=-640 ! videomixer name=mix  ! ffmpegcolorspace ! autovideosink filesrc location=holidays.mp4 ! decodebin ! queue ! ffmpegcolorspace ! videobox border-alpha=0 left=-640 ! mix.

Both videos will play 'in sync', i.e. at the same time, so you can accurately compare each part of each video with the corresponding part of the other video.