Re: [mpg123-users] save mp3 files from a streaming radio station?
Brought to you by:
sobukus
|
From: Gavin E. <ga...@en...> - 2013-06-28 20:13:54
|
Aha! Ignore my last question please. I found a method to do the stream & cutting: package 'streamripper'. Here is a sample command: $ streamripper http://85.131.130.211:80/stream/1/ -u 'WinampMPEG/5.0' On Fri, Jun 28, 2013 at 3:17 PM, Gavin Engel <ga...@en...> wrote: > Thank you very much for the explanation, Thomas. I'm not a C developer, > so I'm having some basic trouble with compiling the example file you > mentioned. I don't suppose anyone would mind giving me a bit more advice > on this problem?: > > gavin@localhost:~/Desktop/mpg123-1.15.4/doc/examples$ *gcc > extract_frames.c -o extract_frames* > *extract_frames.c:9:20: fatal error: mpg123.h: No such file or directory* > compilation terminated. > > > > On Fri, Jun 28, 2013 at 3:13 AM, Thomas Orgis <tho...@or...>wrote: > >> Am Fri, 28 Jun 2013 02:29:05 -0400 >> schrieb Gavin Engel <ga...@en...>: >> >> > I'd love to be able to save the songs as they play; each to its own mp3 >> > file. >> >> What you can do is to save the stream via --streamdump dump.mp3. This >> includes ICY metadata (track names) if not disabled. For playback, >> --icy-interval <n> is needed; the value of n being provided by >> second-level verbose output of mpg123 (-vv) via such a line: >> >> Info: ICY interval 8192 >> >> > Also, if *repeated* songs would *not* be saved would be great, so >> > that I don't end up with loads of duplicate files. >> >> Now, you can cut up the stream afterwards, interpreting the ICY >> metadata as separation markers. There is no guarantee that that will >> match the song boundaries; actually it will always miss them by some >> margin because of the ICY interval, even ignoring mixing by radio DJ. >> >> Note that you can write the streamdump to a named pipe (or even just >> standard output), effectively feeding another program, which, given the >> ICY interval, could do the chopping of the stream. That Program would >> need to be written; it could make use of libmpg123 for parsing the meta >> info and ensuring that cutting is along MPEG frames. Also it could >> carry the list of track names, along with a loaded list of tracks >> already present from earlier sessions. >> >> I'm really hesitant to add such functionality to mpg123 itself. >> Cramming more of such features into it endangers the original task: >> Play MPEG audio, without stuttering, please. Already the stream dump is >> a hack that might interfere; although this is mitigated by using the >> buffer. >> The stream chopper needs to run in parallel, decoupled from the player, >> which is nicely achieved by another program being fed by a pipe (and >> the associated pipe buffer). >> >> As a user, you cannot do that right away, but for a Programmer, writing >> the cutting program would not be that difficult. The example program >> doc/examples/extract_frames.c in the mpg123 tarball should provide a >> starting point. One just needs to activate ICY parsing and check for >> MPG123_NEW_ICY to trigger track separation. >> >> >> Alrighty then, >> >> Thomas >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> mpg123-users mailing list >> mpg...@li... >> https://lists.sourceforge.net/lists/listinfo/mpg123-users >> >> > |