rety ffprobe with stream_tags if format_tags is empty
This commit is contained in:
@@ -116,7 +116,12 @@ function read_tag_id3 {
|
||||
function ffprobe_readtag {
|
||||
local tag="$1"
|
||||
local file="$2"
|
||||
ffprobe -loglevel error -show_entries format_tags="$tag" -of default=noprint_wrappers=1:nokey=1 "$file"
|
||||
local result=
|
||||
result=$(ffprobe -loglevel error -show_entries format_tags="$tag" -of default=noprint_wrappers=1:nokey=1 "$file")
|
||||
if [[ -z $result ]]; then
|
||||
result=$(ffprobe -loglevel error -show_entries stream_tags="$tag" -of default=noprint_wrappers=1:nokey=1 "$file")
|
||||
fi
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
function read_tag_fallback {
|
||||
|
||||
Reference in New Issue
Block a user