[FFmpeg-user] Captured Audio Stream and Video Streams from YouTube Live are out of Sync

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat May 9 11:27:01 EEST 2020

> Am 09.05.2020 um 09:14 schrieb Jim Ruxton <jim.ruxton at gmail.com>:
> I am trying to retrieve a YoutubeLive stream and send the video stream to a video loopback device and the audio to my souncard. This works however it appears that the audio is delayed by a second or so. Is there a better way to do this so they aren't out of sync or failing that is there a way to set a delay on the video stream to compensate? Below is my command. I am using the Sky News You Tube Live as a test signal. I am on Ubuntu 19.10 .
> ffmpeg -re -i $(youtube-dl -g -f 96 https://www.youtube.com/watch?v=9Auq9mYxFEE)  -f v4l2 /dev/video2 -f alsa default

There is no synchronisation taking place between two outputs, if the delay is really constant between runs (I am not convinced it is), you can try the delay filters.

ffmpeg does not completely support your use case, it should work with ffplay.

Carl Eugen

More information about the ffmpeg-user mailing list