[MPlayer-dev-eng] [PATCH] Use "-nocache" option in TOOLS/midentify.sh

Rodrigo Campos rodrigo at sdfg.com.ar
Wed Feb 8 15:07:42 CET 2012


On Tue, Feb 07, 2012 at 06:29:23PM +0100, Reimar Döffinger wrote:
> On 7 Feb 2012, at 16:31, compn <tempn at twmi.rr.com> wrote:
> > On Tue, 7 Feb 2012 10:47:01 -0300, Rodrigo Campos wrote:
> >> On Tue, Jan 31, 2012 at 04:55:15PM -0300, Rodrigo Campos wrote:
> >>> 
> >>> Attached (inline) it is the path against r34643 (HEAD when  writing this email)
> >>> taken from the project root. If there is anything I should change in the patch,
> >>> or you want me to try something else, please let me know :)
> >> 
> >> Ping ? :)
> >> 
> >> It's been a week since the orig submit with no reason to reject it yet, and the
> >> patch is *really* simple (adding "-nocache" option to TOOLS/midentify.sh :))
> > 
> > patch looks ok to me. might want to put something in the changelog like
> > 'added -nocache to midentify script, speeds up network stream
> > identification'
> > 
> > i'll apply in a few days if there are no other comments...
> 
> Just one thing to consider: some demuxers will seek back and forth a bit, so going straight for -nocache might cause significant slowdowns

Ohh, I didn't know that. It makes sense

> when using it on http:// files.

I'm not sure I follow you here. You mean "http://" which aren't really http ? Or
do you mean streams in general that you have to connect through the network ?


Also, isn't there any way to activate the cache only when using a demuxers that
seek back and forth, right ?


> It might make more sense to use a medium-sized cache with low enough cache-min.
> Though I would have thought the default settings would be fine for that?
> Or is this more a matter of using -noconfig all (if we don't already)?

Using "-noconfig all" doesn't help a *lot* with the example I posted in the
original mail (using MPlayer SVN-r33367)


without any patch (as-is right now):

$ time TOOLS/midentify.sh http://58.69.143.152:8080
ID_AUDIO_ID=0
ID_FILENAME=http://58.69.143.152:8080
ID_DEMUXER=audio
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=0
ID_START_TIME=0.00
ID_LENGTH=-0.01
ID_SEEKABLE=0
ID_CHAPTERS=0
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3
ID_EXIT=EOF

real	0m17.669s
user	0m0.052s
sys	0m0.028s


with "-noconfig all":

$ time TOOLS/midentify.sh http://58.69.143.152:8080
ID_AUDIO_ID=0
ID_FILENAME=http://58.69.143.152:8080
ID_DEMUXER=audio
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=0
ID_START_TIME=0.00
ID_LENGTH=-0.00
ID_SEEKABLE=0
ID_CHAPTERS=0
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3
ID_EXIT=EOF

real	0m10.733s
user	0m0.040s
sys	0m0.040s

with "-nocache":

$ time TOOLS/midentify.sh http://58.69.143.152:8080
ID_AUDIO_ID=0
ID_FILENAME=http://58.69.143.152:8080
ID_DEMUXER=audio
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=0
ID_START_TIME=0.00
ID_LENGTH=-0.02
ID_SEEKABLE=0
ID_CHAPTERS=0
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3
ID_EXIT=EOF

real	0m5.385s
user	0m0.048s
sys	0m0.016s



Perhaps more gain for this case and cases where the demuxer seeks back and forth
could be achived with the other option you suggest (playing with "cache-min"). I
will probably play with them, but I don't know which demuxers do that. May I ask
you how can I know so I can try different "caches" options ? :)






Thanks a lot,

Rodrigo


More information about the MPlayer-dev-eng mailing list