From 351f36c18382c309b831d53ff30be4941d30a738 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 18 Aug 2022 15:44:19 +0200 Subject: [PATCH 1/3] make sudo recommend --- ffplayout-engine/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/ffplayout-engine/Cargo.toml b/ffplayout-engine/Cargo.toml index 7ba812a0..159b7a0c 100644 --- a/ffplayout-engine/Cargo.toml +++ b/ffplayout-engine/Cargo.toml @@ -38,6 +38,7 @@ priority = "optional" section = "net" license-file = ["../LICENSE", "0"] depends = "" +recommends = "sudo" suggests = "ffmpeg" copyright = "Copyright (c) 2022, Jonathan Baecker. All rights reserved." conf-files = ["/etc/ffplayout/ffplayout.yml"] From e82b460e87631e80e5d1587bad29ac596c5d1c8c Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 18 Aug 2022 22:28:05 +0200 Subject: [PATCH 2/3] fix bug when clip length is less then one frame - so we skip clips when they less then one second. --- Cargo.lock | 2 +- ffplayout-engine/Cargo.toml | 2 +- ffplayout-engine/src/input/playlist.rs | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07982608..ad65a959 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "ffplayout" -version = "0.14.1" +version = "0.14.2" dependencies = [ "chrono", "clap", diff --git a/ffplayout-engine/Cargo.toml b/ffplayout-engine/Cargo.toml index 159b7a0c..d0f3286a 100644 --- a/ffplayout-engine/Cargo.toml +++ b/ffplayout-engine/Cargo.toml @@ -4,7 +4,7 @@ description = "24/7 playout based on rust and ffmpeg" license = "GPL-3.0" authors = ["Jonathan Baecker jonbae77@gmail.com"] readme = "README.md" -version = "0.14.1" +version = "0.14.2" edition = "2021" [dependencies] diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index 719d75e6..c40c41e3 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -517,6 +517,15 @@ fn gen_source( node.add_filter(config, filter_chain); + if node.out - node.seek < 1.0 { + warn!( + "Clip is less then 1 second long, skip: {}", + node.source + ); + + node.process = Some(false); + } + node } From 416c0f48f02217bed6858544017d0ac2e8291d8c Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 18 Aug 2022 22:32:14 +0200 Subject: [PATCH 3/3] cleanup --- ffplayout-engine/src/input/playlist.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index c40c41e3..7611b339 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -577,17 +577,6 @@ fn handle_list_end( if node.duration > total_delta && total_delta > 1.0 && node.duration - node.seek >= total_delta { node.out = out; - } else if node.duration > total_delta && total_delta < 1.0 { - warn!( - "Last clip less then 1 second long, skip: {}", - node.source - ); - node.out = out; - node.cmd = Some(seek_and_length(&node)); - - node.process = Some(false); - - return node; } else { warn!("Playlist is not long enough: {total_delta:.2} seconds needed"); }