misc/video/mjpeg_to_yuyv.sh

12 lines
390 B
Bash
Executable File

#!/bin/bash
# Create virtual v4l2 device
sudo modprobe v4l2loopback devices=1 exclusive_caps=1
# Configure video device
# v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=MJPG
# v4l2-ctl --device=/dev/video0 -p 60
# Stream from mjpeg input to yuyv output
ffmpeg -f v4l2 -input_format mjpeg -framerate 30 -video_size 1280x720 -i /dev/video0 -pix_fmt yuyv422 -f v4l2 /dev/video2