[FFmpeg-devel] How to synchronize device sources

Noah Bergbauer noah.bergbauer at tum.de
Sun Jan 26 22:32:37 EET 2020


Hello,


I am currently working on a patch that implements DXGI desktop capturing and WASAPI audio capturing for Windows.

For this, I implemented two new devices in libavdevice.


The basics work, but now I'm not sure how to synchronize the audio stream with the video stream. Specifically, the two devices

obviously maintain independent pts, starting from the point in time when they were first read from. So while in most cases there

is no human-noticeable offset, this does occasionally - with some bad luck - produce a rather large error.


So is there anything I'm missing here? How can I make sure the two streams sync up (other than hardcoding some kind of communication between them)?


Thanks,

Noah Bergbauer


More information about the ffmpeg-devel mailing list