Unable to get video via uvc_gadget to the host pc

328 Views Asked by At

I am trying to setup a raspberry pi board as a piping device which could receive video from a camera or any other source and pipe it to the host pc. I am following the tutorial mentioned here

https://gist.github.com/justinschuldt/36469e2a89d95ef158a8c4df091e9cb4

I am able to successfully stream webcam video to the host pc. What I wanted to do was to use a video file instead of the stream from the webcam. In order to do that I did as follows

  • Created a dummy v4l2loopback device
  • Created uvc_gadget following the tutorial above

My setup looks like this

enter image description here

Afterwards I was able to start uvc_gadget as follows enter image description here

Now when I tried to stream a video file to /dev/video2 I only got colored stripes on the host pc with the error no jpeg data found

enter image description here

On host PC

enter image description here

Error

enter image description here

I get almost similar behavior if I create a gadget using g_webcam instead of configFS.

Would be thankful for any help. I am assuming there are some issues with the encoding.

0

There are 0 best solutions below