From e4676fded76830eac4d62356d48ffa2a1f370654 Mon Sep 17 00:00:00 2001 From: Jan Stabenow Date: Tue, 18 Apr 2023 08:59:12 +0200 Subject: [PATCH] Fix empty force_key_frames value --- CHANGELOG.md | 2 ++ src/misc/coders/Encoders/video/H264V4L2M2M.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2804d20..af0b49b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Add Add stream key field and protocol detection to RTMP publication service - Add Chinese (simplified) translation (thanks to Huyg0180110559) +- Fix empty force_key_frames value +- Fix Fix Icecast publication service - Fix imprint, terms and credit without share ([#525](https://github.com/datarhei/restreamer/issues/529)) - Fix proxy error on the playersite ([#525](https://github.com/datarhei/restreamer/issues/525)) - Fix saving RTMP advanced options ([#518](https://github.com/datarhei/restreamer/issues/518)) diff --git a/src/misc/coders/Encoders/video/H264V4L2M2M.js b/src/misc/coders/Encoders/video/H264V4L2M2M.js index 22166ec..85e32d7 100644 --- a/src/misc/coders/Encoders/video/H264V4L2M2M.js +++ b/src/misc/coders/Encoders/video/H264V4L2M2M.js @@ -91,8 +91,6 @@ function createMapping(settings, stream, skills) { `${settings.num_capture_buffers}`, '-num_output_buffers', `${settings.num_output_buffers}`, - '-force_key_frames', - `${settings.force_key_frames}`, '-b:v', `${settings.bitrate}k`, '-maxrate', @@ -112,6 +110,10 @@ function createMapping(settings, stream, skills) { '2048', ]; + if (settings.force_key_frames !== '') { + local.push('-force_key_frames', `${settings.force_key_frames}`); + } + if (settings.gop !== 'auto') { local.push('-g', `${Math.round(parseInt(settings.fps) * parseInt(settings.gop)).toFixed(0)}`); local.push('-keyint_min', `${parseInt(settings.fps)}`);