Created
December 26, 2017 21:42
-
-
Save MaZderMind/83454329c1cfdbe8a9518d02f748594d to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
ffmpeg -hide_banner -y -nostdin -f decklink -list_devices 1 -i dummy 2>&1 | head -n -1 | tail -n +2 | cut -c 31- | cut -c -1 | while read device; do | |
ffmpeg -hide_banner -y -nostdin -f decklink -list_formats 1 -i $device 2>&1 | head -n -1 | tail -n +4 | cut -c 2- | cut -f1 -d' ' | while read mode; do | |
for plug in sdi hdmi; do | |
desc="$device@$mode on $plug" | |
echo "-> /tmp/$desc.png" | |
ffmpeg -v warning -hide_banner -y -nostdin -f decklink -video_input $plug -format_code $mode\ | |
-i "$device" \ | |
-ss 1 -vframes 1 \ | |
"/tmp/$desc.png" | |
done | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment