diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index c8471f6..0fb29e1 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -8,3 +8,16 @@ rwx_ffmpeg_devices_reset() { modprobe --remove "${module}" && modprobe "${module}" } + +# ╭────────┬────────┬─────────╮ +# │ ffmpeg │ device │ formats │ +# ╰────────┴────────┴─────────╯ + +rwx_ffmpeg_device_formats() { + local device="${1}" + [ -n "${device}" ] || device="/dev/video0" + ffmpeg \ + -f "v4l2" \ + -list_formats "all" \ + -i "${device}" +}