cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: --max-filesize and streams

From: Dave M <DaveM_at_mich.com>
Date: Mon, 19 Dec 2005 09:18:42 -0500

>At 06:18 PM 9/11/2005 , Daniel Stenberg wrote:
>>I would've thought that is what programs like streamripper
>>(http://streamripper.sourceforge.net/) do.

At 08:52 AM 9/12/2005 , Dave wrote:
>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 ...

There are a number of people from this list who asked (off-list) that I let
them know if I got cURL to work downloading streams. Unfortunately it has
been a while and I lost their addresses. So I am posting here.

I never was able to get cURL to compile on my system. I think I have a
problem with the version of MSVC I am using. I am not sure and I ran out of
time to work on it.

But the StreamRipper guys managed to fix some of their bugs in the latest
version (1.61.17). It still doesn't work. It still splits the files when
the stream fails and it does not try to append and align the new data with
the old data when it resumes. But it no longer discards the previously
downloaded data. So I am able to wrap it in a batch script that
concatenates the various stream segments.

I am posting my batch script (GetStream.bat) here in case any of you are
still interested in downloading streams.

-GetStream.bat------------------
@echo URL: %1
@echo DIR: %2
@echo FILE: %3
@echo LENGTH: %4
@cd %2
@deltree /Y %2\s_temp
@md s_temp
@cd %2\s_temp
@C:\WINDOWS\COMMAND\streamripper.exe %1 -a %%D -A -l %4
@cd %2
@copy %2\s_temp\*.mp3 %2\%3
@deltree /Y %2\s_temp
--------------------------------
Enter:
GetStream URL DIR FILE LENGTH

Where:
URL - the url to the actual stream (not the playlist!)
DIR - the directory where you would like the completed file to go.
FILE - the name of the completed file.
LENGTH - the number of seconds that you would like to download.
--------------------------------

I still think adding a --Stream option to cURL would be a better solution.
I may still try to figure out why I cant get it to compile so I can add
that feature. Maybe I will have some free time over the holidays.

But this is something that (more or less) works in the meantime...

-------------------------------
Dave M
Davem (at) Mich (dot) Com
Ann Arbor, Mich. USA

Endangered electronic species: http://www.eff.org/endangered/list.php
"The 'Analog Holes' they want to stop up are our eyes, ears and mouths."
Received on 2005-12-19