From: Audiodef O. <on...@au...> - 2011-09-29 17:26:33
|
Hi Romain, The script you gave me works. I get this: http://audiodef.com/liquidsoap/liquidtest_ao.log However, when I try to include a playlist of files of this format, liquidsoap crashes immediately after the fallback single in this script: --------------------------------- #!/usr/local/bin/liquidsoap set("log.file.path","/usr/local/etc/liquidsoap/liquidradio.log") set("log.level",4) set("scheduler.generic_queues",5) playlist = playlist(timeout=3600., conservative=true, length=400., reload_mode="rounds", reload=1) output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=128), host = "localhost", port = 8000, password = "password", mount = "trance.ogg", description="Synthetronica Radio: Trance", genre="Trance", url="http://audiodef:8000/trance.ogg", name="Trance", fallback([normalize(playlist("/usr/local/etc/liquidsoap/trance.m3u")), single("/var/www/audiodef/htdocs/audio/dc3.ogg")])) output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=128), host = "localhost", port = 8000, password = "password", mount = "ambient.ogg", description="Synthetronica Radio: Ambient", genre="Ambient", url="http://audiodef:8000/ambient.ogg", name="Ambient", fallback([normalize(playlist("/usr/local/etc/liquidsoap/ambient.m3u")), single("/var/www/audiodef/htdocs/audio/dc3.ogg")])) output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=128), host = "localhost", port = 8000, password = "password", mount = "downtempo.ogg", description="Synthetronica Radio: Downtempo", genre="Downtempo", url="http://audiodef:8000/downtempo.ogg", name="Downtempo", fallback([normalize(playlist("/usr/local/etc/liquidsoap/downtempo.m3u")), single("/var/www/audiodef/htdocs/audio/dc3.ogg")])) output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=128), host = "localhost", port = 8000, password = "password", mount = "techno.ogg", description="Synthetronica Radio: Techno", genre="Techno", url="http://audiodef:8000/techno.ogg", name="Techno", fallback([normalize(playlist("/usr/local/etc/liquidsoap/techno.m3u")), single("/var/www/audiodef/htdocs/audio/dc3.ogg")])) output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=128), host = "localhost", port = 8000, password = "password", mount = "test.ogg", description="Synthetronica Radio: Test Stream", genre="Testing", url="http://audiodef:8000/test.ogg", name="Test Stream", fallback([normalize(playlist("/usr/local/etc/liquidsoap/test.m3u")), single("/var/www/audiodef/htdocs/audio/dc3.ogg")])) ---------------------------------- The test playlist consists entirely of URL's ending with download.php?id=12345. Here's the log output: http://audiodef.com/liquidsoap/liquidtest.log At the end of this, the pid is not running, but the init script thinks it is, so I have to do /etc/init.d/liquidsoap stop before I can do start. So something crashed or segv'd. Now, if I use the above script but ONLY run the test stream, it appears to work. However, I need to run multiple streams, so I need to try to figure out what's going on. Damien P.S. I uploaded the logs to my site and linked to them because my previous response went into the moderation queue for being too long. You can delete my previous response. On 09/29/11 13:58, Romain Beauxis wrote: > 2011/9/29 Audiodef Online <on...@au...>: >> That's a good point. I manually checked to see what wget does, and it >> finds the direct path to the file and downloads it. However, it saves >> the file as the name of the file in the url, so what wget deposits is a >> file named download.php?id=27721. This doesn't get played by liquidsoap. >> >> So the question becomes: how can I force wget to save the file as the >> name of the audio file instead of the name of the file in the url? >> >> Looking at the man page, I see there's an -O option. I didn't see >> anything else that might be helpful, but I'm not familiar with wget >> beyond the basics. I guess it's a matter of executing a wget command >> that automatically uses the audio file name: >> >> -------------------------------- >> >> wget -O phobos__sweet_peas_341.mp3 >> http://electro-music.com/forum/download.php?id=27721 >> >> --2011-09-29 13:34:22-- >> http://electro-music.com/forum/download.php?id=27721 >> Resolving electro-music.com... 173.201.189.104 >> Connecting to electro-music.com|173.201.189.104|:80... connected. >> HTTP request sent, awaiting response... 302 Found >> Location: >> http://electro-music.com/forum/phpbb-files/phobos__sweet_peas_341.mp3 >> [following] >> --2011-09-29 13:34:22-- >> http://electro-music.com/forum/phpbb-files/phobos__sweet_peas_341.mp3 >> Reusing existing connection to electro-music.com:80. >> HTTP request sent, awaiting response... 200 OK >> Length: 1986688 (1.9M) [audio/mpeg] >> Saving to: `phobos__sweet_peas_341.mp3' >> >> ------------------------------------ >> >> In the above, I entered the file name manually. How would I get it to >> happen automatically? And then, how do I get liquidsoap to execute it >> that way instead of using wget with no options? >> >> Alternatively, I'm wondering if liquidsoap itself can rename the >> downloaded file - to anything it wants as long as the file extension is >> correct. > What David was saying is that we actually use wget internally to > download the file.. Try this: > liquidsoap 'output.ao(fallible=true, single(timeout=400., > "http://electro-music.com/forum/download.php?id=27721")) > set("log.level", 4)' > > > Romain > |