diff --git a/README.md b/README.md index 7145d7b8..6768e644 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,6 @@ Prerequisites: Optional: - [L-SMASH](https://github.com/AkarinVS/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 - [mkvmerge](https://mkvtoolnix.download/) to use mkvmerge instead of FFmpeg for file concatenation diff --git a/av1an-core/src/context.rs b/av1an-core/src/context.rs index f7576a97..6dc4b195 100644 --- a/av1an-core/src/context.rs +++ b/av1an-core/src/context.rs @@ -147,7 +147,7 @@ impl Av1anContext { // generated when vspipe is first called), so it's not worth adding all the extra complexity. if (self.args.input.is_vapoursynth() || (self.args.input.is_video() - && matches!(self.args.chunk_method, ChunkMethod::LSMASH | ChunkMethod::FFMS2 | ChunkMethod::DGDECNV | ChunkMethod::BESTSOURCE))) + && matches!(self.args.chunk_method, ChunkMethod::LSMASH | ChunkMethod::FFMS2 | ChunkMethod::BESTSOURCE))) && !self.args.resume { self.vs_script = Some(match &self.args.input { @@ -665,10 +665,7 @@ impl Av1anContext { fn create_encoding_queue(&mut self, scenes: &[Scene]) -> anyhow::Result> { let mut chunks = match &self.args.input { Input::Video(_) => match self.args.chunk_method { - ChunkMethod::FFMS2 - | ChunkMethod::LSMASH - | ChunkMethod::DGDECNV - | ChunkMethod::BESTSOURCE => { + ChunkMethod::FFMS2 | ChunkMethod::LSMASH | ChunkMethod::BESTSOURCE => { let vs_script = self.vs_script.as_ref().unwrap().as_path(); self.create_video_queue_vs(scenes, vs_script) } diff --git a/av1an-core/src/lib.rs b/av1an-core/src/lib.rs index 5e3b92bf..5a84ee96 100644 --- a/av1an-core/src/lib.rs +++ b/av1an-core/src/lib.rs @@ -305,8 +305,6 @@ pub enum ChunkMethod { FFMS2, #[strum(serialize = "lsmash")] LSMASH, - #[strum(serialize = "dgdecnv")] - DGDECNV, #[strum(serialize = "bestsource")] BESTSOURCE, } diff --git a/av1an-core/src/settings.rs b/av1an-core/src/settings.rs index 0b4e957b..026998b3 100644 --- a/av1an-core/src/settings.rs +++ b/av1an-core/src/settings.rs @@ -13,9 +13,7 @@ use crate::concat::ConcatMethod; use crate::encoder::Encoder; use crate::parse::valid_params; use crate::target_quality::TargetQuality; -use crate::vapoursynth::{ - is_bestsource_installed, is_dgdecnv_installed, is_ffms2_installed, is_lsmash_installed, -}; +use crate::vapoursynth::{is_bestsource_installed, is_ffms2_installed, is_lsmash_installed}; use crate::vmaf::validate_libvmaf; use crate::{ChunkMethod, ChunkOrdering, Input, ScenecutMethod, SplitMethod, Verbosity}; @@ -127,12 +125,6 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin "FFMS2 is not installed, but it was specified as the chunk method" ); } - if self.chunk_method == ChunkMethod::DGDECNV && which::which("dgindexnv").is_err() { - ensure!( - is_dgdecnv_installed(), - "Either DGDecNV is not installed or DGIndexNV is not in system path, but it was specified as the chunk method" - ); - } if self.chunk_method == ChunkMethod::BESTSOURCE { ensure!( is_bestsource_installed(), diff --git a/av1an-core/src/vapoursynth.rs b/av1an-core/src/vapoursynth.rs index 82febc85..8662265d 100644 --- a/av1an-core/src/vapoursynth.rs +++ b/av1an-core/src/vapoursynth.rs @@ -6,7 +6,6 @@ use std::path::{Path, PathBuf}; use anyhow::{anyhow, bail}; use once_cell::sync::Lazy; use path_abs::PathAbs; -use std::process::Command; use vapoursynth::prelude::*; use vapoursynth::video_info::VideoInfo; @@ -46,13 +45,6 @@ pub fn is_ffms2_installed() -> bool { *FFMS2_PRESENT } -pub fn is_dgdecnv_installed() -> bool { - static DGDECNV_PRESENT: Lazy = - Lazy::new(|| VAPOURSYNTH_PLUGINS.contains("com.vapoursynth.dgdecodenv")); - - *DGDECNV_PRESENT -} - pub fn is_bestsource_installed() -> bool { static BESTSOURCE_PRESENT: Lazy = Lazy::new(|| VAPOURSYNTH_PLUGINS.contains("com.vapoursynth.bestsource")); @@ -65,8 +57,6 @@ pub fn best_available_chunk_method() -> ChunkMethod { ChunkMethod::LSMASH } else if is_ffms2_installed() { ChunkMethod::FFMS2 - } else if is_dgdecnv_installed() { - ChunkMethod::DGDECNV } else if is_bestsource_installed() { ChunkMethod::BESTSOURCE } else { @@ -204,34 +194,12 @@ pub fn create_vs_file( match chunk_method { ChunkMethod::FFMS2 => "ffindex", ChunkMethod::LSMASH => "lwi", - ChunkMethod::DGDECNV => "dgi", ChunkMethod::BESTSOURCE => "json", _ => return Err(anyhow!("invalid chunk method")), } )))?; - if chunk_method == ChunkMethod::DGDECNV { - // Run dgindexnv to generate the .dgi index file - let dgindexnv_output = temp.join("split").join("index.dgi"); - - Command::new("dgindexnv") - .arg("-h") - .arg("-i") - .arg(source) - .arg("-o") - .arg(&dgindexnv_output) - .output()?; - - let dgindex_path = dgindexnv_output.canonicalize()?; - load_script.write_all( - format!( - "from vapoursynth import core\n\ - core.max_cache_size=1024\n\ - core.dgdecodenv.DGSource(source={dgindex_path:?}).set_output()" - ) - .as_bytes(), - )?; - } else if chunk_method == ChunkMethod::BESTSOURCE { + if chunk_method == ChunkMethod::BESTSOURCE { load_script.write_all( format!( "from vapoursynth import core\n\ diff --git a/av1an/src/main.rs b/av1an/src/main.rs index 955d075e..08bdfdbe 100644 --- a/av1an/src/main.rs +++ b/av1an/src/main.rs @@ -44,11 +44,9 @@ fn version() -> &'static str { * VapourSynth Plugins systems.innocent.lsmas : {} com.vapoursynth.ffms2 : {} - com.vapoursynth.dgdecodenv : {} com.vapoursynth.bestsource : {}", isfound(vapoursynth::is_lsmash_installed()), isfound(vapoursynth::is_ffms2_installed()), - isfound(vapoursynth::is_dgdecnv_installed()), isfound(vapoursynth::is_bestsource_installed()) ) } @@ -336,10 +334,6 @@ pub struct CliOpts { /// cause artifacts in the piped output). Slightly faster than lsmash for y4m input. Requires the ffms2 vapoursynth plugin to be /// installed. /// - /// dgdecnv - Very fast, but only decodes AVC, HEVC, MPEG-2, and VC1. Does not require intermediate files. - /// Requires dgindexnv to be present in system path, NVIDIA GPU that support CUDA video decoding, and dgdecnv vapoursynth plugin - /// to be installed. - /// /// bestsource - Very slow but accurate. Linearly decodes input files, very slow. Does not require intermediate files, requires the BestSource vapoursynth plugin /// to be installed. /// @@ -355,7 +349,7 @@ pub struct CliOpts { /// segment - Create chunks based on keyframes in the source. Not frame exact, as it can only split on keyframes in the source. /// Requires intermediate files (which can be large). /// - /// Default: lsmash (if available), otherwise ffms2 (if available), otherwise DGDecNV (if available), otherwise bestsource (if available), otherwise hybrid. + /// Default: lsmash (if available), otherwise ffms2 (if available), otherwise bestsource (if available), otherwise hybrid. #[clap(short = 'm', long, help_heading = "Encoding")] pub chunk_method: Option, diff --git a/docs/CLI.md b/docs/CLI.md index 2408b720..c7f585d2 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -239,10 +239,6 @@ Slightly faster than lsmash for y4m input. Requires the ffms2 vapoursynth plugin to be installed. - dgdecnv - Very fast, but only decodes AVC, HEVC, MPEG-2, and VC1. Does not require intermediate files. - Requires dgindexnv to be present in system path, NVIDIA GPU that support CUDA video decoding, and dgdecnv vapoursynth plugin - to be installed. - bestsource - Very slow but accurate. Linearly decodes input files. Does not require intermediate files, requires the BestSource vapoursynth plugin to be installed. @@ -260,9 +256,9 @@ segment - Create chunks based on keyframes in the source. Not frame exact, as it can only split on keyframes in the source. Requires intermediate files (which can be large). - Default: lsmash (if available), otherwise ffms2 (if available), otherwise DGDecNV (if available), otherwise bestsource (if available), otherwise hybrid. + Default: lsmash (if available), otherwise ffms2 (if available), otherwise bestsource (if available), otherwise hybrid. - [possible values: segment, select, ffms2, lsmash, dgdecnv, bestsource, hybrid] + [possible values: segment, select, ffms2, lsmash, bestsource, hybrid] --chunk-order The order in which av1an will encode chunks