Results 1 to 2 of 2

Thread: using ffmpeg to create a virtual webcam from mp4

  1. #1
    Join Date
    Nov 2019
    Beans
    2

    Question using ffmpeg to create a virtual webcam from mp4

    Hi, I'm trying to set up a virtual webcam using ffmpeg and v4l2loopback. I want the output to be a black screen. I have a 1 second black vid named input.mp4 and when i try to run the command :
    Code:
    ffmpeg -re -i input.mp4 -map 0:v -f v4l2 /dev/video0
    It only plays for a couple of frames, then it stops. How can i make it loop indefinitely ?
    Thanks

  2. #2
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,432

    Re: using ffmpeg to create a virtual webcam from mp4

    I would create a FIFO. Let ffmpeg read from the FIFO and then cat the file into the FIFO, with an infinite do loop.

    Breaking it up and isolating the consumer from the producer with a FIFO, gives you more options to control the producer process.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •