diff --git a/Cargo.lock b/Cargo.lock index b3df8f81..60c69ff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -755,12 +755,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -1754,7 +1755,7 @@ dependencies = [ "http 1.1.0", "hyper", "hyper-util", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", "tokio-rustls", @@ -1985,7 +1986,7 @@ dependencies = [ "nom", "percent-encoding", "quoted_printable", - "rustls 0.23.4", + "rustls 0.23.5", "rustls-pemfile", "socket2 0.5.6", "tokio", @@ -2676,9 +2677,9 @@ checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "reqwest" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e6cc1e89e689536eb5aeede61520e874df5a4707df811cd5da4aa5fbb2aae19" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ "base64 0.22.0", "bytes", @@ -2698,7 +2699,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pemfile", "rustls-pki-types", "serde", @@ -2816,9 +2817,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring", @@ -2830,9 +2831,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4d6d8ad9f2492485e13453acbb291dd08f64441b6609c491f1c2cd2c6b4fe1" +checksum = "afabcee0551bd1aa3e18e5adbf2c0544722014b899adb31bd186ec638d3da97e" dependencies = [ "log", "once_cell", @@ -3482,18 +3483,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", @@ -3596,7 +3597,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] diff --git a/ffplayout-frontend b/ffplayout-frontend index 36bb29aa..56db578d 160000 --- a/ffplayout-frontend +++ b/ffplayout-frontend @@ -1 +1 @@ -Subproject commit 36bb29aa5fe3b5c82eca67251f57919a75275b47 +Subproject commit 56db578d8cf69aee7fc573828016fa728315bf79 diff --git a/lib/src/utils/config.rs b/lib/src/utils/config.rs index 770af394..52fa0f10 100644 --- a/lib/src/utils/config.rs +++ b/lib/src/utils/config.rs @@ -381,7 +381,7 @@ impl PlayoutConfig { Ok(file) => file, Err(_) => { eprintln!( - "{config_path:?} doesn't exists!\nPut \"ffplayout.yml\" in \"/etc/playout/\" or beside the executable!" + "ffplayout.yml not found!\nPut \"ffplayout.yml\" in \"/etc/playout/\" or beside the executable!" ); process::exit(1); } diff --git a/lib/src/utils/json_validate.rs b/lib/src/utils/json_validate.rs index 55b6abfa..d66d27e3 100644 --- a/lib/src/utils/json_validate.rs +++ b/lib/src/utils/json_validate.rs @@ -17,6 +17,7 @@ use crate::utils::{ JsonPlaylist, Media, OutputMode::Null, PlayerControl, PlayoutConfig, FFMPEG_IGNORE_ERRORS, IMAGE_FORMAT, }; +use crate::ADVANCED_CONFIG; /// Validate a single media file. /// @@ -30,19 +31,23 @@ fn check_media( begin: f64, config: &PlayoutConfig, ) -> Result<(), ProcError> { - let mut enc_cmd = vec_strings!["-hide_banner", "-nostats", "-v", "level+info"]; + let mut dec_cmd = vec_strings!["-hide_banner", "-nostats", "-v", "level+info"]; let mut error_list = vec![]; let mut config = config.clone(); config.out.mode = Null; let mut process_length = 0.1; + if let Some(decoder_input_cmd) = &ADVANCED_CONFIG.decoder.input_cmd { + dec_cmd.append(&mut decoder_input_cmd.clone()); + } + if config.logging.detect_silence { process_length = 15.0; let seek = node.duration / 4.0; // Seek in file, to prevent false silence detection on intros without sound. - enc_cmd.append(&mut vec_strings!["-ss", seek]); + dec_cmd.append(&mut vec_strings!["-ss", seek]); } // Take care, that no seek and length command is added. @@ -75,13 +80,13 @@ fn check_media( filter.add_filter("silencedetect=n=-30dB", 0, Audio); - enc_cmd.append(&mut node.cmd.unwrap_or_default()); - enc_cmd.append(&mut filter.cmd()); - enc_cmd.append(&mut filter.map()); - enc_cmd.append(&mut vec_strings!["-t", process_length, "-f", "null", "-"]); + dec_cmd.append(&mut node.cmd.unwrap_or_default()); + dec_cmd.append(&mut filter.cmd()); + dec_cmd.append(&mut filter.map()); + dec_cmd.append(&mut vec_strings!["-t", process_length, "-f", "null", "-"]); let mut enc_proc = Command::new("ffmpeg") - .args(enc_cmd) + .args(dec_cmd) .stderr(Stdio::piped()) .spawn()?;