Peter Maersk-Moller wrote: > Johannes Stezenbach wrote: > > is the discontinuity_indicator set? > > Hmm, assume that is a flag in the mpeg-2 ts stream. I'll try to > see if I can extract it from my demuxer. I'm not an expert here, > but maybe I can find something on Google. It's the first bit after the lenght field in the adaptation field, which is part os the TS header for the stream carrying the PCR. > >- how does your libmpeg2 based decoder app sync to the dvbstream > > transmitter to ensure buffers never over/underrun? > > Ehh ! Come again ! Not sure what you mean ! > > I demux the DVB MPEG-2 TS stream continously on a fast enough system, then > feed > the video packets to libmpeg2 and the audio packets to LAME. Which buffers > should/could > get over/underrun ? The broadcaster sends e.g. 25 frames/sec, if you playback without synchronizing your clocks at e.g. 24.95 frames/sec your buffer will eventually run full. (Instead of synchronizing clocks you could also monitor buffer fullness and drop or repeat frames when the buffer runs full/emtpty). Same for the audio. Additionally, for software playback audio and video clocks are not synced so you have to compensate for audio and video playing back at slightly different speeds (by compaing PTSs and dropping/repeating frames). You could test if it works to just save the stream from RTP from a file, and then playback the file with mplayer/xine. Johannes