[Ffmpeg-devel] Ffplay: TS streams take long time to start

Luca Abeni lucabe72
Wed Jul 5 15:30:13 CEST 2006


Hi,

On Wed, 2006-07-05 at 15:18 +0200, Klaas-Pieter Vlieg wrote:
> Klaas-Pieter Vlieg wrote: 
> > 
> > I noticed TS streams via http take a very long time to start 
> > in ffplay.
> > If the same stream is contained in ASF or OGG it starts much quicker.
> > 
> > Why is that and how can I speed up playback start of TS 
> > streams in ffplay?
> 
> In libavformat/mpegts.c there is this:
> 	/* 1.0 second at 24Mbit/s */
> 	#define MAX_SCAN_PACKETS 32000
> 
> I reduced MAX_SCAN_PACKETS to 900 (since I'm streaming @700kbs) and ffplay starts playback much quicker now.
I guess you are streaming a simple TS (not DVB) without an SDT, right?
in libavformat/mpegts.c you can find the following lines:
	    /* first do a scaning to get all the services */
            url_fseek(pb, pos, SEEK_SET);
            mpegts_scan_sdt(ts);

            handle_packets(ts, MAX_SCAN_PACKETS);
Just comment them out, and ffplay should be able to start immediately,
even without changing MAX_SCAN_PACKETS.


				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !





More information about the ffmpeg-devel mailing list