-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetVideoFormats.sh
More file actions
executable file
·49 lines (35 loc) · 879 Bytes
/
getVideoFormats.sh
File metadata and controls
executable file
·49 lines (35 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
progn=${0%/}
device="/dev/video0"
usage () {
cat <<_EOL_
$progn [-d device]
Print out video formats using various methods. Device defaults to $device .
_EOL_
exit
}
while [ -n "$1" ] ; do
case "$1" in
-h) usage ;;
-d) shift
[ -z "$1" ] && {
echo -en "\nNo parameter in -d.\n"
usage
}
device="$1"
;;
esac
shift
done
echo; echo "--- List Devices ---" ; echo
v4l2-ctl --list-devices
echo; echo "--- $device capabilities ---" ; echo
#ffmpeg -hide_banner -loglevel fatal -f v4l2 -list_formats all -i $device
v4l2-ctl -d $device --list-formats-ext
echo; echo "--- $device controls ---" ; echo
v4l2-ctl -d $device -L
echo; echo "--- $device current settings ---" ; echo
#ffprobe -hide_banner $device
echo
v4l2-ctl -d $device -V
echo; exit 0