Commit graph

32 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 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
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 351d19accb
Rework log levels to be more useful (#546)
- 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`
2022-01-18 23:20:01 +00:00
redzic 36fbff1dcd
Update version to 0.3.1 (#541) 2022-01-17 07:16:42 +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 a9f3fb266e
Regular dependency upgrades (#471) 2021-12-25 03:24:18 +00:00
redzic 34d991d06d
Delegate chunk starts/finishes to debug log level, other logging changes (#412)
* 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.
2021-11-18 14:06:50 -06:00
redzic f94c65f992
Improve logging (especially with --verbose) (#404)
* 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
2021-11-17 10:57:08 +02: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
redzic eb1047aa30
Fix vergen for release (#393) 2021-10-31 22:20:38 +02:00
Zen 782f74982b Bump version 2021-09-11 21:24:58 +03:00
redzic e2451684b8
Refactor: Better ffmpeg pipe handling + more info in --version (#389)
* 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
2021-10-30 14:49:26 +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
Zen 72cdd15b51 change av1an-cli structure, bump to 0.1.1 2021-08-31 14:22:15 +03:00
Zen f98431900f av1an-cli dependencies 2021-08-30 16:15:26 +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 d48d3c92b4 add descriptions to av1an-cli, av1an-core 2021-08-30 15:53:31 +03:00
redzic 14574f17d1
Remove other unused dependencies (#347) 2021-08-29 19:29:03 +03:00
Zen 8cf8e7a62f format toml for release 2021-08-29 18:53:56 +03:00
redzic cebbee90d4
Refactoring, allow compiling with Rust 1.53 (#346)
Switch back to an old version of sysinfo, as 0.20 requires 1.54 to compile it, which is too new for MSYS2. Many minor simplifications.

We also switch to structopt for now instead of the beta release of clap, as clap officially recommends to not use the beta yet, and it caused some problems when compiling on Windows or with an older compiler.

Some minor changes:

- The `decow_strings` function has been removed, and we deal with `Cow<str>` properly now.
- The `remove_patterns` function now takes a mutable reference to a `Vec<String>` instead of copying one and modifing it to reduce complexity and overhead.
- The structs used to serialize the VMAF json result have been renamed to `VmafResult`, `Metrics`, and `VmafScore` (they were previously `Foo`, `Bar`, and `Baz`)
- Using an enum instead of a string as the argument to `log_probes` for better type safety and less overhead
- `frame_check_output` now warns if there is a mismatch, and the message has been updated to be more clear that a frame mismatch has occurred
- Several other small changes
2021-08-29 18:25:57 +03:00
Tatsuyuki Ishi f08628df2f
Replace some panics with Err returns (#341)
* av1an-core: replace some panics with Err returns
* av1an-cli: use anyhow::Result as the return type of main
2021-08-22 07:35:24 +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 2b2138da5f
Remove all remaining Python code (#302) 2021-07-19 01:52:05 +03:00
Zen 060d057c63 Wip rust arg parsing 2021-06-03 11:43:50 +03:00