X-Git-Url: https://git.rvb.name/vpproxy.git/blobdiff_plain/a6fc8c22788da2788370d533549620cd89b1b982..68a65fd06255411599601a0b9857be6ef2e8eba2:/vlcclient/vlcmessages.py diff --git a/vlcclient/vlcmessages.py b/vlcclient/vlcmessages.py index 10de03d..da8606c 100644 --- a/vlcclient/vlcmessages.py +++ b/vlcclient/vlcmessages.py @@ -9,11 +9,14 @@ 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}:' + 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):