[Live-devel] fix for stuttering video and audio when streaming an mpeg-2 transport stream

Erwin Beckers e.beckers at gmail.com
Thu Feb 15 11:43:36 PST 2007


>This is because your stream is variable bitrate. This has been
>discussed and a conclusion has been reached. You can read more in the
mailing list archive.
>Here is one link:
>http://lists.live555.com/pipermail/live-devel/2007-February/006110.html
>Look for threads with "Urgent help needed!" as subject.

Thanks i see and understand the problem now.
However the solutions (build 3 different framers) which is being suggested
will not work for me.
I need a fourth framer;-) and let me explain why.
Although I do receive live tv, i dont want to feed it directly in the Live
library.
Instead i'm writing the live data to HDD and use the file on the HDD as a
timeshifting buffer.
This buffer on the HDD is circular and has a fixed length (lets say 2 GByte)
I receive the live tv, write it to the file and when i reach the 2 GB, i
start at file position 0 again.

With a size of 2 GB, I now have a timeshifting buffer of +/- 1 hour of tv
(depending on the bitrate offcourse)
and the client can do timeshifting features like pausing and seeking
backwards / forwards.

To make this work I needed to write my own filereader which is derived from
FramedFileSource
All this works nicely except for the tv channels which have sudden changes
in bitrate like you described
One of those channels is HitRadio OE3 (yes its a tv channel, not a radio
channel) on Astra 19.2
see http://en.kingofsat.net/tp.php?tp=117

Because of my setup where
- i use the live tv data (so no indexing possible)
- the data is not feeded directly into live555 (so not possible to skip the
pcr detection as you proposed)

I'm now forced to use the default framer which is not good enough.
I guess we really need a (small) buffer on the server side to determine both
current and next PCR
and based on those two perform the calcuations


Erwin







> -Morgan-
>
> On 15/02/07, Erwin Beckers <e.beckers at gmail.com> wrote:
> > Hi,
> >
> > 80% of all my mpeg-2 transport files can be streamed very nice with the
> > live555 sdk
> > However i noticed that the other 20% produce stuttering audio and video
> in
> > VLC.
> > The VLC messages window shows a lot of 'PTS out of range'
> errors/warnings
> >
> > I debugged the library and found out that if i change the following line
> in
> > MPEG2TransportStreamFramer.cpp
> >
> > change this line:
> > #define TIME_ADJUSTMENT_FACTOR 0.8
> >
> > to this line:
> > #define TIME_ADJUSTMENT_FACTOR 0.5
> >
> > Then all my mpeg-2 transport files stream nicely.
> > Can anybody explain what exactly this factor does and if my 'fix' is
> good?
> >
> > Regards
> >
> > Erwin Beckers
> >
> > _______________________________________________
> > live-devel mailing list
> > live-devel at lists.live555.com
> > http://lists.live555.com/mailman/listinfo/live-devel
> >
> >
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070215/a8d6f0cc/attachment-0001.html 


More information about the live-devel mailing list