Created
January 26, 2020 16:54
-
-
Save Sam-Martin/9cc5c209b7c3bd9ed9dbd1625f12e874 to your computer and use it in GitHub Desktop.
Get Media Language Recursively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -iregex ".*.\(mp4\|mkv\)" -exec ~/medialanguage.sh "{}" \; | jq '. | select(.Languages | index("English") | not)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE=$1 | |
LANGUAGE=$(mediainfo --output=XML "$FILE" | xq '[.Mediainfo.File.track[] | select(.["@type"] == "Audio") | .Language]') | |
cat <<EOF | |
{"File": "$FILE","Languages": $LANGUAGE} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment