LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How can I listen a radio with mpg123.? (https://www.linuxquestions.org/questions/slackware-14/how-can-i-listen-a-radio-with-mpg123-242242/)

hraposo 10-13-2004 01:30 PM

How can I listen a radio with mpg123.?
 
How can I listen a radio with mpg123.?
I did:
mpg123 http://38.118.158.129:8016
but the output was:
No such file or directory

If I do:
mplayer http://38.118.158.129:8016
there is no problem
but how I do it with mpg123?

mipia 10-13-2004 05:06 PM

didnt you just post this same question a few threads down?

hraposo 10-14-2004 05:13 AM

no my question it's diferent. First I put a question about dev/dsp when I use mp123, now my question is about how I listen music with mpg123, because I'm not sure that the command is just mpg123 url.

acid_kewpie 10-14-2004 05:26 AM

mpg123 can not read from network protocols. what makes you think that it can? did you reas any documentation for it? the manpage mentions nothing whatsoever about being able to do this.

gbonvehi 10-14-2004 12:07 PM

I've tried before and I couldn't listen to radio on internet.

acid_kewpie, maybe it's because the manpage is somehow confusing
Quote:


NAME
mpg321 -- Free clone of mpg123, a command-line mp3 player

SYNOPSIS
mpg321 [options] file(s) | URL(s) | -

It does not mention streaming on the man page, but it does mention URL in the synopsis.

acid_kewpie 10-14-2004 12:50 PM

that'll be mpg312, not mpg123 though....

-X- 10-14-2004 01:06 PM

Generally, Slackware has mpg123 symbolic linked to mpg321. So when you mpg123, you are mpg321.

hraposo 10-15-2004 02:31 AM

mpg123 --help
 
If I do
mpg123 --help
the output is this:

helder@darkstar:~$ mpg123 --help
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Usage: mpg123 [options] file(s) | URL(s) | -

so, this mean that mpg123 can play net streams or the help page is wrong.

-X- 10-15-2004 05:05 AM

Read through this, Should give you an idea if everything is working.
http://linux0.cs.uaf.edu/radio/
See if you have aumix to control the volume.

$ mpg123 <url> &
Control volume
$ aumix
To exit mpg123
$ fg
^c

gbonvehi 10-15-2004 12:22 PM

Well, that radio works with mpg321 but no with the other stations i've tried :/

wr3ck3d 10-15-2004 10:21 PM

Alot of times you have to grab the file with wget. For instance a web page will say click here for the stream.

www.music.com/stream

That really isnt the stream, it is just a text file with the real location to the stream. So wget that file, cat it, then play the url it shows.

Here is a example for di.fm. Replace wget for fetch.

Code:

~ % fetch http://di.fm/mp3/trance96k.pls
trance96k.pls                                100% of  434  B 2017 kBps
~ % cat trance96k.pls
[playlist]
NumberOfEntries=3
File1=http://64.236.34.67:80/stream/1003
Title1=D I G I T A L L Y - I M P O R T E D - Trance channel! (US Ultravox)
Length1=-1
File2=http://64.236.34.67:5190/stream/1003
Title2=D I G I T A L L Y - I M P O R T E D - Trance channel! (US Ultravox)
Length2=-1
File3=http://160.79.1.141:8000
Title3=D I G I T A L L Y - I M P O R T E D - Trance channel! (Redirect to free server)
Length3=-1
~ % mpg123 http://64.236.34.67:80/stream/1003
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Directory: http://64.236.34.67:80/stream/
Playing MPEG stream from 1003 ...
Junk at the beginning c98829aa
MPEG 1.0 layer III, 96 kbit/s, 44100 Hz stereo
^C
[0:03] Decoding of 1003 finished.
~ %


gbonvehi 10-15-2004 11:00 PM

I know, I pasted the direct url but didn't work, tnx anyway (i'm using mpfc now).

Btw, now that I realize I was trying with exactly the same radio you gave the example ;) I dunno what i can be but works ok with XMMS and MPFC.

RyuRomulan 11-03-2004 12:03 PM

Greetings, I found this post on LQ via google and decided to post this to hopefully help others who might have this problem.

I had a similar problem with not being able to play url's from di.fm's trance96k.pls file under mpg321 on my Redhat 7.3 distribution which btw also has a symbolic link in /usr/bin/mpg123 which points to the real executable /usr/bin/mpg321. I figured out in order to figure out which player you're really executing without tracking down where the executable is coming from just type "mpg123" in the command line window without any parameters and the last line that it will print will mention either mpg123 or mpg321 hence letting you know what you're really executing.

I noticed that the wr3ck3d was using 0.59r which was different from the version of mpg321 which I was using 0.59q which was the latest version of mpg321. Hence, the credit for this solution goes to you - thank you!

Solution?
----------
You need to download mpg123-0.59r.tar.gz.
If you already have an entry for mpg123 in your /usr/bin or somewhere else in your path
other than /usr/local/bin/mpg123 you may want to replace /usr/bin/mpg123 so that it
actually points to mpg123 instead of mpg321.

Then just gunzip, make linux, make install and you should be set to go - just cat the trance96.pls file and then mpg123 http://...../

^_^

cromiumlake 01-03-2009 09:04 AM

Solution
 
Quote:

Originally Posted by acid_kewpie (Post 1233104)
mpg123 can not read from network protocols. what makes you think that it can? did you reas any documentation for it? the manpage mentions nothing whatsoever about being able to do this.


First of all how can you be a moderator and treat people like that, please think before you answer, there is nothing more powerful than i thought...and you just put it by written.

Anyways:

mpg123 -v -v -@ url.pls
mpg123 -v -v -@ url.pls?id=idnumber


Example
I try to post a example, but the internal policy I'm not allowed to post URLs...at least so far.


Btw: It is mentioned in the man page.

Alien Bob 01-03-2009 10:37 AM

This is not the best introduction you can make in the Slackware forum, cromiumlake, by reviving a thread which has been dead for over four years.

What value did you try to add to this thread?

Eric


All times are GMT -5. The time now is 12:25 PM.