Web lists-archives.com

USB audio / video sync question




Hi all--

I'm working with Pixart USB camera, using Video4Linux for video capture and ALSA for audio capture. I'm having trouble establishing sync between audio and video streams during capture sessions. Sometimes sync is acceptable, and other times audio leads video.

I tried enabling timestamps on ALSA PCM updates to compare with V4L timestamps, and for 20 FPS camera input see that video frames and audio blocks are typically within 50 msec of each other.

What happens on some sessions is that audio blocks show up sooner than the first video frame, like 3 blocks will be delivered ~150 msec earlier. Some other saved capture sessions are out of sync by even more time.

This makes me wonder if the audio and video input streams could be running at their respective driver's pace, and "sync" happens to be incidental from the streams running concurrently.

What then is the recommended method(s) for capturing audio and video streams in sync? Is there an example available for a USB camera?

Thanks for any help you could offer,
--Dave Milici

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list