From cfaa70891c6c5d966f74b792cc1de6053fe37e1b Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 8 Mar 2023 17:24:50 +0100 Subject: [PATCH] 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; };