[Live-devel] Sync problems streaming H.263+ and MPEG4
Juan Jose Galvez
jjgalvez at msn.com
Sat Apr 2 09:49:41 PST 2005
Hi,
I'm trying to stream H.263+ and MPEG4 (with MP3) with the LIVE.COM
libraries. I want to receive the streams with MPlayer but i'm having several
A/V sync problems when viewing (video is ahead of audio).
Although VLC plays these streams correctly, I've been looking into the
problem and right now I suspect it's not a problem of MPlayer. MPlayer
reproduces correctly MPEG1/2 and MP3 sent with the streamer I'm programming.
It also reproduces correctly H.263+ and MPEG4 with MP3 when sent with VLC
(over MPEG TS/RTP).
I think the problem is I'm not calculating correctly the presentation stamps
of each frame. I've implemented FramedSources to give discrete H.263 frames
and MPEG4 frames to the respective sinks. I'm feeding the output of my MPEG4
FramedSource to the MPEG4VideoStreamDiscreteFramer. If I feed it to the
MPEG4VideoStreamFramer, this class seems to calculate correct values for the
presentation stamps and I get good synk at the receiver, although this class
doesn't parse very well the frames I'm giving it.
My way of calculating the presentation stamp for each frame (H.263+/MPEG4)
is based solely on the fps of the video stream. That is,
timeperframe=100000/fps. I based this on the code for the
ElphelJPEGVideoSource although I suspect that with H.263+/MPEG4 this is not
correct...
Could you please tell me if this might be the problem and how I can solve
this (maybe there's already code for streaming these video formats).
Thanks for your help.
Juan Jose Gálvez.
_________________________________________________________________
Descarga gratis la Barra de Herramientas de MSN
http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH
More information about the live-devel
mailing list