* Fix formatting of zones help text
* Fix issue where wrong number of frames are read in scenechange with zones active
* Fix scenechange progress bar when zones active
* Add zones support
Currently implemented:
- Overriding the selected encoder & number of passes
- Overriding or adding video params
- Overriding photon noise setting
- Overriding min/max scene length
Closes#267
* Error if zoned encoder does not support output pixel format
* Fix crash if zones change number of passes
* Set passes to 1 for zones with rt mode
* Add mergify config
This config includes the following rules:
- Automatically merge once a PR passes all tests and is approved.
- Automatically backport each PR from our main branch into our stable branch
* Merge all tests into one run
* Cleanup and speed up test suite
* Migrate to a docker image with dav1d
* Create CI profile with debug assertions enabled
* Use faster params for all encoders
Co-authored-by: Redzic <yusufredzic@gmail.com>
Although the majority of av1an's time is spent
in third-party binaries, compiling with thin-LTO
does show up to a 10% improvement on scene detection
time. This will cause compilation to be slower.
However, thin-LTO has far less of a compilation time
impact than full LTO, while providing almost the same
speedups.
* Remove sc-downscale-height CLI option
The standard scenecut detection method at 1080p
is currently as fast as downsampling to 720p
and running scenecut detection on that, and the
fast scenecut method is significantly faster
without downsampling, because the algorithm
is faster than ffmpeg's resizing algorithm.
As such, it doesn't make sense to have this option anymore.
* Fix conditional use of newer VS APIs
It makes sense to enable these by default,
since the vast majority of users
should have a moderately recent version
of Vapoursynth.
We also needed to disable the static ffmpeg
as the default for now. libaom returns None
for the pixel format, so it is not usable
for the changes needed later in this PR.
I attempted to get the git version of
ffmpeg-next compiling with libdav1d,
but was running into issues, I believe
because Arch's package manager only includes
a dynamic library for libdav1d and not
a static version. It probably makes sense
to disable it anyway given the issues
Windows users have been having with it.
* No longer convert input to 8-bit for scene detect
It appears that downconverting does have an impact
on scene detection accuracy. The speed penalty
for running in 10-bit compared to 8-bit is only
10%. Given this, it seems preferable to run
the scene detect in the more accurate format.
* Skip ffmpeg intermediate step for vapoursynth input
* Fix skipping of ffmpeg pipe step
This optimization added in #379 was never triggered.
Because the initialize() method always added a set
of default params to self.ffmpeg_params, the clause
to skip the ffmpeg pipe, self.ffmpeg_params.is_empty(),
was unreachable.
* Revert "Remove sc-downscale-height CLI option"
This reverts commit a51763607faddae07a595f567d4f4cf815de3299.
* Validate pixel formats based on encoder support
* Fix CI build
The dynamic linking of ffmpeg doesn't seem to play nicely with
the old version of ffmpeg which is packaged in Ubuntu's last LTS.
This enables static linking when we are running in CI to work around
that issue, given that that workaround is easier than overhauling
which docker container we use.
Previously, we always piped the chunk method into FFmpeg
to apply filters and convert the pixel format, but this
just adds unnecessary overhead if there is no FFmpeg filter
specified and if the pixel format of the source and encode
are the same. So, in that situation, we now pipe the chunk
method directly into the encoder instead. This should
nicely speed things up a bit (and possibly reduce memory
consumption).
Additionally, `--pix-format` is now verified using the FFmpeg
API when the CLI args are parsed, making it impossible to
accidentally specify an incorrect format. Previously, there
were no checks at all, so if you specified the wrong format it
would just fail during the encoding process with no obvious
indication of the root cause.
This does not apply to vapoursynth input for now, as that
would be slightly more complicated since it has a different
API for getting the pixel format.
* Use a different method for ffmpeg frame count
This method uses ffprobe to count the number of packets
(which is identical to the number of frames, but faster)
in a video stream. This works with more video formats,
including with --enable-keyframe-filtering=2 in aomenc.
Performance should be similar or better than ffmpeg -copy.
* Add sanity check when using keyframe filtering 2
* Use ffmpeg-next crate for getting frame count
* Add LLVM/Clang to Github Actions
* Enable ffmpeg static and build features by default
Implements more robust logging via flexi_logger. This replaces the old
logging implementation, and is also more ergonomic, since macros from the
`log` crate are now used instead of `format!` directly. Now, warnings
and errors are also logged to stderr, in addition to the log file.
This also removes av1an-pyo3, and integrates the code into av1an-core.
Concatenation with FFmpeg is now handled on Windows differently than
other platforms through conditional compilation. FFmpeg seems to need
double backslashes in the concat file, so this is explicitly handled
in the Windows build now. Also, the spinner is now disabled on Windows
builds since the default command prompt cannot display the characters
correctly.