[Ffmpeg-devel] avformat/mpegts reads too much data for lowbitratestreams

Måns Rullgård mru
Thu Jun 9 14:23:38 CEST 2005

Kenneth Aafl?y <kenneth at aafloy.net> writes:

> Hi,
> torsdag 9. juni 2005, 13:45, skrev Michael Niedermayer:
>> On Thursday 09 June 2005 12:49, M?ns Rullg?rd wrote:
>> > Michael Niedermayer <michaelni at gmx.at> writes:
>> > >> A couple of DVB samples I checked repeat the SDT every 2 seconds.  If
>> > >> we want to be sure to catch it, it will be necessary to keep looking
>> > >> for a few seconds.  If the stream is in fact not DVB, this will impose
>> > >> an annoying delay.  Limiting the search by size is not ideal, either,
>> > >> the better solution being a time-limited search, as determined by PCR
>> > >> values.  This is of course more complex.
>> > >
>> > > and independant of that, why not make it a little more flexible and
>> > > let the user override whatever the default will be if she wishes ...
>> >
>> > Any suggestion on how this should be passed to the demuxer?
>> without looking at the code, id say AVFormatContext or AVFormatParameters,
>> it depends upon where the variable is needed, and yes iam not happy with
>> how parameters are passed into the demuxers at all
> Currently the pat/pmt/sdt filters are closed after the scan. Since
> the services in a ts stream could stop transmission at any time,
> especially when there are multiple services in a transport, wouldn't
> it be better to keep them open and detect if pids are added/removed? 
> Then somehow pass this to the user by some generic callback
> interface? IIRC the mythtv devs added something like this, but I
> belive they didn't touch the pat/pmt/sdt filters..

That would all be nice and dandy, but libavformat currently has no
provisions to pass such data to the application.  What could be done,
however, is to monitor the PAT/PMT for changes to the PIDs used by the
selected program, and adjust accordingly.  Yes, broadcasters do change
the PIDs from time to time, and some do it quite frequently.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list