Question / Help v4l2 container as output

NSDragon

New Member
Hello everyone!

I'm currently using v4l2loopback to create a new device, and I'm able to output video to it similar to their ffmpeg examples:

$ ffmpeg -re -i video.mp4 -vf "hflip" -f v4l2 /dev/video1

and I'm able to point other programs such as skype and VLC to pick that stream up just fine. I'm even able to use x11grab in ffmpeg to stream my desktop that way.

However, in OBS, the format isn't available in the dropdown of available containers under custom output. In fact, if I do ffmpeg -formats, I can see that all formats available for muxing are available to me in OBS _except_ only v4l2.

Is this an error, or is there another way to achieve this?

This is on OBS 0.9.1-98-g1f3b747 (from git)
 

Na+

New Member
I realize this is a bit of a necrobump, but I figured it'd be better to keep all the conversation in the sameish place

Just encountered the lack of v4l2 output myself. It looks like the exclusion is (at least somewhat) intentional: On libff/ff-util.c:277, all formats that are devices are excluded from this list. In this case, the v4l2 encoder is a device

Unfortunately, I'm not familiar at all with the internals of ffmpeg, so I'm not sure what makes a device-y codec different from the others, or what sort of extra effort that might involve, but it's at least an explanation for the next person googling for this.
 
Top