X-Git-Url: https://git.rvb.name/vpproxy.git/blobdiff_plain/1e2c0e679beb33f10c2e551768c17ccd77576b54..0d52b048c0c0731caa800bea67e4ddd6f1653471:/vlcclient/vlcmessages.py?ds=inline diff --git a/vlcclient/vlcmessages.py b/vlcclient/vlcmessages.py index 10de03d..2139e3f 100644 --- a/vlcclient/vlcmessages.py +++ b/vlcclient/vlcmessages.py @@ -9,11 +9,23 @@ class VlcMessage(object): SHUTDOWN = 'shutdown' @staticmethod - def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''): - return 'new "' + stream_name + '" broadcast input "' + input + '" output ' + (pre_access + ':' if pre_access else '#') + \ - 'http{mux=' + muxer + ',dst=:' + \ + def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access='',qtype='default'): + command = 'new "' + stream_name + '" broadcast input "' + input + '" output ' + (pre_access + ':' if pre_access else '#') + if qtype=='mp4': + command = command + 'transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:' + elif qtype=='ogg': + command = command + 'transcode{vcodec=theora,acodec=vorbis,vb=800,ab=128}:' + muxer='ogg' + elif qtype=='ogv': + command = command + 'transcode{vcodec=theora,acodec=vorbis,vb=8192,ab=256}:' + muxer='ogg' +# elif qtype=='webm': +# command = command + 'transcode{vcodec=VP80,acodec=vorbis,vb=512,ab=64}:' +# muxer='ffmpeg{mux=ogg}' + command = command +'http{mux=' + muxer + ',dst=:' + \ str(out_port) + '/' + stream_name + '} option sout-keep option sout-all enabled' + \ "\r\n" + 'control "' + stream_name + '" play' + return command @staticmethod def stopBroadcast(stream_name):