Skip to content

Instantly share code, notes, and snippets.

@Sam-Martin
Created January 26, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sam-Martin/9cc5c209b7c3bd9ed9dbd1625f12e874 to your computer and use it in GitHub Desktop.
Save Sam-Martin/9cc5c209b7c3bd9ed9dbd1625f12e874 to your computer and use it in GitHub Desktop.
Get Media Language Recursively
find . -iregex ".*.\(mp4\|mkv\)" -exec ~/medialanguage.sh "{}" \; | jq '. | select(.Languages | index("English") | not)'
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