[Mp4-tech] [System]Audio video sync

Dipankar Mitra dipankar.mitra lgsoftindia.com
Mon Oct 18 16:55:55 EDT 2004


Thanks Bharat,
Posting it to the mail list too...
Regards,
Dipankar
=============================================
Embassy Icon , 7th Floor
Infantry Road
Shivajinagar
Bangalore - 560001
Ph No. - 56938700 Ext : 177
Fax      -  56938800
-----Original Message-----
From: Bharat P. SONI [mailto:bharat.soni st.com]
Sent: Monday, October 18, 2023 3:44 PM
To: Dipankar Mitra
Subject: RE: [Mp4-tech] [System]Audio video sync
Hi,
I did use the szstem time to synchronize the audio-video.
Following are the steps I used to sznchroniye.
1. Make sure that all your timeing calculations, like clock
time, CTS, DTS are relative to common reference start time.
2. while decoding, check if the decoding time of the current
access unit is less than current clock time. If yes then
decode, otherwise discard that access unit.
2. store the decoded audio-video access units in queue along
with their CTS.
For video,
1. get the next pending picture with lowest CTS, but greater
than the current system time.
2. Schedule the timer for that CTS.
3. When timer hits, send the picture to the renderer.
For Audio
1. I worked on a system in which call back was being called
whenever audio renderer finishes rendering the data in its
buffer. So whenever the call back hits, check the CTS of
audio access units in the queue and select the access unit
having CTS closest to the current system time.
2. Send this access unit to the renderer.
3. remove all the access units having CTS less than current
system time.
I hope this helps.
Regards,
Bharat


More information about the Mp4-tech mailing list