Parsing Real Media .ram files
Peter Garrett
peter.garrett at optusnet.com.au
Sat Sep 22 07:49:14 UTC 2007
I am trying to produce a small "wrapper" that will extract rtsp URLs from
Real Media .ram files - the files that you encounter when attempting to
stream Real Media from web pages.
I'm aware of the plugins that do this for browsers like Firefox, but I am
trying to get the elinks browser to use such a wrapper when .ram files are
encountered, using a ~/.mailcap file . This part of a "No X" live CD
project that I am working on.
The problem I am having with my attempts is that I always get apparently
"invisible" characters at the end of the URL, which stop mplayer from
accessing the URL correctly. For example:
$ cat classicfm.ram
rtsp://202.6.74.108/broadcast/classicfm.rm
rtsp://202.6.74.108/broadcast/classicfm2.rm
mplayer $(head -n 1 ~/classicfm.ram)
[snipped output from mplayer]
STREAM_LIVE555, URL: rtsp://202.6.74.108/broadcast/classicfm.rm
Stream not seekable!
file format detected.
Failed to get a SDP description from URL
"rtsp://202.6.74.108/broadcast/classicfm.rm%0D": cannot handle DESCRIBE
response: RTSP/1.0 404 Not Found
The puzzle to me is - where is the "%0D" at the end coming from, and how
do I get rid of it?
I have tried, for example, adding "cut -d '%' -f 1 " :
mplayer $(head -n 1 ~/classicfm.ram | cut -d '%' -f 1)
but this doesn't make any difference...
Any ideas ?
--
Peter Garrett <peter.garrett at optusnet.com.au>
More information about the ubuntu-users
mailing list