ffmpeg – Trying to emulate a hardware camera with a stream from a raspberry pi/picam?

I have a raspberry pi and pi cam v2 connected to wifi. I am trying to stream the camera feed to a laptop over wifi, then make that stream appear as if it were a hardware camera on the laptop. I want to do this in order to get it into some other software that requires a hardware camera (can’t rewrite this software, just have to work around it).

I am running ubuntu 18.04 on the laptop. From my research, this should be very possible using some combination of ffmpeg and vfl2loopback. I started out by installing this library to stream the camera to a webserver: https://github.com/silvanmelchior/RPi_Cam_Web_Interface This works, and I am able to access the camera stream in my browser at http://10.0.0.47/http I set it up with no username/password for simplicity. I believe the camera port is 80 based on nmap output.

I am now trying to redirect the stream on my ubuntu laptop. Based on my research and experimentation, this command is the closest I’ve come:

ffmpeg -re -i http://10.0.0.47/html -map 0:v -f v4l2 /dev/video0

(or also the same with port 80 instead of /html, not sure if this matters): ffmpeg -re -i http://10.0.0.47:80 -map 0:v -f v4l2 dev/video0

This seems to work at first, but then produces the following error:

http://10.0.0.47:80: Invalid data found when processing input

From googling, this may be due to the wrong kind of stream coming out of the rpi_cam_web interface, but I am not sure if this is true and if so how to fix it. I also investigated the html code of the page that accesses the webserver, and I can see that it is sending a series of jpgs, that change constantly with timestamps in the file name. So maybe this the issue, but again, unsure.

Any ideas? Help would be much appreciated.