You are not logged in.
Is there a program like ffplay/mplayer or similar that can play a shoutcast ogg stream and _exit_ if the stream stops / times out / gets disconnected / in some other manner stops playing the stream?
I've tried ffplay and mplayer and cvlc, and tried various options to no avail (though I may have missed something), I still have no indication of when the stream times out.
Offline
You might want to try your hand at scripting just make a basic script with a for/loop that counts a certain period of time and then stops or kills the application at the end of the time. I know it sounds messy, but you could make it do almost everything you wanted to do you can redirect output and have the script read the errors from say mplayer, or other cmd line tools and if a certain error is detected then kill the process.
I know mplayer does a good job of just stopping when a stream is not available. But to do exactly what you want might be a little difficult.
R81Z3
R81Z3
Security +, Linux +, LPIC 1, still learning!
Offline
what about using wget or something a like to download the file and use another programm to play it?
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline
downloading the file first wouldn't be real-time, and i suppose that's what op wants.
i'd go with scripting, too.
you have to get hold of some flags being set either on your system, or in the metadata that comes with the stream, and kill the player according to their values.
or simply, if sound output doesn't get sound (above some dB threshold ) for n seconds, kill player.
also i say +1 to looking into mplayer if it already has useful capabilities inbuilt.
Offline
I know it sounds messy
messy is the word http://sprunge.us/YbjM?bash (and that's the cleaned up version!)
well, it sort of works :-/
Offline