cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: --max-filesize and streams

From: Dave <DaveM_at_mich.com>
Date: Mon, 12 Sep 2005 09:52:21 -0400

At 06:18 PM 9/11/2005 , Daniel Stenberg wrote:
>>They assume that, if someone is still listening, the listener will
>>manually reconnect. But if no-one was listening then the server will have
>>freed up some bandwidth.
>
>Now that is a weird way to deal with those things. I guess there's no way
>for you to get the missing data then when you reconnect then?

Actually, if you can get reconnected fast enough, it may be possible to get
the missing data. Most streaming servers download pre-buffered data to the
player. So when you connect, you get a burst that contains the previous 30
to 60 seconds of data. So if you can get reconnected within that time,
there will be data overlap. Of course that also means that you would have
to read back through the last part of what you have already downloaded to
see if you can find a match. I dont think there is any way to do it by byte
count or anything like that.

>I would've thought that is what programs like streamripper
>(http://streamripper.sourceforge.net/) do.

Streamripper is what I have been using. But it is targeted at ripping songs
from streams. It tries to break the stream into discrete files, one for
each song, based on the meta-data in the stream. It has an option to rip to
a single file but it doesn't work very well. If the stream gets interrupted
it thinks it is an incomplete song and discards whatever was downloaded and
then re-starts. So all you get in your file is the tail end of whatever you
where trying to download. The developers have not been able to fix this
problem and dont seem very motivated to do so. I think part of the problem
is that it uses an old closed source MP3 library to do the download and MP3
decode. I am not really sure but I think it doesn't have something they
need to get it to resume properly.

> This kind of client-side could can be fixed by basically anyone who
> feels like it with very little effort.

I have downloaded the cURL source and will see what I can do. If I can get
through the learning curve I can probably fix it. If I manage to figure out
how to implement a --Stream option is that something you would be
interested in adding to your distribution?

>... I don't see myself doing the work to get these things to work within a
>near future. Sorry.

I understand. There is always too much to do and never enough time. If only
we could have 30 hour days :)

>(Yet I use/hack my mp3 player daily => http://www.rockbox.org/)

That is a very cool project...
Received on 2005-09-12