{"id":13578784,"url":"https://github.com/pixop/video-compare","last_synced_at":"2025-05-14T10:09:11.432Z","repository":{"id":38421162,"uuid":"163671950","full_name":"pixop/video-compare","owner":"pixop","description":"Split screen video comparison tool using FFmpeg and SDL2","archived":false,"fork":false,"pushed_at":"2025-05-05T12:12:06.000Z","size":9571,"stargazers_count":1212,"open_issues_count":12,"forks_count":48,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-05T13:23:46.604Z","etag":null,"topics":["cli","comparison","ffmpeg","sdl2","stb-image","ui","video"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-31T13:38:44.000Z","updated_at":"2025-05-05T12:12:10.000Z","dependencies_parsed_at":"2023-12-06T22:22:52.899Z","dependency_job_id":"c2ebfe05-6cad-4b66-821a-ed60bf064000","html_url":"https://github.com/pixop/video-compare","commit_stats":{"total_commits":664,"total_committers":11,"mean_commits":60.36363636363637,"dds":"0.15662650602409633","last_synced_commit":"7dfa2c8b0e220c01fb162f4a4538be027354f7e8"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixop%2Fvideo-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixop%2Fvideo-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixop%2Fvideo-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixop%2Fvideo-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixop","download_url":"https://codeload.github.com/pixop/video-compare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254120161,"owners_count":22017952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","comparison","ffmpeg","sdl2","stb-image","ui","video"],"created_at":"2024-08-01T15:01:33.721Z","updated_at":"2025-05-14T10:09:11.404Z","avatar_url":"https://github.com/pixop.png","language":"C++","funding_links":[],"categories":["\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","HarmonyOS","C++"],"sub_categories":["Windows Manager"],"readme":"# \u003cimg src=\"https://github.com/user-attachments/assets/da615466-683e-4cc5-8380-32a98d743ba0\" alt=\"Logo\" width=\"32\"/\u003e\u0026nbsp; video-compare\n\n[![GitHub release](https://img.shields.io/github/release/pixop/video-compare)](https://github.com/pixop/video-compare/releases)\n\nSplit-screen video comparison tool written in C++14, utilizing FFmpeg libraries and SDL2. It provides\ninteractive navigation and playback controls, along with various analysis tools and customizable display options.\n\n`video-compare` can be used to visually compare the impact of codecs, resizing algorithms, and other modifications\non two video files played in sync. The tool is versatile, allowing videos of differing resolutions, frame rates,\nscanning methods, color formats, dynamic ranges, input protocols, container formats, codecs, or durations.\n\nThanks to FFmpeg's flexibility, `video-compare` is also capable of comparing images or image sequences.\n\n## Installation\n\n### Arch Linux\n\nInstall [via AUR](https://aur.archlinux.org/packages/video-compare):\n\n```sh\ngit clone https://aur.archlinux.org/video-compare.git\ncd video-compare\nmakepkg -sic\n```\n\n### Homebrew\n\nInstall [via Homebrew](https://formulae.brew.sh/formula/video-compare):\n\n```sh\nbrew install video-compare\n```\n\n### Pre-compiled Windows 10 binaries\n\nPre-built Windows 10 x86 64-bit releases are available from [this page](https://github.com/pixop/video-compare/releases).\nDownload and extract the .zip-archive on your system, then run `video-compare.exe` from a command prompt.\n\n### Compile from source\n\n[Build it yourself](#build).\n\n## Screenshots\n\nVisual compare mode:\n![Visual compare mode](screenshot_1.jpg?raw=true)\n\nSubtraction mode (plus time-shift, 200% zoom, and magnification):\n![Subtraction mode\"](screenshot_2.jpg?raw=true)\n\nVertically stacked mode:\n![Stacked mode\"](screenshot_3.jpg?raw=true)\n\n## Credits\n\n`video-compare` was created by Jon Frydensbjerg (email: jon@pixop.com). The code is mainly based on\nthe excellent video player GitHub project: https://github.com/pockethook/player\n\nMany thanks to the [FFmpeg](https://github.com/FFmpeg/FFmpeg), [SDL2](https://github.com/libsdl-org/SDL) and\n[stb](https://github.com/nothings/stb) authors.\n\n## Usage\n\nLaunch using the operating system's DPI setting. Video pixels are doubled on devices like a Retina 5K display;\ntherefore, it is the preferred option for displaying HD 1080p videos on such screens:\n\n    video-compare video1.mp4 video2.mp4\n\nAllow high DPI mode on systems which supports that. Video pixels are displayed \"1-to-1\". Useful\nfor e.g. displaying UHD 4K video on a Retina 5K display:\n\n    video-compare -d video1.mp4 video2.mp4\n\nIncrease bit depth to 10 bits per color component (8 bits is the default). Fidelity is increased while\nperformance takes a hit. Significantly reduces visible banding on systems with a higher grade display\nand driver support for 30-bit color:\n\n    video-compare -b video1.mp4 video2.mp4\n\nUse a specific window size instead of deriving the window size from the video dimensions. The video\nframe will be scaled to fit. If either width or height is left out, the missing value will be calculated\nfrom the other specified dimension so that aspect ratio is maintained. Useful for downscaling high resolution\nvideo onto a low resolution display:\n\n    video-compare -w 1280x720 video1.mp4 video2.mp4\n\nSize the window to fit the usable display bounds while maintaining the video’s aspect ratio. This option adjusts\nfor elements like taskbars or OS menus. Ideal for maximizing the viewing area while keeping the video dimensions\nproportional to the screen:\n\n    video-compare -W video1.mp4 video2.mp4\n\nAutomatic in-buffer loop playback, triggered when the buffer fills or end-of-file is reached, streamlines\nvideo analysis by eliminating the need for manual replay initiation (bidirectional \"ping-pong\" mode, `pp`, is\nalso available):\n\n    video-compare -a on video1.mp4 video2.mp4\n\nShift the presentation time stamps of the right video instead of assuming the videos are aligned. A\npositive amount has the effect of delaying the left video while negative values conversely delays the\nright video. Useful when videos are slightly out of sync:\n\n    video-compare -t 0.080 video1.mp4 video2.mp4\n\nDisplay videos stacked vertically at full size without a slider (`hstack` for horizontal stacking is\nalso supported):\n\n    video-compare -m vstack video1.mp4 video2.mp4\n\nPreprocess one or both inputs via a list of FFmpeg video filters specified on the command line\n(see [FFmpeg's video filters documentation](https://ffmpeg.org/ffmpeg-filters.html#Video-Filters)).\nThe Swiss Army knife for cropping/padding (comparing videos with different aspect ratios),\nadjusting colors, deinterlacing, denoising, speeding up/slowing down, etc.:\n\n    video-compare -l crop=iw:ih-240 -r format=gray,pad=iw+320:ih:160:0 video1.mp4 video2.mp4\n\nSelect a demuxer that cannot be auto-detected (such as VapourSynth):\n\n    video-compare --left-demuxer vapoursynth script.vpy video.mp4\n\nExplicit decoder selection for the right video:\n\n    video-compare --right-decoder h264_cuvid video1.mp4 video2.mp4\n\nSet the same hardware acceleration type for both videos:\n\n    video-compare --hwaccel cuda video1.mp4 video2.mp4\n\nSet the hardware acceleration type for the left video only:\n\n    video-compare --left-hwaccel videotoolbox video1.mp4 video2.mp4\n\nBy default, HDR videos are automatically color space converted to sRGB with an initial 500-nit peak light\nlevel. This default can be overridden with a custom peak light level, such as 850 nits. The specified peak\nlight level is then dynamically adjusted during decoding based on any MaxCLL metadata:\n\n    video-compare -R 850 sdr_video.mp4 hdr_video.mp4\n\nMap a 500-nit peak light level HDR video for an sRGB SDR display, and adjust the tone of the SDR video\nto simulate the relative light level difference between the two videos on an actual HDR display:\n\n    video-compare -T rel -L 500 hdr_video.mp4 sdr_video.mp4\n\nPerform simpler comparison of a video with itself using double underscore (`__`) as a placeholder. This\nenables tasks such as comparing the video with a time-shifted version of itself or testing various sets\nof filters, without the need to enter the same, potentially long path twice:\n\n    video-compare some/very/long/and/complicated/video/path.mp4 __\n\nApply common filters to both videos and extend them with additional side-specific filters using the\nplaceholder resolution functionality. This structure also works for demuxer, decoder, and hardware\nacceleration settings:\n\n    video-compare -i yadif,hqdn3d -l setfield=bff,__ -r __,scale=iw/2:ih/2 video1.mp4 video2.mp4\n\nThe above features can be combined in any order, of course. Launch `video-compare` without any arguments to\nsee all supported options.\n\n## Controls\n\n- H: Toggle on-screen help text for controls\n- Space: Toggle play/pause\n- Comma `,`: Toggle bidirectional in-buffer loop/pause\n- Period `.`: Toggle forward-only in-buffer loop/pause\n- Escape: Quit\n- Down arrow: Seek 15 seconds backward\n- Left arrow: Seek 1 second backward\n- Page down: Seek 600 seconds backward\n- Up arrow: Seek 15 seconds forward\n- Right arrow: Seek 1 second forward\n- Page up: Seek 600 seconds forward\n- J: Reduce playback speed\n- L: Increase playback speed\n- I: Toggle fast/high-quality resizing for input alignment\n- T: Toggle nearest-neighbor/bilinear video texture filtering\n- S: Swap left and right video\n- A: Move to the previous frame in the buffer\n- D: Move to the next frame in the buffer\n- F: Save both frames and the on-screen content as PNG images\n- P: Print mouse position and pixel value under cursor to console\n- M: Print image similarity metrics to console\n- Z: Magnify area around cursor (result shown in lower left corner)\n- C: Magnify area around cursor (result shown in lower right corner)\n- R: Re-center and reset zoom to 100% (x1)\n- 1: Toggle hide/show left video\n- 2: Toggle hide/show right video\n- 3: Toggle hide/show HUD\n- 4: Zoom to 1:1 pixels\n- 5: Zoom 50% (x0.5)\n- 6: Zoom 100% (x1)\n- 7: Zoom 200% (x2)\n- 8: Zoom 400% (x4)\n- 9: Zoom 800% (x8)\n- 0: Toggle video/subtraction mode\n- Plus `+`: Time-shift right video 1 frame forward\n- Minus `-`: Time-shift right video 1 frame backward\n- X: Show the current video frame and UI update rates (in FPS)\n\nMove the mouse horizontally to adjust the movable slider position.\n\nUse the mouse wheel to zoom in/out on the pixel under the cursor. Pan the view\nby moving the mouse while holding down the right button.\n\nLeft-click the mouse to perform a time seek based on the horizontal position of the\nmouse cursor relative to the window width (the target position is shown in the lower\nright corner).\n\n**Hold** `Shift` while pressing `D` to decode and move to the next frame.\n\n**Hold** `Ctrl` while time-shifting with `+`/`-` for faster increments/decrements of 10 frames\nper keystroke. Similarly, **hold** `Alt` for even larger time-shifts of 100 frames.\n\nUse `Ctrl+C` (Windows/Linux) or `Cmd+C` (macOS) to copy the current timestamp of the left video\nto the clipboard, and `Ctrl+V` (Windows/Linux) or `Cmd+V` (macOS) to paste a timestamp from the\nclipboard and seek to that position.\n\nUse `Shift+F` to select a region; cutouts from both frames and their concatenation will be saved\nas PNGs.\n\n## Build\n\n### Requirements\n\nRequires FFmpeg headers and development libraries to be installed, along with SDL2 and\nits TrueType font rendering add on (libsdl2_ttf). SDL2 version 2.0.10 or later is now\nspecifically required for subpixel accuracy rendering capabilities. Users may need to\nupgrade their existing SDL2 installation before compiling.\n\nOn Debian GNU/Linux the required development packages can be installed via `apt`:\n\n```sh\napt install libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libsdl2-ttf-dev\n```\n\n### Instructions\n\nCompile the source code via GNU Make:\n\n```sh\nmake\n```\n\nThe linked `video-compare` executable will be created in the soure code directory. To perform a system wide installation:\n\n```sh\nmake install\n```\n\nNote that root privileges are required to perform this operation in most environments (hint: use e.g. `sudo`).\n\n## Notes\n\n1. Audio playback is not supported.\n\n2. Keep time-shifts below a few seconds for the best experience.\n\n3. Seeks require re-synchronization on the closest keyframe (i.e., I-frame).\n\n## Practical tips\n\n### Send To integration in Windows File Explorer\n\nYou can fire up the tool directly from the File Explorer when you don't need to specify\nany other arguments than the inputs via Right click -\u003e Send To -\u003e video-compare.\n\nHere is how this integration works:\n\nhttps://user-images.githubusercontent.com/8549626/166630445-c8c511b7-005f-48aa-83bc-0eb9676cfa2a.mp4\n\nYou can do that quickly by selecting two files, then right clicking any of them, pressing N (focuses se**n**d to),\nthen V (selects **v**ideo-compare).\n\nTo get video-compare to appear in the `Send To` field you will need to open the `send to` folder, which\nyou can access by typing `shell:sendto` in Run (Windows + R), then simply make a shortcut to `video-compare.exe`.\n\nThanks to [couleurm](https://github.com/couleurm) for the sharing this tip and creating the screen recording above.\n\n### More frontend options for Windows users\n\nFor Windows users, the community has shared several frontend options to complement the command-line functionality:\n\n1. **Beyond Compare** integration: Launch `video-compare` directly from the interface.\n\n2. **Total Commander** integration: Add a toolbar button to open selected videos.\n\n3. **[VideoCompareGUI](https://github.com/TetzkatLipHoka/VideoCompareGUI)**: A standalone graphical utility that simplifies launching `video-compare`.\n\nFor details, check out the [open GitHub issue thread](https://github.com/pixop/video-compare/issues/81).\n\n## Contributing\n\nWe're always looking for ways to improve and expand the tool. Your feedback and contributions are appreciated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixop%2Fvideo-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixop%2Fvideo-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixop%2Fvideo-compare/lists"}