mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
copy av1 inputs, copy audio lang that matches video, and only copy english subs
This commit is contained in:
@@ -91,18 +91,15 @@ get_file_format() {
|
||||
|
||||
get_num_streams() {
|
||||
local file="$1"
|
||||
ffprobe \
|
||||
-v error \
|
||||
-show_entries stream=index \
|
||||
-of default=noprint_wrappers=1:nokey=1 \
|
||||
"${file}"
|
||||
}
|
||||
local type="${2:-}"
|
||||
local select=()
|
||||
|
||||
if [[ ${type} != '' ]]; then
|
||||
select=("-select_streams" "${type}")
|
||||
fi
|
||||
|
||||
get_num_audio_streams() {
|
||||
local file="$1"
|
||||
ffprobe \
|
||||
-v error \
|
||||
-select_streams a \
|
||||
-v error "${select[@]}" \
|
||||
-show_entries stream=index \
|
||||
-of default=noprint_wrappers=1:nokey=1 \
|
||||
"${file}"
|
||||
@@ -118,3 +115,14 @@ get_num_audio_channels() {
|
||||
-of default=noprint_wrappers=1:nokey=1 \
|
||||
"${file}"
|
||||
}
|
||||
|
||||
get_stream_lang() {
|
||||
local file="$1"
|
||||
local stream="$2"
|
||||
ffprobe \
|
||||
-v error \
|
||||
-select_streams "${stream}" \
|
||||
-show_entries stream_tags=language \
|
||||
-of default=noprint_wrappers=1:nokey=1 \
|
||||
"${file}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user