Best Solution to listen Music Streaming

If it doesn't relate to Debian, but you still want to share it, please do it here

Best Solution to listen Music Streaming

Postby bester69 » 2015-05-24 15:49

I like to listen streaming house/techno kind of music while i do thinks in my computer, so i tried some audio player solutions with
support for streaming radios, but i didn't get convinced about them,
- Clementine is a little slow responsive..
- Rithmon needed plugins and they did'nt work
- deadbeef find it very inmadure, does not work very well
others player music... dont convince me i stuck to audacious player

I finally found a cool way to enjoy streaming music channels i like very much, it works pretty well so i wanted to share it.

Install Streamtuner2:
- You get thousands of chategorized music channels
- very fast responsive
- Recording streaming
- Bookmarks musci channels


Audacious as Music Player:
Redirect stream music to audacious player.
- The player remain iconnized while you change of stream, remainning one instance , so it behaves as if the player was Streamtuner2.

Image
imagenes gratis

Image

You need to configure Streamtuner this way:
Properties--> Audio Player Assoociation:
audacious -E -p %m3u
-E, --enqueue-to-temp Add files to a temporary playlist
-p, --play Start playback


i hope you like it, enjoy :wink:
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby electrolux » 2015-05-24 21:02

I've gotten into streaming radio, my approach has been to build an immense script that wraps mplayer.

The script plays a random stream by default, what I originally set out to create - I looked but couldn't find a random function for radio as there is for MP3s or albums. Then the script has support for presets, the first command line option picks them, and one pseudo-preset is to reconnect to the last stream played. The random stream sources include streamtuner, too, IIRC it needs little modification for pulling stuff out of streamtuner2's databases. If the script is given a URL it will play that, meaning that streamtuner/2 (or other programs) can use this script as a media player.

Once playing a stream the script parses metadata (see below for ugly code, really bad, I apologise (this script is also a documentary on my learning of bash and regexp)), saves now playing stuff as HTML, plain text, sets Pidgin's status and displays a desktop notification of what's playing. When metadata changes, eg show changes on a station, things update. The desktop notification has a graphic from the website of the radio station, their favicon.

I have the script saved as ~/bin/ms , a directory in my $PATH. The options file sits alongside the script. Using a config file is to allow the same script to more easily be used on different machines.

The script has just been growing for a few years, and has chub like how it sort-of supports figuring out which server of a radio station's is the fastest, and using that for future playback (well, until a reboot). There's optional support for a proxy, my ISP is Three UK, a mobile/cellular network who also transparently proxy HTTP, meaning streaming over SSH to a vserver in a data centre makes playback more reliable.

The script keeps its own files in a directory, I use a RAM disk probably because I know no better way to stop needless disk access :) No need to make a RAM disk just to try this, just somewhere temporary will do (hmmm, if only the system came with a thing like that.... ;) ).

Code: Select all
#!/bin/bash
#set -x

# Add support in any for http://www.mikesradioworld.com/ , parse m3us for urls
# wget -qO - http://www.australianliveradio.com/ | grep '<td><a href=.*Kbps' | sed 's/<td><a href="\([hm][^"]*\)">.*/\1/'
# wget -qO - http://www.usliveradio.com/ | grep '<td><a href="[hm].*Kbps' | sed 's/<td><a href="\([hm][^"]*\)">.*/\1/'
# and in pseudorandom:
# http://www.listenlive.eu/chillout.html
# http://www.listenlive.eu/rnb.html
# http://www.listenlive.eu/dance.html

#bugs

# need to parse streamtitle for shit that will interfere with script. Possibly apostrophes or quotes.
# check for just a space or otherwise meaningless metadata, eg:
# ICY Info: StreamTitle=' ';StreamUrl='http://www.kickradio.co.uk';
# ICY Info: StreamTitle='Fanu - Drums� Fuzz';
#   in msrd log
#   ICY Info: StreamTitle='Fanu - Drumsö Fuzz';
##############################


#import settings
. msopts

NOTIFCOUNT=0

case "$2" in
   "p" | "P" | "proxy" )
      echo Using $PROXNAME as proxy
      export http_proxy=$PROXADD
      ;;
   * )
      true
      ;;
esac


initialise(){
   echo No Pirate Station List, downloading
   wget --tries=3 --timeout=15 --no-cookies -nv -O /mnt/msrd/pt.xml $PIRATELISTURL && cp /mnt/msrd/pt.xml $PTBU || cp $PTBU /mnt/msrd/pt.xml
   cat /mnt/msrd/pt.xml | sed 's/<STATION_URL>/\n/g' | sed 's/<\/STATION_URL>/\n/g' | grep -v 'BBC-UID=' > /mnt/msrd/stream_urls.temp2
   grep '^http://' /mnt/msrd/stream_urls.temp2 > /mnt/msrd/stream_urls.temp
   grep '^mms://' /mnt/msrd/stream_urls.temp2 >> /mnt/msrd/stream_urls.temp
   grep -e 'uris\[[0-9]\{1,\}\] = http://' ~/.config/sonata/sonatarc | sed 's/uris\[[0-9]*\] = \(http:\/\/.*\)/\1/' >> /mnt/msrd/stream_urls.temp
   echo Parsing Streamtuner Xiph cache
   strings ~/.streamtuner/cache/xiph/%5F%5Felectronic | grep '^http' >> /mnt/msrd/stream_urls.temp
   grep -v '\#' ~/bin/streams.txt  >> /mnt/msrd/stream_urls.temp
   sort /mnt/msrd/stream_urls.temp | uniq > /mnt/msrd/stream_urls
   }


playit(){
   # Set terminal title
   echo -ne "\033]0;${URL}\007"
   rand_stream_np &
   echo $URL | grep -E "\.m3u[^/]*$|\.pls[^/]*$|\.asx[^/]*$|\.ram[^/]*$|\.php[^/]*$" > /dev/null && MPLAYERCMD=$MPLAYERCMD' -playlist' && echo 'Playlist supplied'
   MPLAYERSTART=`date +%s`
   $MPLAYERCMD $URL |tee $MPLAYERLOG || $PURPCMD $PCNOMSG
   [ -f /mnt/msrd/pidgin_message_on ] && ( $PURPCMD $PCNOMSG ; echo "Clearing Pidgin away message" )
   NOW=`date +%s`
   [ `expr $NOW - $MPLAYERSTART` -ge 300 ] && ( echo $URL >> ~/ListenedTo ; echo "Listened more than 5 minutes, URL logged" ) || echo Only listened for `expr $NOW - $MPLAYERSTART` seconds.
   }


testhost(){
   URL=$1
   HOST=`echo $URL | sed 's/http:\/\/\(.*\):[0-9]*.*/\1/'`
   AVPING=`ping -Anqw 10 $HOST | grep 'rtt min/avg/max/mdev = ' | sed 's|rtt min/avg/max/mdev = [0-9]\{1,4\}\.[0-9]\{3\}/\([0-9]\{1,4\}\.[0-9]\{3\}\)/[0-9]\{1,4\}\.[0-9]\{3\}/[0-9]\{1,4\}\.[0-9]\{3\} ms.*|\1|'`
   [ "$AVPING" = "" ] && AVPING=down
   echo $AVPING $URL
   echo $HOST response is $AVPING 1>&2
   }


rand_stream_np() {
   pgrep -P $$ -f $0 > /mnt/msrd/rand_stream_np.pid
   echo $URL > $LASTSTREAM
   # Allow time for mplayer to get connected
   sleep 5
   echo $URL | grep -E "\.m3u[^/]*$|\.pls[^/]*$|\.asx[^/]*$|\.ram[^/]*$|\.php[^/]*$" > /dev/null && MPLAYERCMD=$MPLAYERCMD' -playlist'
   while true ; do
      if [ -f /proc/`pgrep -of "$MPLAYERCMD"`/exe ] ;
         then
            TITLE=`grep "Demuxer info Title changed to .*" $MPLAYERLOG | sed -r "s/^Demuxer info Title changed to (.*)$/\1/" | tail -1`
            if [ "$TITLE" = "" ] ;
               then TITLE=`grep "ICY Info: .*StreamTitle='.*';" $MPLAYERLOG | sed -r "s/.*StreamTitle='([^']?[^;]*)(';.*$)/\1/" | tail -1` ;
               if [ "$TITLE" = "" ] ;
                  then TITLE=`grep " [Tt]itle: .*" $MPLAYERLOG | sed -r "s/^ [tT]itle: (.*)$/\1/" | tail -1` ;
               fi
            fi
            if [ "$TITLE" = "" ] ;
               then
#                  echo $0 No title >> $MPLAYERLOG
                  ONE=
               else
#                  echo $0 TITLE is "$TITLE"  >> $MPLAYERLOG
                  ONE="$TITLE" ;
            fi
            NAME=`grep "Name   : .*" $MPLAYERLOG | sed -r "s/^Name   : (.*)$/\1/" | sed 's/"//g' | tail -1`
            if [ "$NAME" = "" ] ;
               then
#                  echo $0 No name >> $MPLAYERLOG
                  TWO=
                  if [ "$TITLE" = "" ] ;
                     then
#                        echo $0 No name, no title >> $MPLAYERLOG ;
                        THREE="♫ $URL"
                     else
                        ONE="$TITLE."
                        THREE=" `cat $LASTSTREAM`" ;
                  fi
               else
#                  echo $0 NAME is $NAME >> $MPLAYERLOG
                  if [ "$TITLE" = "" ] ;
                     then
                        TWO="$NAME. "
                     else
                        TWO=" on $NAME. "
                  fi
                  THREE=`cat $LASTSTREAM`
            fi
            echo $ONE$TWO| sed 's/\&/ and /g'> /mnt/msrd/playing.txt
            WEBSITE=`grep "Website: .*" $MPLAYERLOG | sed 's/"//g' | sed -r 's@^Website: (h?t?t?p?s?:?/?/?[^/ ]*).*$@\1@i' | sed -r 's@^Website: $@@i' | tail -1`
            if [ "$WEBSITE" = "" ] ;
               then
                  [ -f /mnt/msrd/notified ] || echo No Website
                  #use napster icon and notify
                  [ -f /mnt/msrd/notified ] || cp $DEFLTICO /mnt/msrd/favicon.ico
                  [ -f /mnt/msrd/notified ] || $PYNOTIFCMD
                  touch /mnt/msrd/notified
               else
                  [ -f /mnt/msrd/notified ] || ( wget --no-cookies -O /mnt/msrd/favicon.ico -nv --tries=1 --timeout=10 --user-agent=MPlayer $WEBSITE/favicon.ico || cp $DEFLTICO /mnt/msrd/favicon.ico ; $PYNOTIFCMD) &
                  sleep 2 && touch /mnt/msrd/notified
            fi

            sleep 13
            if [ "$ONE$TWO$THREE" != "$OLDNP" ] ;
               then
                  NOTIFCOUNT=`expr $NOTIFCOUNT + 1`
                  [ $NOTIFCOUNT -gt 1 ] && $PYNOTIFCMD
                  echo "Setting Pidgin status to: $ONE$TWO$THREE"
                  PIDGINMSG=`echo "$ONE$TWO$THREE"| sed 's/\&/ and /g'| sed 's/\#/hash/g'| sed 's/"//g'`
                  touch /mnt/msrd/pidgin_message_on
                  $PURPCMD "$PCADDMSG$PIDGINMSG"
                  echo "$0: Pidgin status change to: $ONE$TWO$THREE" >> $MPLAYERLOG
                  echo "$0: Pidgin status change to: $ONE$TWO$THREE" >> ~/mslog.log
                  [ -d $TEXTNPLOC ] && ( echo "Writing now playing spam to $TEXTNPNAME" && echo -e "$ONE$TWO$THREE"|sed 's/^♫ \(.*\)/\1/' | todos  > $TEXTNPLOC/npspam.txt )
                  [ -d $HTMLNPLOC ] && echo "Writing HTML to $HTMLNPNAME ..." && cat > $HTMLNPLOC/np << EOF
<HTML><HEAD>
<TITLE>Music URL</TITLE>
</HEAD>
<BODY BGCOLOR=#ffffff>
<font face="sans-serif">
<center><table cellpadding=0 cellspacing=0>
<tr>
<td align=center>
<h3><a href="$URL">$PIDGINMSG</a></h3>
</td>
</tr>
</table></center>
</font>
</BODY></HTML>

EOF
            fi
            OLDNP="$ONE$TWO$THREE"
         else
            cleanup
      fi
   done
}


cleanup() {
   echo "$0: Mplayer not running, suiciding" >> $MPLAYERLOG
   rm /mnt/msrd/pidgin_message_on 2> /dev/null
   rm /mnt/msrd/notified 2> /dev/null
   kill `cat /mnt/msrd/rand_stream_np.pid` > /dev/null
   pkill -s 0 wget > /dev/null
   [ -f /mnt/msrd/pidgin_message_on ] && $PURPCMD $PCNOMSG
}


case "$1" in
#   "x" | "word" | "word2" )
#      echo Template
#      URL=protocol://host.domain.tld/path/file.ext
#      playit
#      ;;
   "l" | "last" )
      echo Last stream
      URL=`cat $LASTSTREAM`
      playit
      ;;
   "D" | "distinct" )
      echo Distinct FM
      URL=http://listen.distinctfm.com:8000/distinct
      playit
      ;;
   "u" | "ukbr" | "ubr" )
      echo UK Bass Radio
      URL=http://ukbassradio.com/live/128k/listen.m3u
      playit
      ;;
   "i" | "if" )
      echo Infront.fm
      URL=http://s1.streammonster.com/tunein.php/agstudio/playlist.pls
      playit
      ;;
   "s" | "sub" | "sfm" )
      echo Sub FM
      URL=http://www.sub.fm/listen.pls
      playit
      ;;
   "d" | "dnbr" )
      echo DnB Radio
      URL=http://88.198.34.209:80/dnbradio_main.mp3
      playit
      ;;
   "S" | "silk" )
      echo Silk City
      URL=http://orange.citrus3.com:8022
      playit
      ;;
   "b" | "bd" )
      echo Bassdrive
      if [ -f /mnt/msrd/bd ] ; then
         URL=`cat /mnt/msrd/bd`
         playit
      else
         echo Testing Bassdrive servers for fastest ping
         ( sleep 20 && wget -qO - http://www.bassdrive.com/v2/streams/BassDrive.pls | grep http | sed 's/File[0-9][0-9]\?=\(http:\/\/.*:[0-9]*\)/\1/' | while read -r line; do testhost "$line"; done | grep -v '^down ' | sort -n | head -1 | sed 's|^[0-9]\{1,4\}\.[0-9]\{3\} \(.*\)|\1|' > /mnt/msrd/bd && echo Fastest URL is `cat /mnt/msrd/bd` ) &
         URL=http://www.bassdrive.com/v2/streams/BassDrive.pls
         playit
      fi
#      URL=http://www.bassdrive.com/v2/streams/BassDrive.pls
#      playit
      ;;
   "j" | "jt" )
      echo Jungletrain
      if [ -f /mnt/msrd/jt ] ; then
         URL=`cat /mnt/msrd/jt`
         playit
      else
         echo Testing Jungletrain servers for fastest ping
         ( sleep 20 && wget -qO - http://jungletrain.net/128kbps.m3u | sed 's/\(http:\/\/.*:[0-9]*\)\//\1/' | while read -r line; do testhost "$line"; done | grep -v '^down ' | sort -n | head -1 | sed 's|^[0-9]\{1,4\}\.[0-9]\{3\} \(.*\)|\1|' > /mnt/msrd/jt && echo Fastest URL is `cat /mnt/msrd/jt` ) &
         URL=http://jungletrain.net/128kbps.m3u
         playit
      fi
#      URL=`wget -qO - http://jungletrain.net/128kbps.m3u | shuf | head -1`
#      playit
      ;;
   "k" | "kriss" )
      echo KrissRadio
      URL=http://krissradio.ddns.net:8000
      playit
      ;;
   "a" | "any" )
      echo Absolutely anything
      if [ ! -f /mnt/msrd/pt.xml ] ; then
         initialise
      fi
      if [ ! -f /mnt/msrd/any ] ; then
         echo Parsing all Streamtuner Xiph cache files
         strings ~/.streamtuner/cache/xiph/%5F%5F[a-df-z]* | grep '^http:' >> /mnt/msrd/any.temp
         cat /mnt/msrd/stream_urls >> /mnt/msrd/any.temp
         echo More streams from streams.txt
         grep '^\#[hm]' ~/bin/streams.txt | sed 's/^\#\([hm].*\)/\1/'  >> /mnt/msrd/any.temp
         sort /mnt/msrd/any.temp |uniq > /mnt/msrd/any
         rm /mnt/msrd/any.temp
      fi
      LSURL=`cat $LASTSTREAM`
      URL=`grep -v '$LSURL' /mnt/msrd/any | shuf  | tail -1`
      playit
      ;;
   http* | mms* )
      echo URL supplied
      URL=$1
      playit
      ;;
   * )
      echo Pseudorandom stream
      if [ ! -f /mnt/msrd/pt.xml ] ; then
         initialise
      fi
      LSURL=`cat $LASTSTREAM`
      URL=`grep -v '$LSURL' /mnt/msrd/stream_urls | shuf  | tail -1`
      playit
      ;;
esac
cleanup


Then the config file, I have it in ~/bin/msopts
Code: Select all
# bender
MPLAYERLOG=/mnt/msrd/mplayer.log
LASTSTREAM=/tmp/last_stream
PTBU=~/crypt/software/PirateToolbar.xml
DEFLTICO=/home/electrolux/crypt/software/avatars/_default.jpg

TEXTNPLOC=~/network/server2/mnt/sh2/npspam
TEXTNPNAME=sparehead2
HTMLNPLOC=~/network/server/var/www/html/electrolux
HTMLNPNAME=webserver

PROXNAME=Privoxy
PROXADD=http://localhost:8118

# URL for Pirate Toolbar data
PIRATELISTURL='http://radio.services.conduit.com/RadioRequest.ctp?type=user&ctid=CT392534&lut=0'

MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:noblock -ipv4-only-proxy'

PYNOTIFCMD=msnotify.py
PURPCMD=purple-remote
PCADDMSG=setstatus?status=away\&message=
PCNOMSG="setstatus?status=away&message="


#######################################
# default audio
#some streams cause mplayer to get upset, try other mp3 decoders
#MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:noblock -ipv4-only-proxy -ac ffmp3,mad, '
# HDMI audio output
#MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:noblock:device=hw=0.3'
# Bluetooth
# device name and shit specified in /etc/asound.conf
#MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:device=btheadset'
# Mark's Sony SRS X5 Bluetooth
#MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:device=marksony -softvol'
# Macmini bluetooth
#MPLAYERCMD='mplayer -cache 384 -prefer-ipv4 -msglevel cache=-1:identify=3:statusline=-1 -ao alsa:device=macmini -softvol'
#######################################


I guess the pynotification doofer best be here, too. This is saved as ~/bin/msnotify.py, it has roots in the notification examples from pynotify.

Code: Select all
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import pynotify
import sys
import gtk
import os
import cgi

if __name__ == '__main__':
    if not pynotify.init("Images Test"):
        sys.exit(1)

#Stream URL
    f = open('/tmp/last_stream', 'r')
    url = cgi.escape(f.readline())
#    print "URL is " + url
    f.close()
#Station title
    f = open('/mnt/msrd/playing.txt', 'r')
    body = cgi.escape(f.readline())
#    print "Notifying " + playing
    f.close()

#Favicon
    uri = "/mnt/msrd/favicon.ico"


    n = pynotify.Notification(body, url, uri )
#    n.set_timeout(3000)
# Display notice in proportion to text string length
    n.set_timeout(sys.getsizeof(body) * 25 + 1500 )
    n.set_urgency(pynotify.URGENCY_LOW)
## For 1024x768 desktop
## Position box just above the sonata now playing spam box
#    n.set_hint("x", 1024)
#    n.set_hint("y", 688)
# For 1280x1024 desktop
# Position box just above the sonata now playing spam box
#looks to have stopped having any effect
    n.set_hint("x", 1280)
    n.set_hint("y", 944)
    if not n.show():
        print "Failed to send notification"
        sys.exit(1)


So back to the topic, this house-of-cards is my way of streaming stuff. I'll be honest, pkill ms is typed a bit too often after mplayer decides to be unresponsive whilst resolving or connecting to a dead host. Any claims of "Best" would be utterly subjective, but I will state that the command line makes a lot of sense for sound. Why have a graphical program for non-graphical stuff? But on Debian fora I'm preaching to the choir advocating the CLI.

Here's a "screenshot" :) The script playing the a stream URL, using the proxy. This screenie shows the script following metadata changes. I then quit playback and fired up a random station, and it's turned out to be pretty good. Exactly why I made this script, to find the gems I know are out there with minimal effort..... That reminds me, a stream's URL will be saved to ~/ListenedTo if played for more than five minutes, so a list is built of what the listener really likes. I find if I play something random and it sucks I will move on fast. My laptop's log file is currently 155K, 4790 lines, and I've never done any analysis on it, there could well be some stations I listen to much more than I realise. One day I'll bother to check :) The day that (/me hax, $ wc -l < /mnt/msrd/any ) 15918 stations isn't enough (well, a mere 868 electronic, the "default" set up for my script).
Code: Select all
electrolux@bender:~$ ms http://ildnb1.dnbradio.com:8000/dnbradio_main.mp3 p
Using Privoxy as proxy
URL supplied
MPlayer 1.1-4.7.1 (C) 2000-2012 MPlayer Team

Playing http://ildnb1.dnbradio.com:8000/dnbradio_main.mp3.
Resolving localhost for AF_INET...
Connecting to server localhost[127.0.0.1]: 8118...

Name   : #DNBRADIO - Main Channel - Fresh Drum n Bass, Jungle
Genre  : Drum and Bass
Website: http://www.dnbradio.com
Public : yes
Bitrate: 192kbit/s
Cache size set to 384 KBytes

ICY Info: StreamTitle='Martyn - Can't Control';
Audio only file format detected.
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
2015-05-24 21:29:55 URL:http://dnbradio.com/favicon.ico [1150/1150] -> "/mnt/msrd/favicon.ico" [1]
Setting Pidgin status to: Martyn - Can't Control on #DNBRADIO - Main Channel - Fresh Drum n Bass, Jungle. http://ildnb1.dnbradio.com:8000/dnbradio_main.mp3
Writing HTML to webserver ...

ICY Info: StreamTitle='Vector Burn - Spider Garden (2005)';
Setting Pidgin status to: Vector Burn - Spider Garden (2005) on #DNBRADIO - Main Channel - Fresh Drum n Bass, Jungle. http://ildnb1.dnbradio.com:8000/dnbradio_main.mp3
Writing HTML to webserver ...

Exiting... (Quit)
Clearing Pidgin away message
Only listened for 260 seconds.
/home/electrolux/bin/ms: line 219:  5254 Terminated              rand_stream_np
electrolux@bender:~$ ms
Pseudorandom stream
No Pirate Station List, downloading
2015-05-24 21:34:55 URL:http://radio.services.conduit.com/RadioRequest.ctp?type=user&ctid=CT392534&lut=0 [45491/45491] -> "/mnt/msrd/pt.xml" [1]
Parsing Streamtuner Xiph cache
MPlayer 1.1-4.7.1 (C) 2000-2012 MPlayer Team

Playing http://noisefm.ru:8000/play_256.
Resolving noisefm.ru for AF_INET...
Connecting to server noisefm.ru[91.121.112.82]: 8000...

Name   : Noise FM - Modern Electronic Radio | 256 kbps MP3
Genre  : Trance, Dubstep, DnB, Dutch House, Future Garage
Website: http://noisefm.ru
Public : yes
Bitrate: 256kbit/s
Cache size set to 384 KBytes

ICY Info: StreamTitle='Virtual Riot - We're Not Alone (High Maintenance Remix)';
Audio only file format detected.
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 256.0 kbit/18.14% (ratio: 32000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
2015-05-24 21:35:12 URL:http://noisefm.ru/favicon.ico [1150/1150] -> "/mnt/msrd/favicon.ico" [1]
Setting Pidgin status to: Virtual Riot - We're Not Alone (High Maintenance Remix) on Noise FM - Modern Electronic Radio | 256 kbps MP3. http://noisefm.ru:8000/play_256
Writing HTML to webserver ...


edit: the swear filter puts stars in scripts, so have changed my precise script user-feedback so there's no risk of globbing.
Last edited by electrolux on 2015-05-25 00:01, edited 2 times in total.
electrolux
 
Posts: 37
Joined: 2015-03-16 23:48

Re: Best Solution to listen Music Streaming

Postby stevepusser » 2015-05-24 21:11

How about Guayadeque?
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12000
Joined: 2009-10-06 05:53

Re: Best Solution to listen Music Streaming

Postby drokmed » 2015-05-25 00:24

I love techno videos on youtube... here's a classic:

<iframe width="560" height="315" src="https://www.youtube.com/embed/NR2Yz3x9EJY" frameborder="0" allowfullscreen></iframe>

Hmm, we can't embed videos? Shucks, here's the URL:

https://www.youtube.com/watch?v=NR2Yz3x9EJY
Author of the Debian Linux Security Appliance Firewall howto, found here
Thread discussing it is here
User avatar
drokmed
 
Posts: 1167
Joined: 2007-10-03 19:24
Location: Saint Petersburg, FL

Re: Best Solution to listen Music Streaming

Postby stevepusser » 2015-05-25 03:12

ALL HAIL TECHNOVIKING!!
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12000
Joined: 2009-10-06 05:53

Re: Best Solution to listen Music Streaming

Postby bester69 » 2015-05-27 09:09

stevepusser wrote:How about Guayadeque?


Guayadeque is what i first was looking for, but i find it very slow responsive, and some inmature software, sometimes crashes, im also not able to save bookmarks, so i gave it up. I think Guayadeque needs to improve before to be an option, but thats the way to follow.

Image

Anyways Guayadeque is the other choice solution. :wink:
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby bester69 » 2015-06-20 16:30

bester69 wrote:
I finally found a cool way to enjoy streaming music channels i like very much, it works pretty well so i wanted to share it.

Install Streamtuner2:
- You get thousands of chategorized music channels
- very fast responsive
- Recording streaming
- Bookmarks musci channels


Audacious as Music Player:
Redirect stream music to audacious player.
- The player remain iconnized while you change of stream, remainning one instance , so it behaves as if the player was Streamtuner2.


You need to configure Streamtuner this way:
Properties--> Audio Player Assoociation:
audacious -E -p %m3u
-E, --enqueue-to-temp Add files to a temporary playlist
-p, --play Start playback

i hope you like it, enjoy :wink:


Ive been trying this for longer and is not working propertly with the way describe it to call audacious. Sometimes hangs audacious.

To resolve that you can do like this:

Using VLC (I like more the Audacious sounds, so i chosed audacious):
vlc --one-instance %m3u

Using Audacious;
killall -9 audacious; audacious -E -p %m3u


Image
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby bester69 » 2015-07-07 01:35

Using Audacious;
killall -9 audacious; audacious -E -p %m3u[/b]
Image



Use:
just this

killall audacious; audacious %m3u


this way (removing -9) you keep the same player position on the screen after you kill it
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby bester69 » 2016-02-02 06:16

Another good configuration would be..:

(Streamtunner2 + MPC ) , MPD y Cantata

You need to create a script for streamtunner2 :

mpd-player %pls

#mpd-player scripr
MYHOST='192.168.1.128' #your ip binding MPD
mpc -h $MYHOST clear
mpc -h $MYHOST load $1
mpc -h $MYHOST play


This way Streamtunner becomes quicker responsive (by using mpd), and then witn Cantata audio player, you can play/stop your music, save it in your playlist, etc.

I recommend this Solution, 8) 8)
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby kalle123 » 2016-02-02 06:52

KRadio4. Does, what it is supposed to do .....
User avatar
kalle123
 
Posts: 229
Joined: 2015-03-21 11:17
Location: Rhineland - Germany

Re: Best Solution to listen Music Streaming

Postby bester69 » 2016-02-02 09:05

kalle123 wrote:KRadio4. Does, what it is supposed to do .....

Hi kalle
Kradio4 its just a dropdown list with preloaded URL's, i think its a great solution if you want your favourites streaming channel available quickly.
For example, you can go and edit streamtunner channels to copy the url and channel names into kradio4 one by one.

i will use it for listen my local talk radios (i listen two or three) :)
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1702
Joined: 2015-04-02 13:15

Re: Best Solution to listen Music Streaming

Postby clashcityrocker » 2016-04-10 07:20

Sort of related to this, I have a Internet radio alarm clock (Panasonic sc-all2), which I can program the presets to be Internet streams. I am thinking it would be nice to have one of my presets as a random pick of a list of stations, just to mix things up a bit..

I have Debian running on a raspberryPI and thinking if there was a way to have a service that hosts a fake stream (that my radio has programmed as it's preset), and when that stream URL is "hit" it picks a real stream to connect to and passes it back via the fakje placeholder stream to my radio

Anyone got any ideas on how to achieve this???
clashcityrocker
 
Posts: 3
Joined: 2016-04-10 07:14

Re: Best Solution to listen Music Streaming

Postby arochester » 2016-04-10 09:36

Raspbian might be "based" on Debian, So are 140 other distros. Raspian is not Debian.

>>>https://www.raspberrypi.org/forums/
arochester
 
Posts: 1722
Joined: 2010-12-07 19:55

Re: Best Solution to listen Music Streaming

Postby clashcityrocker » 2016-04-10 10:04

good to see pedantry still alive and well.

Are you saying that Linux is so fragmented that any answer relating to Debian can't be applied to other similar distros?
clashcityrocker
 
Posts: 3
Joined: 2016-04-10 07:14

Re: Best Solution to listen Music Streaming

Postby pylkko » 2016-04-10 10:12

I run mopidy (as daemon) because it can play spotify (when required) and I don't want to install any separate spotify client from their web page that may or may not work. But I rarely use spotify and mostly listen to internet radio channels with it (it uses gstreamer). You can easily randomize streams with it. Either by making a playlist with random streams within it and playing that, or adding a certain amount of streams to the queue and then randomizing or using a custom python script (in case you want something complicated, like say, switch channel every 5 min, or when a certain button is pressed or whatever). I also like the fact that it can be controlled locally or remotely with mpd or webclient (using browser), so I can turn it on from one room and shut it off from another, or use a phone to change channel or whatever).


Sort of related to this, I have a Internet radio alarm clock (Panasonic sc-all2), which I can program the presets to be Internet streams. I am thinking it would be nice to have one of my presets as a random pick of a list of stations, just to mix things up a bit..

I have Debian running on a raspberryPI and thinking if there was a way to have a service that hosts a fake stream (that my radio has programmed as it's preset), and when that stream URL is "hit" it picks a real stream to connect to and passes it back via the fakje placeholder stream to my radio



First, you could do everything your alarm clock and RPi idea does solely on the RPi, and this would be easy as there are ready made solutions and tutorials on the net. However, if you want (for whatever reason) to serve a stream of random radio channels to the device, then one hacky but simple solution would be to feed a radio stream of your own on the LAN and then have the clock pick that up. That is, have the RPi pick up a random internet station and then restream it on the LAN.
User avatar
pylkko
 
Posts: 1780
Joined: 2014-11-06 19:02

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable