ffmpeg/formats

This commit is contained in:
Marc Beninca 2025-01-12 17:26:29 +01:00
parent da4ec33554
commit 3e0459b85c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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}"
}