[Live-devel] Combining Audio and Video Streams
Severin Schoepke
severin.schoepke at gmail.com
Tue Jun 12 08:12:59 PDT 2007
Hi list,
I already posted once about problems regarding the synchronization of
audio and video streams... To recapitulize: I have a multithreaded app,
one thread reads live-generated audio and video frames, and another
encodes them (using ffmpeg) and streams 'em using live555. The frames
are transferred between the two threads using two queues. The first
thread stores a video frame every 40ms and an audio frame every 24ms.
When I stream out only the video stream, everything works fine. But when
I add the audio stream, the video source gets polled way too few times
and the video starts lagging behind.
I built a small test app that approximately simulates this behaviour
(see attachments). The results are the same: if I stream only video,
everything works as it should, if I add the audio stream, everything
starts to stutter and lag.
Could someone please verify that my pipeline (CustomSource ->
MPEG1or2AudioFramer -> MPEG1or2AudioRTPSink and CustomSource ->
MPEG4ESVideoFramer -> MPEG4ESRTPSink) is set up correctly? And could
someone point me into the right direction to synchronize the two streams?
Any answers are highly appreciated!
cheers, Severin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg2live555.cpp
Url: http://lists.live555.com/pipermail/live-devel/attachments/20070612/7d99ab19/attachment-0005.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FFMPEGDummySource.cpp
Url: http://lists.live555.com/pipermail/live-devel/attachments/20070612/7d99ab19/attachment-0006.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FFMPEGDummySource.hh
Url: http://lists.live555.com/pipermail/live-devel/attachments/20070612/7d99ab19/attachment-0007.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FFMPEGEncoder.cpp
Url: http://lists.live555.com/pipermail/live-devel/attachments/20070612/7d99ab19/attachment-0008.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FFMPEGEncoder.hh
Url: http://lists.live555.com/pipermail/live-devel/attachments/20070612/7d99ab19/attachment-0009.ksh
More information about the live-devel
mailing list