Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.0.0-beta3
-
Fix Version/s: NEAR FUTURE
-
Component/s: Liquidsoap
-
Labels:None
Description
On 0.9.2-2 on FreeBSD 7.1 i386
When I send liquidsoap a kill signal when it is in the background, or ctrl-c when it is in the foreground it will not shutdown. Instead it keeps restarting the external encoder:
2010/05/20 21:31:37 >>> LOG START
2010/05/20 21:31:36 [protocols.external:3] Didn't find "ufetch"
2010/05/20 21:31:36 [protocols.external:3] Found "/usr/local/bin/wget"
2010/05/20 21:31:36 [main:3] Liquidsoap 0.9.2
2010/05/20 21:31:37 [threads:3] Created thread "non-blocking queue #1".
2010/05/20 21:31:37 [threads:3] Created thread "generic queue #1".
2010/05/20 21:31:37 [threads:3] Created thread "root" (1 total).
2010/05/20 21:31:37 [root:3] Waking up active nodes...
2010/05/20 21:31:37 [aacplus-1:2] Creating external encoder..
2010/05/20 21:31:37 [aacplus-1:3] Connecting mount /mount-48k.aac for source@server...
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
2010/05/20 21:31:37 [aacplus-1:3] Connection setup was successful.
2010/05/20 21:31:37 [vorbis-1:3] Connecting mount /mount-64k.ogg for source@server...
2010/05/20 21:31:37 [vorbis-1:3] Connection setup was successful.
2010/05/20 21:31:37 [root:3] Broadcast starts up!
^C2010/05/20 21:31:42 [aacplus-1:2] Creating external encoder..
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
^C2010/05/20 21:31:44 [aacplus-1:2] Creating external encoder..
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
^C2010/05/20 21:31:45 [aacplus-1:2] Creating external encoder..
As you can see, every time I send it a ctrl-C (or a kill signal when in the background) it continues to restart the aacplusenc encoder over and over again rather than killing the whole liquidsoap program.
When I send liquidsoap a kill signal when it is in the background, or ctrl-c when it is in the foreground it will not shutdown. Instead it keeps restarting the external encoder:
2010/05/20 21:31:37 >>> LOG START
2010/05/20 21:31:36 [protocols.external:3] Didn't find "ufetch"
2010/05/20 21:31:36 [protocols.external:3] Found "/usr/local/bin/wget"
2010/05/20 21:31:36 [main:3] Liquidsoap 0.9.2
2010/05/20 21:31:37 [threads:3] Created thread "non-blocking queue #1".
2010/05/20 21:31:37 [threads:3] Created thread "generic queue #1".
2010/05/20 21:31:37 [threads:3] Created thread "root" (1 total).
2010/05/20 21:31:37 [root:3] Waking up active nodes...
2010/05/20 21:31:37 [aacplus-1:2] Creating external encoder..
2010/05/20 21:31:37 [aacplus-1:3] Connecting mount /mount-48k.aac for source@server...
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
2010/05/20 21:31:37 [aacplus-1:3] Connection setup was successful.
2010/05/20 21:31:37 [vorbis-1:3] Connecting mount /mount-64k.ogg for source@server...
2010/05/20 21:31:37 [vorbis-1:3] Connection setup was successful.
2010/05/20 21:31:37 [root:3] Broadcast starts up!
^C2010/05/20 21:31:42 [aacplus-1:2] Creating external encoder..
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
^C2010/05/20 21:31:44 [aacplus-1:2] Creating external encoder..
*************************************************************
* Enhanced aacPlus 3GPP Floating Point Reference Encoder
* Build Apr 21 2010, 14:21:43
*
*************************************************************
^C2010/05/20 21:31:45 [aacplus-1:2] Creating external encoder..
As you can see, every time I send it a ctrl-C (or a kill signal when in the background) it continues to restart the aacplusenc encoder over and over again rather than killing the whole liquidsoap program.
Thanks for the report !
The code for the external decoder has completely rewriten in the SVN. Are you able to test the SVN version (not necessarily in production) to see if this issue happens there also ?
Ok, I was able to compile revision 7333 ok, but when I go to run liquidsoap I get this error:
At 01-externals.liq, line 3, char 16: unbound symbol test_process.
Thoughts?
Yes, its a bug I need to fix ASAP...
We have a problem in the inclusion of external scripts. You should be able to fix this quick and dirty by adding the test_process definition in 01-externals.liq (located at /usr/local/lib/liquidsoap/svn):
{{{
# Return true if process exited with 0 code.
# Command should return quickly.
# @category System
# @param command Command to test
def test_process(command)
lines =
get_process_lines("(" ^ command ^ " >/dev/null 2>&1 && echo 0) || echo 1")
if list.length(lines) == 0 then
false
else
"0" == list.hd(lines)
end
end
}}}
Ok, that fixed that error, but now I get this:
At 01-externals.liq, line 29, char 22: unbound symbol get_mime
Grrrr.. :-)
Thanks, both issues are fixed now, you can kjust checkout the latest file from the SVN and reinstall..
on revision 7336:
liquidsoap -c liquidsoap.liq
File "01-externals.liq", line 3, char 2 before "%": Parse error.
:-)
This is fixed, my bad.
Ok, that seems to fix those errors, but now i am getting these ones:
At line 11, char 22: unbound symbol output.icecast.vorbis.
and
At line 11, char 26: unbound symbol output.icecast.aacplusenc.
Has something changed? I have attached my config.
Yes, the output operators have been made more modular:
{{{
output.icecast.vorbis(..)
}}}
is now:
{{{
output.icecast(%vorbis, ...)
}}}
and,
{{{
output.icecast.aacplusenc(...)
}}}
Has not yet been standardised, so it will be something of the form:
{{{
output.icecast(%external("/path/to/aacplusenc - - 32"),icy_metadata=true,format="audio/aacp",...)
}}}
Thank you for your patience !!
Hmm, I can't seem to figure out the aacplusenc syntax. Do you have an example that I could look at? I have attached my config file (liquidsoap2.liq)
It fails with this error:
ERROR: This script is not well typed!
At line 14, char 20-23: cannot apply that parameter because the function (at line 11, char 15) has no argument labeled "restart_on_crash"!
And if I remove the restart info, I get the following:
At line 12, char 16-19:
this value has type
bool
but it should be a subtype of
string
Where line 12 is:
icy_metadata=true,
Any ideas?
Yes, sorry again. We are still busy changing the code and the documentation will follow later. Also, I reply to quickly without checking..
The documentation for the icy_metadata option is
{{{
* icy_metadata : string (default "guess")
Send new metadata using the ICY protocol. One of: "guess", "true", "false"
}}}
so I guess you want {{{icy_metadata="true"}}}.
The {{{restart_on_crash}}} option now belongs to the encoding format, so you may do:
{{{
output.icecast(%external("/path/to/aacplusenc - - 32",restart_on_crash=true),icy_metadata="true", ...)
}}}
Thanks I got it working. And it appears that the bug has been resolved in SVN!
Is it safe to run this version in production? Are there any glaring bugs? When will the next stable release be?
Hi !
Nice to read that the bug is closed !
As for the stability of the SVN, I use it in production for a radio with multiple streams, crossfade and some other advanced features.
I would say that SVN is usable for audio streaming, though, as always, you may still be ready to face some issues.
As for the next stable release, this may take a little more time. The video part is a huge change and we will have to ge through a beta release cycle first.
We still expect the first beta to be available soon..