Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Convert Real Audio files to MP3s' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Convert Real Audio files to MP3s
Authored by: RiotNrrrd on Feb 02, '05 03:33:51AM
If you don't have a .ram file, as long as you can get at the original stream URL (via View Source or similar), you can do

mplayer -dumpstream -dumpfile [filename] rtsp://host.do.main/full/url

to dump live RealAudio streams to disk to create your own .rm files that you can then massage into MP3's.

As for this mess:

author=`mplayer "$1" -vo null -ss 10:00:00 | grep author | sed -e 's/.*:\s*\(.*\)/\1/'`
title=`mplayer "$1" -vo null -ss 10:00:00 | grep name | sed -e 's/.*:\s*\(.*\)/\1/'`


How about this instead?

IFS=";" title_author=`mplayer "$1" -quiet -vo null -ss 10:00:00 2>&1 | awk -F: 'BEGIN { ORS = ";" } ; $1 ~ /name|author/ { print $2 }'`
title=${title_author[0])
author=${title_author[1])


A little more legible to the uninitiated, perhaps ...

(And you get a free "Oh I didn't know awk was that cool!" and "Fun with BASH arrays" lesson out of it! ;-) )

[ Reply to This | # ]

Convert Real Audio files to MP3s
Authored by: RiotNrrrd on Feb 02, '05 10:39:44AM
How about this instead?

IFS=";" title_author=`mplayer "$1" -quiet -vo null -ss 10:00:00 2>&1 | awk -F: 'BEGIN { ORS = ";" } ; $1 ~ /name|author/ { print $2 }'`
title=${title_author[0])
author=${title_author[1])
<Mental note: "Do not post after bedtime.">

Forgot the parentheses for the array assignment. (Could've sworn I used Preview.) Let's try that again:

IFS=";" title_author=(`mplayer "$1" -quiet -vo null -ss 10:00:00 2>&1 | awk -F: 'BEGIN { ORS = ";" } ; $1 ~ /name|author/ { print $2 }'`)
title=${title_author[0])
author=${title_author[1])


[ Reply to This | # ]
Convert Real Audio files to MP3s
Authored by: bluehz on Feb 02, '05 04:57:42PM

That is very cool - anyway - you could walk us through whats going on there?



[ Reply to This | # ]