From aea5b45965d1e86dbe3acd1b86bac7859192907b Mon Sep 17 00:00:00 2001 From: esche Date: Thu, 18 May 2023 16:38:30 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eto=5Fopus.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- to_opus.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/to_opus.sh b/to_opus.sh index f4f2253..298325a 100644 --- a/to_opus.sh +++ b/to_opus.sh @@ -41,13 +41,19 @@ for file in **/*.@($extension); do else print $2>=450000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 } END{ - print "\""file_output"\" -v 32 -hide_banner" + print "\""file_output"\" -v info -hide_banner" }') is_video=$(ffprobe -i Hair.m4v -v fatal -select_streams V -show_entries stream=codec_type) if [[ -n "$is_video" ]]; then echo "$file is a video file and will not be converted" + + #an Example for converting the audiostreams in a container while copying subtitles and videostreams. + #ffmpeg -i Hair.m4v -map 0:a -map 0:s -map 0:v -c:a libopus -c:v copy -c:s copy Hair.mkv -hide_banner -v info + + #for extracting the audiostreams of a video file just use "eval "$command"". + #it is recommended to check the result before deleting the original file. else eval "$command" && rm "$file" fi