View previous topic :: View next topic |
Author |
Message |
dav1d Tux's lil' helper
Joined: 31 Dec 2003 Posts: 134
|
Posted: Sat Oct 16, 2004 10:20 pm Post subject: Playing real audio in a console (solved) |
|
|
Is there any way to listen to real audio streams (specifically BBC radio) by using a console - ie, so I don't have to install xorg on my server? I mainly want it so that I can then remote control it from a web browser, but I can code that bit. _________________ my site | openbox wallpaper menu
Last edited by dav1d on Sun Oct 17, 2004 8:04 pm; edited 1 time in total |
|
Back to top |
|
|
Rafje Tux's lil' helper
Joined: 19 May 2004 Posts: 109 Location: .be
|
Posted: Sat Oct 16, 2004 11:30 pm Post subject: |
|
|
Mplayer. I've got it playing right now: Code: | mplayer -cache 100 -playlist http://www.bbc.co.uk/radio4/realplayer/media/fmg2.ram |
If I remember correctly, I did have to download some Real codecs from http://www1.mplayerhq.hu/homepage/design7/codecs.html, and install them, because the ones included when emerging gave a very choppy sound. Now it works like a charm.
And don't forget to put "network" in your USE flags.
Cheers |
|
Back to top |
|
|
dav1d Tux's lil' helper
Joined: 31 Dec 2003 Posts: 134
|
Posted: Sun Oct 17, 2004 10:46 am Post subject: |
|
|
Thanks - that works.
However, I get some clicks on it quite often. I've tried it with two computers and I get the same on both - do you know how to solve this. Using the realplayer gui program I don't get any of this clicking, so I assume it must be mplayer. _________________ my site | openbox wallpaper menu |
|
Back to top |
|
|
dav1d Tux's lil' helper
Joined: 31 Dec 2003 Posts: 134
|
Posted: Sun Oct 17, 2004 6:10 pm Post subject: |
|
|
Bump - any ideas on how to fix the sound quality - the clicks can get really annoying, and there seem to be more when people are talking. _________________ my site | openbox wallpaper menu |
|
Back to top |
|
|
Rafje Tux's lil' helper
Joined: 19 May 2004 Posts: 109 Location: .be
|
Posted: Sun Oct 17, 2004 6:53 pm Post subject: |
|
|
dav1d wrote: | Bump - any ideas on how to fix the sound quality - the clicks can get really annoying, and there seem to be more when people are talking. |
Uhm... did you try downloading and installing the codecs as I suggested?
R. |
|
Back to top |
|
|
dav1d Tux's lil' helper
Joined: 31 Dec 2003 Posts: 134
|
Posted: Sun Oct 17, 2004 7:42 pm Post subject: |
|
|
Sorry, I was being a bit of an idiot - didn't read that bit.
Anyway, I downloaded both the essential codecs pack and the rp9 codecs from the mplayer site, and placed all of the files in the /usr/local/lib/codecs folder as they suggested. However, it still doesn't work.
I had to create the folder /usr/local/lib/codecs - should they be placed somewhere else? Do I have to edit a config file somewhere to tell mplayer to look for those codecs? _________________ my site | openbox wallpaper menu |
|
Back to top |
|
|
dav1d Tux's lil' helper
Joined: 31 Dec 2003 Posts: 134
|
Posted: Sun Oct 17, 2004 8:04 pm Post subject: |
|
|
OK, I fixed it. For the benefit of others and searching I will outline what I did:
I downloaded the realplayer 9 codecs from the mplayer site. You can get them here. Extract these and copy all of the files to /usr/lib/real (create the directory if it doesn't exist).
That should now work as mplayer first checks /usr/lib/real for the codecs (it tells me it is using /usr/lib/real/cook.so.6.0). _________________ my site | openbox wallpaper menu |
|
Back to top |
|
|
sobers_2002 Veteran
Joined: 16 Mar 2004 Posts: 1128
|
Posted: Mon Oct 25, 2004 8:35 pm Post subject: |
|
|
dp u have to compile mplayer with the "real" use flag??? i don't understand this as this time i emerger the new win32codecs with the real flag and now mplayer(after re-emerging) doesn't play the real files it used to!!
what should i do..........currently am recompiling it with the real flag.
EDIT:- okay that did it. _________________ Pdict - dockable dictionary client for linux
FREE97WIN: Use this code on Dreamhost and you get $97 off !! |
|
Back to top |
|
|
Cintra Advocate
Joined: 03 Apr 2004 Posts: 2111 Location: Norway
|
Posted: Tue Oct 26, 2004 9:50 am Post subject: |
|
|
Rafje wrote: | Mplayer. I've got it playing right now: Code: | mplayer -cache 100 -playlist http://www.bbc.co.uk/radio4/realplayer/media/fmg2.ram |
If I remember correctly, I did have to download some Real codecs from http://www1.mplayerhq.hu/homepage/design7/codecs.html, and install them, because the ones included when emerging gave a very choppy sound. Now it works like a charm.
And don't forget to put "network" in your USE flags.
Cheers |
Hei Rafje
This worked fine for me today until I upgraded win32codecs to version 20040916.. had to go back a version.
Btw do you have command lines for other BBC streams?
The following one works ok but a few others I tried didn't
Code: | mplayer -cache 100 -playlist http://www.bbc.co.uk/1xtra/realmedia/1xtralive.ram |
regards
[/code] _________________ "I am not bound to please thee with my answers" W.S. |
|
Back to top |
|
|
iscribe n00b
Joined: 18 May 2004 Posts: 7
|
Posted: Wed Oct 27, 2004 7:04 pm Post subject: BBC Streams..... and others |
|
|
here is a script i am working on, it has all the bbc streams in it. I am also suffering from the choppy audio, I am gonna try downloading the codec manualy in a mo
Code: |
#!/bin/bash
DATE=`date +%d%m%Y`
TMPDATE=`date +%s`
PLAYER_REAL="mplayer -cache 256"
PLAYER_MPEG="mplayer -cache 256"
PLAYER_WMA="mplayer -cache 256"
PLAYER_OGG="mplayer -cache 256"
RECORD="-ao pcm -aofile /tmp/rectmp-${TMPDATE}.wav -vc -vo null -aop volume=50"
if [ $# -gt 1 ];
then
echo "gonna record this"
RECFLAG="yes"
TITLE=$3
TIME=$(($2*60))
mkdir /data/radio/tmp/$DATE
else
RECFLAG="no"
fi
case $1 in
"") station="list";;
* ) station=$1;;
esac
case $station in
# Display Radio Stations.......
list) echo "1 BBC Radio 1"
echo "1x BBC Radio 1 Xtra"
echo "2 BBC Radio 2"
echo "3 BBC Radio 3"
echo "4 BBC Radio 4"
echo "4l BBC Radio 4 LongWave"
echo "5 BBC Radio 5 Live"
echo "5x BBC Radio 5 Live Sports Extra"
echo "6 BBC Radio 6"
echo "7 BBC Radio 7"
echo "w BBC World Service"
echo "a BBC Asien Network"
echo " "
echo "c Classic FM"
echo "g Classic Gold"
echo "j Jazz FM"
echo " "
echo "v Virgin Radio"
echo "vg Virgin Radio Groove"
echo "vr Virgin Radio Rock"
echo "pr Pirate Radio"
;;
# BBC Radio 1
1) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio1/live/r1_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
# 1Xtra
1x) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/1xtra/live/1xtra_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
#BBC Radio 2
2) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio2/live/r2_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
#BBC Radio 3
3) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio3/live/r3_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
#BBC Radio 4
4) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio4/live/r4_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
#BBC Radio 4 LW
4l) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio4/live/r4lw_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
# BBC Radio 5 Live
5) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio5/live/r5_tl_g2.ra
PLAYER=$PLAYER_REAL;;
# BBC Radio 5 Live Sports Extra
5x) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio5/live/r5sx_tl_g2.ra
PLAYER=$PLAYER_REAL;;
# BBC 6 Music
6) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/6music/live/6music_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
# BBC 7
7) #FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/bbc7/live/bbc7_dsat_g2.ra
#FILE="-playlist http://www.bbc.co.uk/bbc7/realplayer/dsatg2.ram"
#FILE=pnm://rmlivev8.bbc.net.uk/farm/*/ev7/live24/bbc7/live/bbc7_dsat_g2.ra
FILE="-playlist http://STREAM.SERVSTREAM.COM/ViewWeb/BBCRadio_music/Event/BBCRadio7.asx"
PLAYER=$PLAYER_REAL;;
# BBC World Service <<NOT WORKING>>
w) FILE=pnm://rm.bbc.co.uk/worldservice/live24/liveinfent.ra
PLAYER=$PLAYER_REAL;;
# BBC Asian Network
a) FILE=rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/asiannetwork/live/asian_dsat_g2.ra
PLAYER=$PLAYER_REAL;;
# Virgin Radio << NOT WORKING >>
v) FILE=
PLAYER=$PLAYER_OGG;;
# Virgin Radio Groove
vg) FILE=http://ogg.smgradio.com/vr96.ogg
PLAYER=$PLAYER_OGG;;
# Virgin Radio Rock << NOT WORKING >>
vr) FILE=
PLAYER=$PLAYER_OGG;;
# Classic FM << NOT WORKING >>
c) FILE=mms://audio1.musicradio.com/classicfm
PLAYER=$PLAYER_WMA;;
# Classic Gold
g) FILE=mms://audio2.musicradio.com/classicgold
PLAYER=$PLAYER_WMA;;
# Jazz FM
j) FILE=rtsp://cryomedia3.cryohost.net/broadcast/live.rm
PLAYER=$PLAYER_REAL;;
# Pirate Radio
pr) FILE=rtsp://213.129.65.26:7070/Archive/interlude.rm
PLAYER=$PLAYER_REAL;;
# Radio Warwick
raw) FILE=http://137.205.37.129:8000/raw.mp3
PLAYER=$PLAYER_MPEG;;
esac
echo "$PLAYER $FILE"
if [ $RECFLAG == "no" ];
then
$PLAYER $FILE
else
$PLAYER $FILE $RECORD &
MPLAYERPID=$!
sleep $TIME
kill $MPLAYERPID
lame --cbr /tmp/rectmp-${TMPDATE}.wav -o /data/radio/tmp/$DATE/R$station-$DATE-$TITLE.mp3
rm /tmp/rectmp-${TMPDATE}.wav
fi
exit 0
| [/code] |
|
Back to top |
|
|
Cintra Advocate
Joined: 03 Apr 2004 Posts: 2111 Location: Norway
|
Posted: Wed Oct 27, 2004 7:49 pm Post subject: |
|
|
Very nice iscribe!
Am trying them all now and the 'reception' is great...
Couldn't get 4l or w to work tho'
regards
ps how about capturing the streams _________________ "I am not bound to please thee with my answers" W.S. |
|
Back to top |
|
|
Rafje Tux's lil' helper
Joined: 19 May 2004 Posts: 109 Location: .be
|
Posted: Wed Oct 27, 2004 8:03 pm Post subject: Re: BBC Streams..... and others |
|
|
iscribe wrote: | Code: | # BBC World Service <<NOT WORKING>>
w) FILE=pnm://rm.bbc.co.uk/worldservice/live24/liveinfent.ra
PLAYER=$PLAYER_REAL;; |
|
Try Code: | FILE="-playlist http://www.bbc.co.uk/worldservice/ram/live_infent.ram" | You can find the URLs by simply following the links on their website.
Cheers |
|
Back to top |
|
|
Cintra Advocate
Joined: 03 Apr 2004 Posts: 2111 Location: Norway
|
Posted: Wed Oct 27, 2004 8:09 pm Post subject: Re: BBC Streams..... and others |
|
|
Rafje wrote: | iscribe wrote: | Code: | # BBC World Service <<NOT WORKING>>
w) FILE=pnm://rm.bbc.co.uk/worldservice/live24/liveinfent.ra
PLAYER=$PLAYER_REAL;; |
|
Try Code: | FILE="-playlist http://www.bbc.co.uk/worldservice/ram/live_infent.ram" | You can find the URLs by simply following the links on their website.
Cheers |
Thanks Rafje that fixed it
..must have Worldservice working
mvh _________________ "I am not bound to please thee with my answers" W.S. |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
|
Back to top |
|
|
|