lars.kindermann@freenet.de
2006-Feb-24 07:08 UTC
[Icecast] Request: Time Stamped Dump-Files
Hi, I urgently need a feature to save the dump-files in splitted timestamped chunks or - much better - named accordingly to the stream metadata. I don?t want to use utilities like streamripper to make dumps because they act as a client and thus the "relay on-demand" feature of icecast isn't usable anymore. I only want to have a copy of the stream when somebody is actually listening, because the source and the master server are located in Antarctica on the other side of a rather expensive satellite link. I assume this is the icyest icecast in the world. We transmit hydrophone recordings from below the shelf ice, featuring a lot of whales, seals and iceberg breakdowns. We record and store 4 channels @ 192kHz, 24Bit locally at the Neumayer base and a 24 Kbps mp3 stream is sent home to Germany. We can analyze this low quality stream online here and retrieve high quality FLAC encoded snippets via ftp for interesting events only. We will go online for the public internet in a few weeks when the system is running stable. Watch out for this at our webpage. You can also find 10 minute interval webcam pictures from the recording site here: http://www.awi-bremerhaven.de/acoustics/Projects/PALAOA/PALAOA.html I found that previously somebody provided a patch for this, see: http://lists.xiph.org/pipermail/icecast/2004-June/007443.html Could somebody include something like this in the current version? I am not a programmer myself so I rely on help with this. Alternatively: Is the metadata included in the dump-file? The oddcast out there on the ice includes the recording time as metadata into the stream exactly every minute. Is there an utility to parse the dump-file and split it into chunks at every metadata change? I?d appreciate any ideas and help on this topic very much, Lars Kindermann Noch allein? 1 Million Singles warten auf ein Date! Schnell Kontakt aufnehmen bei Deutschlands beliebtester Partnerboerse http://singles.freenet.de/index.html?pid=11512
On Fri, 24 Feb 2006, lars.kindermann@freenet.de wrote:> I urgently need a feature to save the dump-files in splitted timestamped > chunks or - much better - named accordingly to the stream metadata.I'm not 100% convinced this is what you *actually* want, but this patch is what I use to time stamp dump files - perhaps it is. As you can see it's diffed against 2.2-kh11b, but I don't know if it will patch against the very recent releases (official or kh). diff -u -r icecast-2.2-kh11b/src/source.c icecast-2.2-kh11b_/src/source.c --- icecast-2.2-kh11b/src/source.c 2005-06-18 14:26:04.000000000 +0100 +++ icecast-2.2-kh11b_/src/source.c 2005-06-23 17:37:26.000000000 +0100 @@ -650,15 +650,22 @@ char *str; mount_proxy *mountinfo; + time_t now = global.time; + struct tm local; + char buffer[PATH_MAX]; + thread_mutex_lock (&source->lock); if (source->dumpfilename != NULL) { - source->dumpfile = fopen (source->dumpfilename, "ab"); + localtime_r (&now, &local); + strftime (buffer, sizeof (buffer), source->dumpfilename, &local); + + source->dumpfile = fopen (buffer, "ab"); if (source->dumpfile == NULL) { WARN2("Cannot open dump file \"%s\" for appending: %s, disabling.", - source->dumpfilename, strerror(errno)); + buffer, strerror(errno)); } }