ffmpeg – How to Stream Local Video to Webcam Using ffmpeg

ffmpeglinuxstreamingvideo editing

I have a local video and I want to stream it to a dummy webcam video device from v4l2loopback. I created the dummy device at /dev/video1. How to use ffmpeg to steam that local video trial_video.mp4 to the dummy device?

Best Answer

Based on this AU Q&A titled: Is there any way ffmpeg send video to /dev/video0 on Ubuntu? you can do the following:

$ ffmpeg -re -i trial_video.mp4 -map 0:v -f v4l2 /dev/video1
Related Question