mirror of https://gitlab.com/hsmalley/convert265
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
499 B
Bash
13 lines
499 B
Bash
#!/bin/bash
|
|
set -o pipefail
|
|
IFS=$'\n\t'
|
|
|
|
for video; do
|
|
ffprobe -v quiet -print_format json -show_streams "${video}" >"${video}.json"
|
|
sub_indexes=$(jq -r '.streams[] | select(.codec_type=="subtitle") | .index' <"${video}.json")
|
|
for subtitle in ${sub_indexes}; do
|
|
nice -n 18 ~/Downloads/ffmpeg/ffmpeg -hide_banner -loglevel quiet -y -threads 4 -analyzeduration 20000000 -probesize 20000000 \
|
|
-i "${video}" -map "0:${subtitle}" use_metadata_tags "${video}.${subtitle}.srt" || exit 1
|
|
done
|
|
done
|