____ ____._______ ____._______________________
\ \ / /| \ \ / /| \_ ___ \__ ___/ .__ .__
\ Y / | |\ Y / | / \ \/ | | __| |___ __| |___
\ / | | \ / | \ \____| | /__ __/ /__ __/
\___/ |___| \___/ |___|\______ /|____| |__| |__|
\/
VIVICT VIDEO COMPARISON TOOL ++
An easy to use tool for subjective comparison of the visual quality of different encodings of the same video source.
(Screenshot contains images from Tears Of Steel, (CC) Blender Foundation, licensed under Creative Commons Attribution License )
Vivict++ is a sibling to vivict. Vivict++ is not limited by browser support for different video format and codecs, and therefore, it is able to support a much wider range of formats and codecs, due to the power of the FFmpeg libav*libraries. Basically, Vivict++ supports any format/codec supported by ffmpeg.
Note that this software is in an alpha state. Bugs can be expected, the code is not as clean as one would wish etc. See known issues
sudo snap install vivictpp
or alternatively, to install from edge channel,
sudo snap install --edge vivictpp
Note that due to snap security features, vivictpp will only be able to access files in your home folder when installed from snap. Connecting the vivictpp snap to the systems removable-media slot will allow also accessing files in location under /mnt and /media. The below command can be used for this.
sudo snap connect vivictpp:removable-media :removable-media
brew tap vivictorg/vivictpp
brew install vivictpp
Download and run the installer from the latest release
You an also download the installer from a prerelase if you want to try out the latest unreleased features.
- Install dependencies
$ apt-get --fix-missing install -y cmake python3-pip gcc python3-setuptools \
python3-wheel libfreetype6-dev libavformat-dev libavcodec-dev \
libavfilter-dev libswscale-dev pkg-config
$ pip3 install ninja meson
- Create meson builddir
$ meson -Duse_sdl2_subproject=true builddir
(Setting the use_sdl2_subproject
option will cause meson to build sdl2 and sdl2_ttf
as subprojects. This is recomended on ubuntu since the sdl2 version provided by ubuntu
is not the most recent one)
- Compile
$ meson compile -C builddir
- The
vivictpp
executable should now be available inbuilddir
- Install dependencies
Installing vivictpp from brew should install the necessary dependencies.
$ brew tap vivictorg/vivictpp
$ brew install vivictpp
- Create meson builddir
$ meson builddir
- Compile
$ meson compile -C builddir
- The
vivictpp
executable should now be available inbuilddir
This has been tested on windows 11
- Follow the guide here to install meson and the Visual Studio toolchain
- Create a folder for dependencies inside the vivictpp repository folder
mkdir winlibs
- Download the following archives and extract them to the
winlibs
folder
- https://libsdl.org/release/SDL2-devel-2.26.5-VC.zip
- https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.20.2-VC.zip
- https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-5.1.2-full_build-shared.7z
- Create meson builddir
meson setup builddir
- Compile
meson compile -C builddir
vivctpp.exe
is now available inbuilddir
. Note that you will need to add directories containing all dlls to path to be able to execute it.
PATH=%PATH%;<VIVICTPPDIR>\winlibs\SDL2-2.26.5\lib\x64;<VIVICTPPDIR>\winlibs\SDL2_ttf-2.20.2\lib\x64;<VIVICTPPDIR>\winlibs\ffmpeg-5.1.2-full_build-shared\lib
8000
Run with the -h flag to see the commandline options
> vivictpp -h
Vivict++ - Vivict Video Comparison Tool ++
Usage: ./build/vivictpp [OPTIONS] leftVideo [rightVideo]
Positionals:
leftVideo TEXT REQUIRED Path or url to first (left) video
rightVideo TEXT Path or url to second (right) video
Options:
-h,--help Print this help message and exit
--left-filter TEXT Video filters for left video
--right-filter TEXT Video filters for left video
--enable-audio Enable audio
--left-vmaf TEXT Path to csv-file containing vmaf data for left video
--right-vmaf TEXT Path to csv-file containing vmaf data for right video
--left-format TEXT Format options for left video input
--right-format TEXT Format options for right video input
--disable-font-autoscaling Disables autoscaling of fonts based on display dpi
--custom-font-scaling FLOAT Custom scaling factor for fonts
--hwaccel TEXT Select device type to use for hardware accelerated decoding. Valid values are:
auto Use any available device type (default)
none Disable hardware accelerated decoding
TYPE Name of devicetype, see https://trac.ffmpeg.org/wiki/HWAccelIntro
--preferred-decoders TEXT Comma separated list of decoders that should be preferred over default decoder when applicable
--imgui,--disable-imgui{false}
Enable experimental ImGui UI
KEYBOARD SHORTCUTS
SPACE Play/Pause video
, Step forward 1 frame
. Step backward 1 frame
/ or - Seek forward 5 seconds
m Seek backward 5 seconds
? Seek Forward 60s
M Seek backward 60s
Alt-? Seek Forward 10min
Alt-M Seek Backward 10min
< Decrease left frame offset
> Increase left frame offset
[ Decrease playback speed
] Increase playback speed
f Toggle full screen
u Zoom in
i Zoom out
0 Reset pan and zoom to default
s Toggle scale content to fit window
t Toggle visibility of time
d Toggle visibility of Stream and Frame metadata
p Toggle visibility of vmaf plot (if vmaf data present)
q Quit application
See also https://github.com/svt/vivictpp#readme
Vivict++ 0.2.5
To visually compare two videos in files (or urls) VIDEO1 and VIDEO2 respectively:
> vivictpp VIDEO1 VIDEO2
Vivict++ can also be run with only one video
> vivictpp VIDEO1
- The split line is controlled by simply moving the mouse left and right
- Panning is done by left clicking and dragging
- Left clicking anywhere starts/stops the playback
The --left-filter
and --right-filter
options can be used to specify ffmpeg filters that are applied to the input(s) before being displayed. The filters should be specified using ffmpeg filter syntax, see FFmpeg Filters Documentation
For example, to compare an interlaced source with a transcoded and deinterlaced variant, the below command could be used
> vivictpp --left-filter yadif SOURCEVIDEO TRANSCODEDVIDEO
There are two kind of hardware accelerated decoders in ffmpeg/libav, internal hwaccel decoders and external wrapper decoders. Vivict++ has support for both, allthough this should be considered an experimental feature.
To use libav internal hwaccel decoders, the --hwaccel
option can be used. By default it is set to none
which mean
internal hardware accelerated decoders will be disabled. If auto
is passed to the --hwaccel
option any available api
for hardware accelerated decoding will be used. It is also possible to specify a specific hardware acceleration api to use
, such as vaapi
, videotoolbox
etc.
To use external wrapper decoders, use the --preferred-decoders
option (see below) to specify the decoders to use.
For more info on harware accelerating decoding, see https://trac.ffmpeg.org/wiki/HWAccelIntro .
Note that even with hardware accelerated decoding, depending of the format of the source video, vivict++ might still
use quite a bit of cpu to do pixel format conversion. With --hwaccel cuda
or --hwaccel vaapi
pixel format conversion may be done on
the gpu.
In some cases it might be preferable to use a different decoder than the libav default. For instance, libopenjpeg
may give
better performance than libav's native jpeg2000 decoder, and one may want to use hevc_cuvid
instead of the x265 decoder.
A comma separated list of preferred codecs can be specified on the commandline with the --preferred-decoders
option.
The codec name should be as listed by ffmpeg -codecs
. The first, if any, of the listed preferred codecs that is aplicable
for the input will be used for decoding. Non-applicable codecs will simply be ignored.
For instance, to use cuvid decoders for h264 and h265, and libopenjpeg for jpeg 2000 input, one would call vivictpp like below.
vivictpp --preferred-decoders h264_cuvid,hevc_cuvid,libopenjpeg video.mp4
Note that this functionality is currently not available in the new imgui UI. To use this functionality vivictpp must be started with the --disable-imgui flag
Vivict++ can display VMAF data if such is provided by using the --left-vmaf
and/or --right-vmaf
options. The command line options take a path to a csv-file containing the data as argument. The file is expected to be a csv-file created by the FFmpeg libvmaf filter with log_fmt=csv
.
In case your input file is in a format this not easily identified, ie raw video, you can use the --left-format
and --right-format
to tell vivictpp how to interpret the input file. These options should be followed by a colon-separated list of key=value pairs. If format
is specified as key, the corresponding value will be passed to av_find_input_format to find the correct input format. Any other key value pairs will be passed to avformat_open_input through the options
parameter.
Example for playing a file containing raw video data:
vivictpp --left-format format=rawvideo:pixel_format=yuv422p10:video_size=1280x720:framerate=50 my-file.yuv
Playback speed can be controlled with [
and ]
.
Logging for debugging purposes can be enabled by setting the environment variable SPDLOG_LEVEL
to DEBUG
or even TRACE
.
Some classes have a named logger, setting for a specific logger can be done like below
SPDLOG_LEVEL=info,DecoderWorker=debug vpp file1 file2
The log level for the libav libraries can be specified by setting the environment variable AVLOG_LEVEL
. Valid values are
quiet, panic, fatal, error, warning, info, verbose, debug, trace
.
Audio is currently not supported in the new imgui UI. If vivictpp is started with the --disable-imgui
flag, audio is supported.
- Audio sync is less than perfect
This project more or less follows the LLVM standard.
Contributions are welcome! See Contributing, as well as the Code of Conduct.
The testdata folder contains some testdata generated with FFmpeg.
Vivict++ uses the following thirdparty dependencies.
- FFmpeg libav*libraries like libavcodec, libavfilter and more (GNU General Public License (GPL) version 2 or later (OR LGPL))
- SDL2 (zlib License)
- SDL2_ttf (zlib License)
- ImGui (MIT License)
- ImGuiFileDialog (MIT License)
- spdlog (MIT License)
- cli11 (The 3-Clause BSD License)
- Catch2 (Boost Software License 1.0)
- FreeMono from GNU freefont (GPL License)
- vivict-icons (MIT License)
Vivict++ is licensed under the GNU General Public License version 2, or later. Derivative work may be relicensed to a later version of GPL. See LICENSE.