From c326c3b61fdedf2cd4f609c74160ad5e3c470f43 Mon Sep 17 00:00:00 2001 From: jb-alvarado <jb@pixelcrusher.de> Date: Wed, 26 Oct 2022 14:09:40 +0200 Subject: [PATCH] revert to video bitrate and mp2 audio codec 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. --- lib/src/utils/config.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/src/utils/config.rs b/lib/src/utils/config.rs index e1c54215..365a2a66 100644 --- a/lib/src/utils/config.rs +++ b/lib/src/utils/config.rs @@ -294,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", @@ -303,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",