[Ffmpeg-devel] [PATCH] reduce MAX_SCAN_PACKETS in mpegts.c

Nico Sabbi nicola_sabbi
Sat Aug 26 22:59:01 CEST 2006


M?ns Rullg?rd wrote:

>Michael Niedermayer <michaelni at gmx.at> writes:
>
>  
>
>>Hi
>>
>>On Sat, Aug 26, 2006 at 06:08:19PM +0200, Nico Sabbi wrote:
>>    
>>
>>>Hi,
>>>the current mpegts demuxer is unbearably slow because it wants to scan the
>>>first 32000 packets (corresponding to almost 6MB) to find usable programs,
>>>making this demuxer unusable for non local streams (lan, dvb, etc).
>>>This patch reduces MAX_SCAN_PACKETS to 512 (96KB) that should be enough
>>>for any decently interleaved stream (out of all my samples not one couldn't
>>>be played with this patch applied).
>>>      
>>>
>>iam not mpeg-ts demuxer maintainer but IMHO this is unacceptable, make it
>>user selectable or use timestamps or even time()
>>    
>>
>
>  
>

if I wanted to make this parameters user-settable, would the attached 
patch be
acceptable to add an initial support for AVOptions in AVFormatContext?
(yet, it's still not enough to obtain what I need, because the probesize 
is set
after av_open_input_file(&ic, ) ; any advice? )


>Yes, use timestamps, e.g. PCR from the first PID seen carrying it
>(there may be several independent time bases in a single stream).
>Beware of discontinuities though.
>  
>

dunno, it's complicated and not user-settable (-tsprobesize in mplayer
helped me a lot of times)

>  
>
>>such change the packet num / byte amount threshold patches just lead to a
>>neverending game of delay vs. support highbitrate file x
>>    
>>
>
>Quite.  IIRC that value was increased some time to make an HD MPEG2
>stream playable.
>
>  
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avformatparams.diff
Type: text/x-patch
Size: 4629 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060826/4e34f3ce/attachment.bin>



More information about the ffmpeg-devel mailing list