From 877cd822f81f05e134c20fb26cfcc934b09eebb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Einar=20J=C3=B8rgen=20Haraldseid?= Date: Tue, 13 Jul 2021 12:37:02 +0200 Subject: [PATCH] remux.sh for remuxing obs recordings to mp4 and preserve audio tracks --- remux.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 remux.sh diff --git a/remux.sh b/remux.sh new file mode 100755 index 0000000..94a14d5 --- /dev/null +++ b/remux.sh @@ -0,0 +1,8 @@ +#!/bin/bash +for mkvfile in *.mkv; do + filename=${mkvfile%.mkv} + ffmpeg -i "${mkvfile}" -c:a copy -c:v copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -movflags faststart "${filename}.mp4" + if [[ ${?} == 0 ]]; then + rm "${mkvfile}" + fi +done -- 2.30.2