Skip to content

Instantly share code, notes, and snippets.

@drouarb
Created February 23, 2019 13:12
Show Gist options
  • Save drouarb/9e84ebd0937ca9a026c1a587ca79dc42 to your computer and use it in GitHub Desktop.
Save drouarb/9e84ebd0937ca9a026c1a587ca79dc42 to your computer and use it in GitHub Desktop.
Plex codec testes
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage: $0 <path_to_allcodec.c>"
exit
fi
cat "$1" | grep 'extern AVCodec ff_' | sed 's/extern AVCodec ff_\(.*\);/\1/' | while read c
do
response=$(curl -I --write-out %{http_code} --silent --output /dev/null "https://downloads.plex.tv/codecs/531e313-1328/linux-ubuntu-x86_64/lib$c.so")
echo "$response $c"
if [ $response -eq 200 ]
then
echo $c >> codec_output
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment