On Tue, Feb 21, 2012 at 12:17 PM, David Baelde <[email protected]>wrote:
> Ok, we're almost done here, close to a solution...
>
>
And here it is:
# transcode external source to MP3 over http/port 8000
# disconnect external source if no-one's listening
#
def on_connect(~headers,~uri,~protocol,str)=
log("connect to stream...")
ignore(server.execute("source.start"))
end
def on_disconnect(str) =
log("disconnect from stream...")
ignore(server.execute("source.stop"))
end
s = mksafe(input.http(id="source","http://whatever.com/aac",autostart=false))
output.harbor(%mp3,on_connect=on_connect,on_disconnect=on_disconnect,port=8000,fallible=false,mount="mp3",s)
I'm not sure what the callbacks are expected to return (or how to "cast"
the type [_] returned by server.execute() to unit) but ignore() it all
works. Anyway, very cool stuff - beats fiddling with vlc bugs and crashes
anyway.
Are there any hooks for accessing/logging the input stream metadata? Or
asynchronously changing the output metadata?
There's probably enough in the liquidsoap API to script a transcoding proxy
server, and (ab)using the metadata for other messages, particularly for
devices with limited displays would be pretty handy stuff.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users