From cfaa70891c6c5d966f74b792cc1de6053fe37e1b Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 8 Mar 2023 17:24:50 +0100 Subject: [PATCH 1/4] check against more parameters, change error message --- ffplayout-engine/src/output/desktop.rs | 21 ++++++++++++++++----- ffplayout-engine/src/output/mod.rs | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ffplayout-engine/src/output/desktop.rs b/ffplayout-engine/src/output/desktop.rs index a280fe3d..da37d075 100644 --- a/ffplayout-engine/src/output/desktop.rs +++ b/ffplayout-engine/src/output/desktop.rs @@ -24,13 +24,24 @@ pub fn output(config: &PlayoutConfig, log_format: &str) -> process::Child { ]; if let Some(mut cmd) = config.out.output_cmd.clone() { - if !cmd - .iter() - .any(|i| ["-c:v", "-vcodec", "-c:a", "-acodec"].contains(&i.as_str())) - { + if !cmd.iter().any(|i| { + [ + "-c:v", + "-c:v:0", + "-b:v", + "-b:v:0", + "-vcodec", + "-c:a", + "-acodec", + "-crf", + "-map", + "-filter_complex", + ] + .contains(&i.as_str()) + }) { enc_cmd.append(&mut cmd); } else { - warn!("Desktop output supports custom parameters, but given ones a not supported by ffplay!"); + warn!("Given output parameter a skipped, they are not supported by ffplay!"); } } diff --git a/ffplayout-engine/src/output/mod.rs b/ffplayout-engine/src/output/mod.rs index bbe9da45..96b587e1 100644 --- a/ffplayout-engine/src/output/mod.rs +++ b/ffplayout-engine/src/output/mod.rs @@ -159,7 +159,7 @@ pub fn player( for rx in ingest_receiver.as_ref().unwrap().try_iter() { if let Err(e) = enc_writer.write(&rx.1[..rx.0]) { - error!("Encoder write error: {:?}", e); + error!("Error from Ingest: {:?}", e); break 'source_iter; }; @@ -187,7 +187,7 @@ pub fn player( if dec_bytes_len > 0 { if let Err(e) = enc_writer.write(&buffer[..dec_bytes_len]) { - error!("Encoder write error: {e:?}"); + error!("Encoder write error: {}", e.kind()); break 'source_iter; }; From b292cd00bfaf360cc78674a546939f188de14ae8 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 10 Mar 2023 10:01:45 +0100 Subject: [PATCH 2/4] fix skip clip, when is to short --- ffplayout-engine/src/input/playlist.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index 394bccb1..38ce245d 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -442,8 +442,8 @@ fn timed_source( || !config.playlist.length.contains(':') { // when we are in the 24 hour range, get the clip - new_node = gen_source(config, node, &playout_stat.chain); new_node.process = Some(true); + new_node = gen_source(config, node, &playout_stat.chain); } else if total_delta <= 0.0 { info!("Begin is over play time, skip: {}", node.source); } else if total_delta < node.duration - node.seek || last { @@ -476,13 +476,10 @@ pub fn gen_source( node.cmd = Some(seek_and_length(&node)); } } else { - let probe = MediaProbe::new(&config.storage.filler_clip); + error!("Source not found: \"{}\"", node.source); + warn!("Generate filler with {duration:.2} seconds length!"); - if node.source.is_empty() { - warn!("Generate filler with {duration:.2} seconds length!"); - } else { - error!("Source not found: {}", node.source); - } + let probe = MediaProbe::new(&config.storage.filler_clip); if config .storage From 1856f19d0644b4aa74a8e18bdcd2bfb417573f28 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 10 Mar 2023 11:17:57 +0100 Subject: [PATCH 3/4] update version --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f35db9d2..9c2728f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,7 +1003,7 @@ dependencies = [ [[package]] name = "ffplayout" -version = "0.17.0-beta5" +version = "0.17.0-beta6" dependencies = [ "chrono", "clap", @@ -1023,7 +1023,7 @@ dependencies = [ [[package]] name = "ffplayout-api" -version = "0.17.0-beta5" +version = "0.17.0-beta6" dependencies = [ "actix-files", "actix-multipart", @@ -1056,7 +1056,7 @@ dependencies = [ [[package]] name = "ffplayout-lib" -version = "0.17.0-beta5" +version = "0.17.0-beta6" dependencies = [ "chrono", "crossbeam-channel", @@ -2909,7 +2909,7 @@ dependencies = [ [[package]] name = "tests" -version = "0.17.0-beta5" +version = "0.17.0-beta6" dependencies = [ "chrono", "crossbeam-channel", diff --git a/Cargo.toml b/Cargo.toml index 20ba2dde..58592127 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["ffplayout-api", "ffplayout-engine", "lib", "tests"] default-members = ["ffplayout-api", "ffplayout-engine", "tests"] [workspace.package] -version = "0.17.0-beta5" +version = "0.17.0-beta6" license = "GPL-3.0" repository = "https://github.com/ffplayout/ffplayout" authors = ["Jonathan Baecker "] From 0afd69f835df19a8863e2cb7dc4bb46edeaceb7c Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 10 Mar 2023 11:32:15 +0100 Subject: [PATCH 4/4] fix clippy warning --- lib/src/utils/controller.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/src/utils/controller.rs b/lib/src/utils/controller.rs index ae4eb7f8..56e7e144 100644 --- a/lib/src/utils/controller.rs +++ b/lib/src/utils/controller.rs @@ -14,8 +14,9 @@ use simplelog::*; use crate::utils::Media; /// Defined process units. -#[derive(Clone, Debug, Copy, Eq, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Default, Copy, Eq, Serialize, Deserialize, PartialEq)] pub enum ProcessUnit { + #[default] Decoder, Encoder, Ingest, @@ -31,12 +32,6 @@ impl fmt::Display for ProcessUnit { } } -impl Default for ProcessUnit { - fn default() -> Self { - ProcessUnit::Decoder - } -} - use ProcessUnit::*; /// Process Controller