0

This is on linux with pulseaudio. I need to record a video with a rather bare-bones recorder that runs in chrome. I decided to fake a camera and a mic so that I can edit the video then use ffmpeg to send the video to a dummy camera created with v4l2loopback and set the chrome input in pavucontrol. This s what I have:

ffmpeg -re -i ~/xxx.mp4 -map 0:v -f v4l2 /dev/video2 -f pulse "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"

where /dev/video2 is the loopback camera. This seems to work fine, but the audio lags the video by a few seconds. I verified that they are very much in sync by playing the mp4 normally. How do I fix this?

2
  • Is it a consistent lag or does it change over time?
    – llogan
    Apr 6, 2020 at 18:15
  • The lag seems to be roughly the same after 22 minutes of streaming.
    – melisgl
    Apr 6, 2020 at 21:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.