0

I have an embedded system running a custom distro built using Yocto. Later down the line, I will have a usb camera plugged into the system, but for not I would like to use a .mp4 file as a "dummy" camera.

My goal is to stream the video file over USB as a USB UVC device to a computer so that the computer sees my embedded Linux system as a USB webcam:

enter image description here

I can't find any documentation on the subject and I am a bare metal c developer dipping his toes into embedded Linux development. I would like to know what to look for and the broader steps to get this working. (including modifications to the distro through Yocto.)

Thank you.

1 Answer 1

4

Where to start?

Is of course a very broad question. So, I can only give you a very rough overview:

Linux can, given your SoC actually has the hardware, control an USB peripheral to act as a device (rather than host). In the Linux context, that's called USB gadget.

With that technical low-level functionality solved, one has to turn to offering the logical functionality as well, i.e., a UVC gadget. Luckily, the Linux kernel brings exactly that.

With that out the way, you need to consider the data aspect. I don't think mp4 I'd something you can directly transport via uvc. So, you would have to transcode first.

Then, the question becomes how to get the transcoded data from Userland into the kernel. The relatively new v4l2-loopback driver might be of help there.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.