Add script to convert an MJPEG device video stream to a YUYV422 device

This allows us to use MJPEG-streams in OBS for higher framerates.
master
Markus Koch 2021-04-20 09:25:14 +02:00
parent 6bd2b8911d
commit d0c22161c4
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/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