„to_opus.sh“ ändern
This commit is contained in:
parent
6b19634352
commit
aea5b45965
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue