Skip to content

Instantly share code, notes, and snippets.

@mithro
Created January 9, 2016 09:19
Show Gist options
  • Save mithro/16d9243235d5adecb055 to your computer and use it in GitHub Desktop.
Save mithro/16d9243235d5adecb055 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Make sure you have v4l-info installed
# sudo apt-get install v4l-conf
for VIDEO in /dev/video*; do
if v4l-info $VIDEO | grep 'HDMI2USB' > /dev/null 2>&1; then
echo $VIDEO
break
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment