Hello Forum
Maybe someone knows where I can find help on this error in ogg123, ver: 1.1.1 from 11.3 (11.4 also fails)?
I use ogg123 to output ogg-encoded streams to an audio-device (alsa). It can be URL-streams from Icecast-server or just ogg-music from my network-disk.
It could something like:
> ogg123 /home/my/Music/* ; Playing my ogg-ripped CD from an end to default audio-device
I have also tried option like:
> ogg123 -q … ; avoid output to terminal
> ogg123 -q -d alsa … ; output to device=alsa
In all cases so fare ogg123 stops playing after 3-6 hours, and it is hackking on the same sound-packet. Maybe advancing 1-2 new packets each 3-5 seconds
Does anybody known, where I can report this error? Maybe mail-list to Vorbis?
Don’t use vlc myself, but mplayer works in exactly that manner from the command line. Never had problems with it, use it all the time, but I don’t really push it very hard I just play music off my hard drive with it. It works like a console application, been meaning to set up a server type situation for it so I could control it over my wifi network using my phone, but never got around to it.
Thanks Malcolm
I will give mplayer a try also. I am trying to make a “stable” audio link over the Internet (not stable), where I can stream an ogg-stream from an Icecast server and to an audio client, exam ogg123. Analog audio output from jacks shall feed an FM-transmitter on a local radiostation.
I want to run an endless shell command file, something like:
repeat forever {
ogg123 <url-to-icecast-server>
sleep 15 ; second
}
Problem is that ogg123 hangs when Internet breaks, and I have also tried vlc now, which also has problem when the link breaks.
I think in the “best solution” the audio client should try itself to reestablishe tcp-connection a couple of time with an interval in between. When not able to do it, the audion client shall terminate. The sleep command shall wait about 10-60 seconds, and the give the audio client a new try.
If the audio client hangs - as ogg123 does - and never terminate, then the endless loop is not running.
Problem is that ogg123 hangs when Internet breaks, and I have also tried vlc now, which also has problem when the link breaks.
I think in the “best solution” the audio client should try itself to reestablishe tcp-connection a couple of time with an interval in between. When not able to do it, the audion client shall terminate. The sleep command shall wait about 10-60 seconds, and the give the audio client a new try.
If the audio client hangs - as ogg123 does - and never terminate, then the endless loop is not running.
Yeah, I see. You basically need an audio player that will quit when it’s not getting audio data through the tcp connection. Not sure that there is one. Not super savvy with networking, but it’s not really a trivial feature, since looking at a tcp connection from the client side, there’s no obvious way to tell that it’s broken–the packets are guaranteed to come through in order, but they’re not guaranteed to come at any given time.
The way I see it, you either find an audio player that will timeout on a lack of audio data, which I agree simplest, and then the loop you have set up will work fine, or you don’t. If you don’t, you either have to set up a program to monitor the packets as they come into the audio player, or one to monitor the audio that comes out of it. If either of these things dies, you kill everything and start over.
If it came down to it I would try a python script to monitor the connection, not exactly sure how to monitor the data going out. For the python script you set up a dummy server, connect the dummy to the real audio server, connect audio player to the dummy’s write socket, then poll() (select() is an alternative) the incoming tcp stream with a timeout on it. If it times out, you kill everything and start over, if you get a packet in time you write it to the socket attached to the audio player and poll the socket again.
Hopefully there is an audio player that lets you set up a time out on a tcp stream, but otherwise it wouldn’t be impossible with a little scripting. Nothing special about python either, but that is what I would use.
Thanks again! You have a good understanding of the problem. I am helping a pal with this installation, and he has found a solution, which seems to function so fare in practice on the Internet in Denmark.
He says, that ogg123 in the Ubuntu distro can work with up to 15 sec of breaks in the tcp-stream without stopping. More than 15 sec ogg123 terminate (not hacking forever in audio). If its terminate, then the loop restart ogg123.
As an extra safety the Ubuntu-client PC restarts automatic each night at 04 a’clock
Your idea of monitoring the tcp-stream seems right to my knowledge, but I am not able to do that scripting in python