diff --git a/CHANGELOG.md b/CHANGELOG.md
index d38e1585..128e3d43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## [1.6.2](https://github.com/ffplayout/ffplayout/compare/v0.16.1...v0.16.2) (2022-10-26)
+
+### ffplayout
+
+- ignore more ffmpeg errors and ignore them also on ingest server [2f8c2de](https://github.com/ffplayout/ffplayout/pull/221/commits/2f8c2deebc857c23f0bdc96ef977aaa174981fd3)
+- update dependencies [bdf43f7](https://github.com/ffplayout/ffplayout/pull/221/commits/bdf43f7e6bd765ebb88afac7761a0a246b5cdfb4)
+- fix null output, when is set per command line parameter [5b910d6](https://github.com/ffplayout/ffplayout/pull/221/commits/5b910d6e65d6cd1800fffe914a859a2b121be3cf)
+- revert to video bitrate and mp2 audio codec [c326c3b](https://github.com/ffplayout/ffplayout/pull/221/commits/c326c3b61fdedf2cd4f609c74160ad5e3c470f43)
+ - When video bitrate is not fixed the delta delay is more unstable and can reach error threshold. Same is with audio codec pcm_bluray, maybe because it changes the format to m2ts. s302m would be best option, but is not working correctly with loudnorm filter.
+- print version in debug level [241d8ee](https://github.com/ffplayout/ffplayout/pull/221/commits/241d8ee3f661f0c2585cd288a695cb5099b05677)
+
+### Dokumentation
+
+- add info for srt ingest [2f8c2de](https://github.com/ffplayout/ffplayout/pull/221/commits/2f8c2deebc857c23f0bdc96ef977aaa174981fd3)
+
## [1.6.1](https://github.com/ffplayout/ffplayout/compare/v0.16.0...v0.16.1) (2022-10-25)
### ffplayout
@@ -7,7 +22,7 @@
- rearrange custom filters (fix missing output mapping on multiple outputs) [9cb3a62](https://github.com/ffplayout/ffplayout/pull/217/commits/9cb3a6206938adcf1fbe4ce0ec763cad9e812c76)
- switch decoder audio codec to pcm_bluray [8b3a80f](https://github.com/ffplayout/ffplayout/pull/218/commits/8b3a80f5602eda240c6a59178c33886c9e81cb1d)
- deserialize drawtext message with struct object and add single quotes around values [1373182](https://github.com/ffplayout/ffplayout/pull/218/commits/1373182c2ad457d34bff449385e73203b9ba5791)
-- update dependencies
+- update dependencies [a246a60](https://github.com/ffplayout/ffplayout/commit/a246a6018eb024cbeac11dd206b76eaffd7fd20c)
### Development
diff --git a/Cargo.lock b/Cargo.lock
index 4b5e89df..a470ac61 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -397,11 +397,12 @@ dependencies = [
[[package]]
name = "async-lock"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6"
+checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685"
dependencies = [
"event-listener",
+ "futures-lite",
]
[[package]]
@@ -961,7 +962,7 @@ dependencies = [
[[package]]
name = "ffplayout"
-version = "0.16.1"
+version = "0.16.2"
dependencies = [
"chrono",
"clap",
@@ -1011,7 +1012,7 @@ dependencies = [
[[package]]
name = "ffplayout-lib"
-version = "0.16.1"
+version = "0.16.2"
dependencies = [
"chrono",
"crossbeam-channel",
@@ -1720,9 +1721,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.136"
+version = "0.2.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55edcf6c0bb319052dea84732cf99db461780fd5e8d3eb46ab6ff312ab31f197"
+checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
[[package]]
name = "libsqlite3-sys"
@@ -2191,9 +2192,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
+checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "polling"
diff --git a/docs/live_ingest.md b/docs/live_ingest.md
index f33d14a1..6542029c 100644
--- a/docs/live_ingest.md
+++ b/docs/live_ingest.md
@@ -2,10 +2,16 @@
With live ingest you have the possibility to switch from playlist, or folder mode to a live stream.
-It works in a way, that it crate a ffmpeg instance in _listen_ (_server_) mode. For example when you stream over RTMP to it, you can set the ingest input parameters to:
+It works in a way, that it create a ffmpeg instance in _listen_ (_server_) mode. For example when you stream over RTMP to it, you can set the ingest input parameters to:
```
--f live_flv -listen 1 -i rtmp://localhost:1936/live/stream
+-f live_flv -listen 1 -i rtmp://0.0.0.0:1936/live/my-secrete-streaming-key
+```
+
+For SRT you could use:
+
+```
+-f mpegts -i 'srt://0.0.0.0:40077?mode=listener&passphrase=12345abcde'
```
Have in mind, that the ingest mode **can't** pull from a server, it only can act as its own server and listen for income.
diff --git a/ffplayout-engine/Cargo.toml b/ffplayout-engine/Cargo.toml
index 48b50cef..06ec1642 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.16.1"
+version = "0.16.2"
edition = "2021"
default-run = "ffplayout"
diff --git a/ffplayout-engine/src/input/ingest.rs b/ffplayout-engine/src/input/ingest.rs
index 6b08050d..e7f7fc3b 100644
--- a/ffplayout-engine/src/input/ingest.rs
+++ b/ffplayout-engine/src/input/ingest.rs
@@ -10,6 +10,7 @@ use simplelog::*;
use ffplayout_lib::utils::{
controller::ProcessUnit::*, test_tcp_port, Media, PlayoutConfig, ProcessControl,
+ FFMPEG_IGNORE_ERRORS,
};
use ffplayout_lib::vec_strings;
@@ -53,7 +54,9 @@ fn server_monitor(
proc_ctl.kill_all();
}
- log_line(line, level);
+ if !FFMPEG_IGNORE_ERRORS.iter().any(|i| line.contains(*i)) {
+ log_line(line, level);
+ }
}
Ok(())
diff --git a/ffplayout-engine/src/main.rs b/ffplayout-engine/src/main.rs
index d669db2e..f90ea2a1 100644
--- a/ffplayout-engine/src/main.rs
+++ b/ffplayout-engine/src/main.rs
@@ -29,6 +29,8 @@ use ffplayout::utils::Args;
#[cfg(debug_assertions)]
use ffplayout_lib::utils::{mock_time, time_now};
+const VERSION: &str = env!("CARGO_PKG_VERSION");
+
#[derive(Serialize, Deserialize)]
struct StatusData {
time_shift: f64,
@@ -42,7 +44,7 @@ struct StatusData {
///
/// When file not exists we create it, and when it exists we get its values.
fn status_file(stat_file: &str, playout_stat: &PlayoutStatus) {
- debug!("Status file path: {stat_file}>");
+ debug!("Start ffplayout v{VERSION}, status file path: {stat_file}>");
if !PathBuf::from(stat_file).exists() {
let data = json!({
diff --git a/ffplayout-engine/src/utils/mod.rs b/ffplayout-engine/src/utils/mod.rs
index f6cc1a74..bc9322c3 100644
--- a/ffplayout-engine/src/utils/mod.rs
+++ b/ffplayout-engine/src/utils/mod.rs
@@ -10,7 +10,7 @@ pub mod arg_parse;
pub use arg_parse::Args;
use ffplayout_lib::{
filter::Filters,
- utils::{time_to_sec, PlayoutConfig, ProcessMode::*},
+ utils::{time_to_sec, OutputMode::*, PlayoutConfig, ProcessMode::*},
vec_strings,
};
@@ -79,6 +79,12 @@ pub fn get_config(args: Args) -> PlayoutConfig {
if let Some(output) = args.output {
config.out.mode = output;
+
+ if config.out.mode == Null {
+ config.out.output_count = 1;
+ config.out.output_filter = None;
+ config.out.output_cmd = Some(vec_strings!["-f", "null", "-"]);
+ }
}
if let Some(volume) = args.volume {
diff --git a/lib/Cargo.toml b/lib/Cargo.toml
index c540d0cb..ab8b3f4a 100644
--- a/lib/Cargo.toml
+++ b/lib/Cargo.toml
@@ -4,7 +4,7 @@ description = "Library for ffplayout"
license = "GPL-3.0"
authors = ["Jonathan Baecker jonbae77@gmail.com"]
readme = "README.md"
-version = "0.16.1"
+version = "0.16.2"
edition = "2021"
[dependencies]
diff --git a/lib/src/utils/config.rs b/lib/src/utils/config.rs
index 1b6a44ee..365a2a66 100644
--- a/lib/src/utils/config.rs
+++ b/lib/src/utils/config.rs
@@ -19,11 +19,15 @@ pub const IMAGE_FORMAT: [&str; 21] = [
];
// Some well known errors can be safely ignore
-pub const FFMPEG_IGNORE_ERRORS: [&str; 5] = [
+pub const FFMPEG_IGNORE_ERRORS: [&str; 9] = [
"ac-tex damaged",
+ "corrupt decoded frame in stream",
+ "corrupt input packet in stream",
"end mismatch left",
+ "Packet corrupt",
"Referenced QT chapter track not found",
"skipped MB in I-frame at",
+ "Thread message queue blocking",
"Warning MVs not available",
];
@@ -290,6 +294,11 @@ impl PlayoutConfig {
config.processing.audio_tracks = 1
}
+ let bitrate = format!(
+ "{}k",
+ config.processing.width * config.processing.height / 16
+ );
+
config.processing.cmd = Some(vec_strings![
"-pix_fmt",
"yuv420p",
@@ -299,12 +308,18 @@ impl PlayoutConfig {
"mpeg2video",
"-g",
"1",
- "-qscale:v",
- "2",
+ "-b:v",
+ &bitrate,
+ "-minrate",
+ &bitrate,
+ "-maxrate",
+ &bitrate,
+ "-bufsize",
+ &bitrate,
"-c:a",
- "pcm_bluray",
- "-mpegts_m2ts_mode",
- "true",
+ "mp2",
+ "-b:a",
+ "384k",
"-ar",
"48000",
"-ac",
diff --git a/lib/src/utils/mod.rs b/lib/src/utils/mod.rs
index 270ff5b1..6a54dd23 100644
--- a/lib/src/utils/mod.rs
+++ b/lib/src/utils/mod.rs
@@ -640,6 +640,10 @@ pub fn stderr_reader(
for line in buffer.lines() {
let line = line?;
+ if FFMPEG_IGNORE_ERRORS.iter().any(|i| line.contains(*i)) {
+ continue;
+ }
+
if line.contains("[info]") {
info!(
"[{suffix}]> {}",
@@ -650,9 +654,7 @@ pub fn stderr_reader(
"[{suffix}]> {}",
line.replace("[warning] ", "")
)
- } else if (line.contains("[error]") || line.contains("[fatal]"))
- && !FFMPEG_IGNORE_ERRORS.iter().any(|i| line.contains(*i))
- {
+ } else if line.contains("[error]") || line.contains("[fatal]") {
error!(
"[{suffix}]> {}",
line.replace("[error] ", "").replace("[fatal] ", "")