Skip to content

Instantly share code, notes, and snippets.

@anarchivist
Last active September 17, 2025 22:53
Show Gist options
  • Select an option

  • Save anarchivist/9baf77302c5fd332787f01d150ecb086 to your computer and use it in GitHub Desktop.

Select an option

Save anarchivist/9baf77302c5fd332787f01d150ecb086 to your computer and use it in GitHub Desktop.
Find anything that's not AVC1 (MPEG-4 Part 10) on DA in the colloquia directory
#!/bin/bash
for file in colloquia; do \
if ! [[ $file =~ (\.vt|sr)t$ ]] # skip the caption files
then
ffprobe -v quiet -of json -show_format -show_streams $file \
| jq -rc '{filename: .format.filename, codec: [.streams[] | select(.codec_type == "video")] | .[].codec_tag_string}' \
>> ~/colloquia.ndjson
fi
done
jq -r 'select(.codec != "avc1") | [.filename, .codec ] | @csv' < colloquia.ndjson > colloquia-videos-needing-transcoding.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment