excamera / alfalfa

Purely functional video codec, used for ExCamera and Salsify
GNU General Public License v2.0
1.2k stars 112 forks source link

running salsify with preloaded videos #93

Open ushasigh opened 1 year ago

ushasigh commented 1 year ago

Hi, I see that the salsify codebase contains a file fake-webcam.cc. Is there a way to run the the salsify system with saved videos in .y4m format instead of a real webcam.

sadjad commented 1 year ago

Yes! The easiest way to do this is to use ffmpeg to create a virtual webcam from a .y4m file (https://github.com/excamera/alfalfa/blob/master/scripts/fake-camera#L14), and then use that camera with Salsify (--device option). This approach requires v4l2loopback on Linux.