* 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 command line arg for sc-only
* added arg to settings.rs
* Add check and kill after split_routine()
Deletes the temporary directory, it would be better if it was never created in the first place.
* Initialize sc_only in EncodeArgs
* cargo fmt
* Integration test
* Make -s a requirement
* cargo fmt
* Add -s as requirement to sc-only via clap
* revert f7688ca
* Fix me not reading errors
* revert db4fb3b
* Cargo fmt
* Added --scenes as a requirement for --sc-only with clap
* Update wording
* Trying to fix the weird integration bug
* Revert 393b380
* Condition on test failure
* Github actions again
* Filename in actions
- Update log levels so that the log file contains more verbose
information by default, while leaving the stderr progress indicator
relatively uncluttered
- Explicitly set the log level to `error` for all dependencies
- rav1e scenechange info has been moved to `--log-level trace`
- Avoid outputting colors if stderr is not a tty
- Fix a crash when using `--quiet`
People have been requesting this because the default chunk order tends
to skew toward underestimating the final filesize. Longest first is kept
as the default because it provides the best performance.
This commit mainly changes the behavior in 2 ways:
1. We now get the frame count and do scene detection in parallel. Initially, only the number of processed frames are shown, and the percentage stays at 100%, and the total frame count is 0. When the actual frame count is available, the progress bar is updated to reflect that. This can help I/O bound situations where the source is very large and the frame count takes a long time to calculate.
2. We also generate the vapoursynth cache in parallel with the scene detection and calculating the frame count. This eliminates the pause between scene detection and actual encoding (if vspipe finishes generating the cache in time, which will be the case 99% of the time, and it will still reduce the overhead in the very unlikely case that it hasn't finished yet).
Also fixes bug where vapoursynth input wouldn't work if you specified anything other than lsmash or ffms2 for the chunk method.
This argument optionally allows the scene detection to run on a
different pixel format, which allows you to for example run 8-bit scene
detection on a 10-bit source, which can be much faster.
This option is unstable because ideally we would instead have this
take the bit depth as an integer instead, as we do not want to allow any arbitrary
pixel format for scene detection. Also, it would waste some CPU time
converting from 4:4:4 to 4:2:0 for example considering that we only
consider the luma plane for scene detection, so ideally we'd have some
code to automatically pick a format that would avoid useless conversions
based on the desired bit depth.
ffmpeg takes a long time to get the frame count for some sources,
and it can be much faster to get it from done.json when resuming
instead of recalculating it every time encoding is resumed.
I kind of wish that we wouldn't use clippy::pedantic and
clippy::nursery, as the number of `allow` lints at the top of src/lib.rs
is becoming quite absurd. However, I at least wanted to clear out the
large set of warnings being issued, regardless of that discussion.
Previously, the pixel format of the input file was checked every time
a chunk was started. Now, we just get the pixel format once at the
beginning and reuse it for all chunks.
The SSE4.1/SSSE3 implementation of the parsing routines for
aomenc/vpxenc outperform the old regex by a factor of about 5000x
(3.5 μs vs. 0.7 ns to parse a single line on a Zen 1 1950x).
The idea is to eventually remove regex as a dependency entirely,
especially since there is an open PR to indicatif that speeds up the
template expansion (which replaces regexes with hand-written parsing).
* Rename `--logging` to `--log-file` (`-l` shorthand still works)
* Introduce new `--log-level` option to set the log level filter
This change makes `--verbose` not log chunk starts and finishes, and
that information is not logged in the log file either unless
`--log-level=debug` is set. By default, `--log-level` is set to `info`.
The `debug` log level also logs the rav1e scenechange decision info
for each frame.
* Adjust verbose progress style for workers
* Also add `-y` flag to overwrite output file without confirmation
* Update dependencies
* Fix compilation on older versions of rustc
* Improve logging (especially with `--verbose`)
Much more information is now logged when using `--verbose` (all INFO
messages), and the output is also much cleaner.
The issue of logs being hidden while the progress bar is active
because of conflicting ANSI escape codes has been completely fixed, and
no more undesirable hacks are required to correctly display the
set_thread_affinity warning message correctly, for example. This has
been achieved by using indicatif's `println` function instead of just
printing to stderr directly.
flexi_logger has been moved to av1an-cli as it should be, since a
logging framework that actually prints things and handles log level
filtering is not the responsibility of the core library. However, the
actual progress bar code with indicatif still lives in av1an-core for
now.
* Make `--quiet` conflict with `--verbose`
* Fix resuming and improve error handling slightly
Introduces a new command line option called `--set-thread-affinity=n`,
where `n` specifies the number of threads to assign to each worker.
We use the `affinity` crate instead of the `nix` crate directly to
get abstractions for Windows and Linux.
* Always copy subtitles and all audio tracks
Require mkvmerge for x265
* cargo update
* Fix concat if audio file does not exist
* Use stable rustc in Docker, do not compile VVC
* Use old Docker image for now which works with vapoursynth
* Fix tests.yml
* Use mkvmerge for tests
* Add mkvtoolnix as a dependency in tests.yml
* Refactor: Better ffmpeg pipe handling + more info in --version
* Update dependencies
* Better documentation in `--help`
* Include git commit hash and more info in `--version`
* Add `-k` as shorthand for `--keep`
* Do not pass `ffmpeg_pipe` around everywhere
* Use macro to generate encoder bit depth functions
* Fix documentation in README
* Fix some clippy warnings
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.