Stream static image to v4l2loopback using obs with v4l2 plugin, ffmpeg or gstreamer
I just tried it with Android Studio Emulator API 28 (Google X86_ARM) and it works. So it seems that it is related to the CPU Architecture of the emulator and x86 64 does not work. I needed arm though and thankfully Google added Arm translation to an image in Api 28.
It seems that only images with resolution 1920x1080 work, but maybe it is only related to the ratio.
Obs does not work now for some reason but this command works perfectly:
ffmpeg -loop 1 -re -i licensePlate2.png -f v4l2 -vcodec rawvideo -pixfmt nv12 -vf transpose=4 /dev/video2
When using ffmpeg as producer I cannot see v4l2loopback device in chrome
the problem is most likely, that some software (probably including chrome
) is a bit picky about the supported colour format.
your ffmpeg
command doesn't specify any colour format, so I guess it will take one that is easiest to convert to from the NDI stream. NDI supports a number of different formats (including rather exotic ones like P216
) and it might well be that it picks an output format that is not usable by chrome
.
otoh, your gstreamer-pipeline uses a very specific format (I420
).
try enforcing the same format when using ffmpeg, e.g. using something like -vf format=pix_fmts=yuv420p
see also https://github.com/umlaeute/v4l2loopback/wiki/Colorspace-Issues
v4l2loopback format not support error in OBS Studio
I found it. I forgot to run sudo modprobe v4l2loopback
. It enables it I think.
Writing MJPEG to loopback device with FFMPEG fails on Ubuntu 20.04. Works on Rasperry Pi
I was using an outdated version of FFMPEG (4.2.X). I updated to 4.4.1-3 from this PPA and now everything works as expected. I hope this can be of use to someone someday dealing with the same hair-pulling issue.
Related Topics
Replace Key:Value from One File in Another File in Shellscript
Extract Unique Block of Lines from a File Using Shell Script
"Sort Filename | Uniq" Does Not Work on Large Files
Changing Matlab's Startup Folder in Linux
Lkm: Last Block Written to Device
Where in The Linux Source Does Recognition of Specific Usb Devices Happen
Symbol Lookup Error Undefined Symbol, But All Symbols Seem to Be Present
How to Combine Two Search Words with "Grep" (And)
Communication Between Linked Docker Containers
Linux Set End of File (Shrink, Truncate, Cut Out Some Data @ End)
How to Add Multilanguage Support to a Yocto Build
Making Pairs of Words Based on One Column
Jmeter:Difference Between Jmeter.Sh and Jmeter Without Extension File in Jmeter
Ubuntu Linux: Netbeans Cannot Detect Git or Cordova Installed