You are not logged in.

#1 2014-11-08 19:37:01

hrezaee
Member
From: Tehran, Iran
Registered: 2014-11-08
Posts: 4

recommendations for streaming mp3/ogg into icecast (shuffle/autodj)

Hello guys

I'm new to Arch forums, but i've been using Linux for one year, and ArchLinux for four months.

I have a home server that runs Arch, and i've setup icecast on it. Currently i have MPD with mplayer for playing my files and stream them to IceCast, but I've got a problem.
My setup currently plays my playlist and when it hits the end of it, it stops streaming, and my broadcast also stops.
I want a simple program to play my songs/shows on shuffle or autodj, so that I could have my stream up and running  all the time, playing my files.

If you have any recommendations for a great app, or a solution, could you please share it?
Thank you!


Cheers
Hadi Rezaee

Offline

#2 2014-11-08 23:41:15

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: recommendations for streaming mp3/ogg into icecast (shuffle/autodj)

http://www.musicpd.org/doc/user/config_ … tputs.html

always_on yes|no    If set to yes, then MPD attempts to keep this audio output always open. This may be useful for streaming servers, when you don't want to disconnect all listeners even when playback is accidentally stopped.


also you can easily script mpd to keep playing for ever

#!/bin/bash                                    
                                               
mpc consume on                                 
while : ; do                                   
        mpc idle player                        
        mpc listall | shuf -n 1 | mpc add      
done                                           

this will remove played song after it finishes and add a random song on each song change at the same time.

Last edited by Rasi (2014-11-08 23:52:06)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#3 2014-11-09 16:09:41

hrezaee
Member
From: Tehran, Iran
Registered: 2014-11-08
Posts: 4

Re: recommendations for streaming mp3/ogg into icecast (shuffle/autodj)

Rasi wrote:

http://www.musicpd.org/doc/user/config_ … tputs.html

always_on yes|no    If set to yes, then MPD attempts to keep this audio output always open. This may be useful for streaming servers, when you don't want to disconnect all listeners even when playback is accidentally stopped.


also you can easily script mpd to keep playing for ever

#!/bin/bash                                    
                                               
mpc consume on                                 
while : ; do                                   
        mpc idle player                        
        mpc listall | shuf -n 1 | mpc add      
done                                           

this will remove played song after it finishes and add a random song on each song change at the same time.

Hi
Thanks for this script, I will try it soon, it looks like you can do cool things with mpc!

I need to learn scripting/ concepts of programming some day, you can do many cool things with them.

I think this script will save me from compiling liquidsoap and learning how to script that one for a simple music streaming.


Cheers
Hadi Rezaee

Offline

Board footer

Powered by FluxBB