diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index 7611b339..8da5122e 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -459,6 +459,8 @@ fn gen_source( mut node: Media, filter_chain: &Arc>>, ) -> Media { + let duration = node.out - node.seek; + if valid_source(&node.source) { node.add_probe(); @@ -474,7 +476,6 @@ fn gen_source( node.cmd = Some(seek_and_length(&node)); } } else { - let duration = node.out - node.seek; let probe = MediaProbe::new(&config.storage.filler_clip); if node.source.is_empty() { @@ -501,7 +502,6 @@ fn gen_source( .and_then(|d| d.parse::().ok()) { // create placeholder from config filler. - node.source = config.storage.filler_clip.clone(); node.duration = length; node.out = duration; @@ -517,9 +517,9 @@ fn gen_source( node.add_filter(config, filter_chain); - if node.out - node.seek < 1.0 { + if duration < 1.0 { warn!( - "Clip is less then 1 second long, skip: {}", + "Clip is less then 1 second long ({duration:.3}), skip: {}", node.source ); diff --git a/ffplayout-engine/src/utils/arg_parse.rs b/ffplayout-engine/src/utils/arg_parse.rs index bf3e551e..41c51c8f 100644 --- a/ffplayout-engine/src/utils/arg_parse.rs +++ b/ffplayout-engine/src/utils/arg_parse.rs @@ -3,10 +3,11 @@ use clap::Parser; #[derive(Parser, Debug, Clone)] #[clap(version, about = "ffplayout, Rust based 24/7 playout solution.", - override_usage = "Run without any command to use config file only, or with commands to override parameters:\n\n ffplayout [OPTIONS]", + override_usage = "Run without any command to use config file only, or with commands to override parameters: + \n ffplayout (ARGS) [OPTIONS]\n\n Pass channel name only in multi channel environment!", long_about = None)] pub struct Args { - #[clap(index = 1, value_parser)] + #[clap(index = 1, value_parser, help = "Channel name")] pub channel: Option, #[clap(short, long, help = "File path to ffplayout.yml")]