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