[Live-devel] Synchronisation of audio and video

Nisha Singh samparknisha at rediffmail.com
Wed Jul 21 23:42:59 PDT 2010


Hi,

I have a mpeg-4 encoded video data and a wave file corresponding a video call (containing both audio and video). I am able to stream the mpeg-4 video file and the wave file separately by using live555 library. 
I want to play both the files together i.e. when the test_vid.m4e (mpeg-4 file) is being played, the test_aud.wav also gets played. For this I made the following changes in DynamicRTSPServer.cpp when the subsession for video and audio is created:

if (stricmp(extension, ".m4e") == 0) 
{
// Assumed to be a MPEG-4 Video Elementary Stream file:
NEW_SMS("MPEG-4 Video");

sms->addSubsession(MPEG4VideoFileServerMediaSubsession::createNew(env, fileName, reuseSource));

//---------- added these lines so that the wave gets streamed-----
Boolean convertToULaw = False;
sms->addSubsession(WAVAudioFileServerMediaSubsession::createNew (env, "D:test_aud.wav", reuseSource, convertToULaw));
}

After these small changes the video file and the audio file are getting streamed and the vlc is able to play them together. However the two files are not getting played synchronously by vlc. The video is lagging behind the audio. 
I don't know if I have done the above thing correctly or not.
Could you please suggest me the correct way of streaming video and audio files together so that they can be played synchoronously by vlc.

Regards,
Nisha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100722/e09def07/attachment-0001.html>


More information about the live-devel mailing list