I changed how I approach this, I found this doc and used it as an example with some mods:

http://savonet.sourceforge.net/doc-svn/dynamic_sources.html

Thanks!

Mark


On 03/23/2017 08:17 PM, Mark E wrote:


Ok, thanks!

One more question: When I use a custom telnet command (server.register) to create an output.harbor to icecast, how I can I totally get rid of that output when I'm done with it or when the input stream stops? I see in telnet that outputs have commands for start, stop, status, skip, autostart, and metadata - but I don't see anything I can use to destroy that output entirely. I'm using this code to create the command and open the output to icecast:

def streamer_start( mountpoint ) =
    log( "STREAM START COMMAND EXECUTED: #{mountpoint}" )
    out = output.icecast( %mp3(bitrate=64, samplerate=48000, id3v2=true), fallible=true, host="localhost", port=8000, user="source", password="hackme", mount="#{mountpoint}", live )
end

server.register( namespace="streamer",
    description="Start dumping.",
    usage="streamer.start <mountpoint>",
    "start",
    fun (s) ->  begin streamer_start(s) "Done!" end
)

So when using that code, the client connects to the input.harbor to send audio and connects to the telnet server to send commands. Upon connecting the client sends the command "streamer.start abc123" and the output opens Ok with a mount point of abc123. But I need to get rid that output so that it doesn't persist.

The overall problem is this: If I open that output and stream out through (which works fine), then disconnect the client from the liquidsoap input.harbor and telnet interface, then reconnect the client to input.harbor and telnet, then issue the "streamer.start abc123" command AGAIN to start streaming again, then apparently liquidsoap remembers the prior output that was created, names the new one abc123.1 (as seen in telnet via help command), and then when trying to connect to Icecast liquidsoap tries to connect to the same endpoint twice, the second attempt fails with a 403 error (because the endpoint already exists and is in use in Icecast) and liquidsoap repeated attempts to connect again every 3 seconds resulting in perpetual 403 errors. Thus, I need that prior output defintion gone somehow.

Or maybe I'm approaching this the wrong way?

Mark

On 03/18/2017 01:05 PM, Romain Beauxis wrote:
Hi,

Through the server/telnet:
<output>.start

Or programmatically in your script:
server.execute("<output>.start")

Romain

2017-03-14 22:01 GMT-05:00 Mark E <[email protected]>:
Hi! Quick question: if I set up an output.file( ... ) with start=false,
how do I tell it to start recording? I can't seem to figure that out.
Anyone know how to do that?


Mark


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to