Commit graph

46 commits

Author SHA1 Message Date
Josh Holmer fe585ac24c
Use std::available_parallelism instead of num_cpus (#633)
* Explicitly set minimum rust version

* Use std::available_parallelism instead of num_cpus
2022-05-21 08:55:43 +00:00
Josh Holmer 3003f646c9
Zones fixes (#624)
* 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
2022-05-01 03:35:59 +00:00
Josh Holmer 11d2b91215
Upgrade to edition 2021 (#610) 2022-04-10 16:46:49 +00:00
Josh Holmer 02ffc86601
Use published ffmpeg-next (#609) 2022-04-10 16:32:03 +00:00
Josh Holmer 84d46bb40c
Add zones support (#598)
* 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
2022-03-28 15:23:08 +00:00
redzic d9d15a90d0
Use git version of console-rs to avoid regex (#600) 2022-03-25 21:34:07 +00:00
Josh Holmer d480428fc6
Fix a memory leak in standard scene check method (#593) 2022-03-15 12:38:53 +00:00
redzic b0bb4687ee
Update dependencies (#589) 2022-03-12 13:37:29 +00:00
redzic 6634bc77f8
Update to ffmpeg 5.0 (#575)
* Update to ffmpeg 5.0
2022-02-22 22:17:37 +02:00
Josh Holmer c78d01528d
Update several dependencies (#568)
Notably:
- parking_lot
- sysinfo
and many patch version bumps
2022-02-07 05:39:01 +00:00
redzic 9dc898a67e
Update rav1e and vapoursynth (#565) 2022-02-01 06:52:08 +00:00
redzic 36fbff1dcd
Update version to 0.3.1 (#541) 2022-01-17 07:16:42 +00:00
Josh Holmer 6ab07aa7f0
Fix av1an versions in root cargo toml (#515) 2022-01-06 02:06:47 +00:00
Zen 7bb1b47eaa 0..3.0 2022-01-06 02:49:36 +02:00
redzic 1b27ef7e28
Remove ctrlc dependency (#509)
* Remove ctrlc dependency

* Update other dependencies
2022-01-04 10:23:00 +00:00
redzic 214adba05b
Migration to clap-v3 (#487) 2022-01-02 01:55:11 +00:00
Josh Holmer 56461c6b17
Add mergify config (#445)
* 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>
2021-12-15 17:58:00 -05:00
Josh Holmer 65772ba4c7
Enable thin-LTO for release builds (#418)
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.
2021-11-19 12:37:34 -06:00
Zen a874dec452 av1an 0.2.0 release 2021-10-31 22:56:47 +02:00
Zen 5c8a99879f bump av1an-cli version 2021-09-12 22:26:42 +03:00
Zen 782f74982b Bump version 2021-09-11 21:24:58 +03:00
Josh Holmer 911b75013e
Use cargo version of rav1e 0.5 (#391) 2021-10-31 20:20:58 +02:00
Josh Holmer 32cebb8808
Scene detect changes (#383)
* 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.
2021-10-20 19:54:48 +03:00
Josh Holmer c8547c7c9b
Changes for rav1e's hybrid scene detection update (#381) 2021-10-14 02:04:11 +03:00
redzic 3147a942a7
Reduce piping overhead to encoder in certain situations (#379)
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.
2021-10-13 05:21:55 +03:00
Josh Holmer f52c82f15c
Use a different method for ffmpeg frame count (#368)
* 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
2021-10-01 23:48:40 +03:00
Zen 9a95a00557 av1an to 0.1.0 + cargo release 2021-09-01 00:59:57 +03:00
Zen 1c7e3c816f cargo release 2021-08-31 14:22:24 +03:00
Zen 2b842e8c5a License corrections 2021-08-30 16:04:27 +03:00
Zen 0a9b664fdd fix versions 2021-08-30 15:54:53 +03:00
Zen 665249c104 set versions for av1an-cli, av1an-core 2021-08-29 19:14:34 +03:00
Zen 9eb9578340 removed unused clap 2021-08-29 19:05:22 +03:00
Zen 44a7fe1831 fix dependency 2021-08-29 18:59:28 +03:00
Zen 8cf8e7a62f format toml for release 2021-08-29 18:53:56 +03:00
redzic 5f9fa28f5d
Integrate av1an-scene-detection into av1an-core, fix some clippy warnings, update dependencies (#336) 2021-08-19 22:27:46 +03:00
redzic bf1b6e98b8
Better logging, integrate av1an-pyo3 into av1an-core (#314)
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.
2021-07-25 10:31:54 +03:00
redzic 1f49d0e84f
Remove commented out code, fix chunk restarting (#304) 2021-07-19 02:38:15 +03:00
Zen 322135a0f9 Wip encoder constructor, encoder defaults to rust 2021-06-21 13:26:16 +03:00
Zen 060d057c63 Wip rust arg parsing 2021-06-03 11:43:50 +03:00
Zen a8219d220e wip aom keyframes 2021-05-26 20:06:35 +03:00
redzic 41a25659e5 Use cargo workspaces, initial port of some vapoursynth functions 2021-05-16 02:33:25 -05:00
redzic 71e720a6ed some vapoursynth stuff, broken 2021-05-15 12:23:52 -05:00
redzic cc7f520b77 Broken state, implement determine_workers in rust 2021-05-14 00:56:01 -05:00
Zen 26e90f9107 try 2021-05-06 19:29:22 +03:00
Zen 720a944691 rust integration done-ish 2021-05-06 19:29:22 +03:00
Zen 819f4b8f65 try 2021-05-06 19:29:22 +03:00