[linux-dvb] genlock

Samuel Goto samuelgoto at gmail.com
Mon Jan 15 15:30:37 CET 2007

Hi Morgan ! thanks for your quick reply =)

On 1/15/07, Morgan Tørvolt <morgan.torvolt at gmail.com> wrote:
> Sending this to the list also, for future reference...
> ---------- Forwarded message ----------
> From: Morgan Tørvolt <morgan.torvolt at gmail.com>
> Date: 15-Jan-2007 17:33
> Subject: Re: [linux-dvb] genlock
> To: Samuel Goto <samuelgoto at gmail.com>
> Hi Sam
> What you are making is basically a mux? You put audio and video
> together to one TS stream? In that case, my only advice would be to
> use stuffing. Lower the combined bitrate from your sources to less
> than the output bitrate, and insert stuffing TS packets to compensate
> so that you get the correct output bitrate. I believe there really is
> no other way of doing it, as it is close to impossible to get a 100%
> stable raw mpeg datarate. There is also a possibility that your
> mpeg-encoder does some stuffing to get the correct bitrate. You could
> remove these first if you want...

I am writing the DVB S1 modulator itself, following the EN 300 421 standard.
It is already working (meaning that the encoder is working : it receives a
mpeg ts and transmits a valid dvb s1 stream ), but I am suffering from
occasional overflows during this process.

The reason is that, like you said, the mpeg encoder is not sending a 100%
stable raw mpeg datarate. It is probably sending a little bit more, which is
causing an output overflow after 7 to 8 minutes of transmission. Bit by bit,
after some time, it accumulates and overflows my output buffer.

The DVB encoder has to have a fixed and perfectly stable output data rate (
baud rate ), which implies that it has to receive a perfectly stable and
fixed input mpeg rate ( bitrate ). Any excess or loss will cause either an
overflow or an underflow over time.

Is this correct ?

Depending on the mux, professional muxes does different things when
> fed with too much data. Some just drops random packages (BAD!, i can
> mention certain brands, some does this even when the total is less
> than the muxrate, as long as one service is higher than configured),
> others drop packages from the one with too high bitrate, others allow
> for the higher bitrate, but starts dropping from the service with too
> high bitrate when the total exceeds the mux-rate. How you want to
> implement this is your choice, but I would suggest to allow for some
> excessive datarate to keep clients happy =)

>From what I have read, this process is common to video applications and is
called "rate adaption".

>From this document (
the options are :

       o upward adaption : null packet insertion, in the case the
transmitter runs out of data
       o downward adaption : excessing stuffing frames are removed.

       in any case, the PCR has to be updated to compensate the delay caused
by the rate adaption.

Is this correct ?

> On 15/01/07, Samuel Goto <samuelgoto at gmail.com> wrote:
> > Hi everyone,Any
> >
> >         I am developing a dvb s1 transmitter. Its input is a MPEG TS
> from a
> > mpeg encoder and its output is a DVB S1 stream to the RF satellite.
> >
> >         I am having problems synchronizing the input bit rate to the
> output
> > baud rate and I was wondering if anyone could help me out on this list (
> or
> > suggest me a better one =) ). The transmitter works for 7 to 8 minutes,
> but
> > then its output buffer overflows ( showing that there is a small
> difference
> > from the input rate to the necessary output rate ).
> >
> >         Thanks for your attention,
> >
> >         Cya, Sam
> >
> > --
> > f u cn rd ths u cn b a gd prgmr !
> > _______________________________________________
> > linux-dvb mailing list
> > linux-dvb at linuxtv.org
> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
> >
> >
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

f u cn rd ths u cn b a gd prgmr !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070115/1c42cbae/attachment-0001.htm

More information about the linux-dvb mailing list