Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
damster101 authored Sep 23, 2024
2 parents f52486a + 4cb7935 commit 64edff5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 39 deletions.
34 changes: 6 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Prerequisites:

Optional:

- [L-SMASH](https://github.com/AkarinVS/L-SMASH-Works) VapourSynth plugin for better chunking (recommended)
- [L-SMASH](https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works) VapourSynth plugin for better chunking (recommended)
- [DGDecNV](https://www.rationalqm.us/dgdecnv/dgdecnv.html) Vapoursynth plugin for very fast and accurate chunking, `dgindexnv` executable needs to be present in system path and an NVIDIA GPU with CUVID
- [ffms2](https://github.com/FFMS/ffms2) VapourSynth plugin for better chunking
- [bestsource](https://github.com/vapoursynth/bestsource) Vapoursynth plugin for slow but accurate chunking
Expand Down
3 changes: 1 addition & 2 deletions av1an-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "av1an-core"
version = "0.4.1"
version = "0.4.3"
rust-version = "1.79"
edition = "2021"
authors = ["Zen <master_of_zen@protonmail.com>"]
Expand All @@ -17,7 +17,6 @@ license = "GPL-3.0"
[dependencies]
log = "0.4.14"
arrayvec = "0.7.2"
atty = "0.2.14"
av-format = "0.7.0"
av-ivf = "0.5.0"
av1-grain = { version = "0.2.1", default-features = false, features = [
Expand Down
4 changes: 2 additions & 2 deletions av1an-core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::BTreeSet;
use std::convert::TryInto;
use std::ffi::OsString;
use std::fs::File;
use std::io::Write;
use std::io::{IsTerminal, Write};
use std::path::{Path, PathBuf};
use std::process::{exit, Command, Stdio};
use std::sync::atomic::{self, AtomicBool, AtomicUsize};
Expand Down Expand Up @@ -258,7 +258,7 @@ impl Av1anContext {
}
self.args.workers = cmp::min(self.args.workers, chunk_queue.len());

if atty::is(atty::Stream::Stderr) {
if std::io::stderr().is_terminal() {
eprintln!(
"{}{} {} {}{} {} {}{} {}\n{}: {}",
Color::Green.bold().paint("Q"),
Expand Down
4 changes: 2 additions & 2 deletions av1an-core/src/scene_detect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::io::Read;
use std::io::{IsTerminal, Read};
use std::process::{Command, Stdio};
use std::thread;

Expand Down Expand Up @@ -28,7 +28,7 @@ pub fn av_scenechange_detect(
zones: &[Scene],
) -> anyhow::Result<(Vec<Scene>, usize)> {
if verbosity != Verbosity::Quiet {
if atty::is(atty::Stream::Stderr) {
if std::io::stderr().is_terminal() {
eprintln!("{}", Style::default().bold().paint("Scene detection"));
} else {
eprintln!("Scene detection");
Expand Down
3 changes: 1 addition & 2 deletions av1an/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "av1an"
version = "0.4.1"
version = "0.4.3"
authors = ["Zen <master_of_zen@protonmail.com>"]
description = """
Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding [Command line library]
Expand All @@ -18,7 +18,6 @@ name = "av1an"
path = "src/main.rs"

[dependencies]
atty = "0.2.14"
clap = { version = "4.0.32", features = ["derive"] }
shlex = "1.3.0"
path_abs = "0.5.1"
Expand Down
4 changes: 2 additions & 2 deletions av1an/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::io::{self, Write};
use std::io::{self, IsTerminal, Write};
use std::path::{Path, PathBuf};
use std::process::exit;
use std::thread::available_parallelism;
Expand Down Expand Up @@ -824,7 +824,7 @@ impl LogWriter for StderrLogger {
return Ok(());
}

let style = if atty::is(atty::Stream::Stderr) {
let style = if io::stderr().is_terminal() {
match record.level() {
Level::Error => Style::default().fg(Color::Fixed(196)).bold(),
Level::Warn => Style::default().fg(Color::Fixed(208)).bold(),
Expand Down

0 comments on commit 64edff5

Please sign in to comment.