# HG changeset patch # User morphbr # Date 1175641815 -3600 # Node ID 63d9475228ac71dfa1a78cf41475363b979c083d # Parent caee9846e7794fd3642607ffb46cc8af5356ceb8 [svn r497] - Updated gmyth-streamer mencoder, xmlrpc and client_ffmpeg diff -r caee9846e779 -r 63d9475228ac gmyth-stream/server/plugins/comm/xmlrpc.py --- a/gmyth-stream/server/plugins/comm/xmlrpc.py Tue Apr 03 21:23:11 2007 +0100 +++ b/gmyth-stream/server/plugins/comm/xmlrpc.py Wed Apr 04 00:10:15 2007 +0100 @@ -15,7 +15,8 @@ def _methodHelp(self, method): if method == 'setup': - return "Setup the Media: setup( filename, mux, vcodec, vbitrate, fps, acodec, abitrate, width, height, port" + return "Setup the Media: setup( filename, mux, vcodec, vbitrate,"\ + " fps, acodec, abitrate, width, height, port, options" elif method == 'play': return "Play the Media: play()" elif method == 'stop': @@ -30,10 +31,17 @@ return "" def setup(self, filename, mux, vcodec, vbitrate,\ - fps, acodec, abitrate, width, height, port): + fps, acodec, abitrate, width, height, port, options): + + msg = "%s %s %s %s %s %s %s" % (filename, mux, vcodec, vbitrate,\ + fps, acodec, abitrate, width, height, port) + + if len(options) > 0: + for opt in options: + msg += " %s" % opt + self.recv_pool.append("SETUP") - self.recv_pool.append("%s %s %s %s %s %s %s" % (filename, mux, vcodec, vbitrate,\ - fps, acodec, abitrate, width, height, port) + self.recv_pool.append(msg) return self.sendMsg() def play(self): diff -r caee9846e779 -r 63d9475228ac gmyth-stream/server/plugins/media/mencoder.py --- a/gmyth-stream/server/plugins/media/mencoder.py Tue Apr 03 21:23:11 2007 +0100 +++ b/gmyth-stream/server/plugins/media/mencoder.py Wed Apr 04 00:10:15 2007 +0100 @@ -37,12 +37,12 @@ if (self.acodec == "mp3lame"): audio = "-oac mp3lame -lameopts cbr:br=%s vol=5" % self.abitrate else: - audio = "-oac lavc -lavcopts acodec=%s abitrate=%s" % (\ + audio = "-oac lavc -lavcopts acodec=%s:abitrate=%s" % (\ self.acodec, self.abitrate) if (opt == "file"): self.kind = "file" - self.args += " %s -mf fps=%s -of %s %s"\ + self.args += " %s -mf fps=%s -of %s -noodml %s"\ " -ovc lavc -lavcopts vcodec=%s:vbitrate=%s -vf scale=%s:%s"\ " -o %s 1> /dev/null 2> /dev/null" % ( self.filename, self.fps, self.mux, audio, self.vcodec, diff -r caee9846e779 -r 63d9475228ac gmyth-stream/server/tests/client_ffmpeg.py --- a/gmyth-stream/server/tests/client_ffmpeg.py Tue Apr 03 21:23:11 2007 +0100 +++ b/gmyth-stream/server/tests/client_ffmpeg.py Wed Apr 04 00:10:15 2007 +0100 @@ -24,21 +24,24 @@ sys.exit(-1) -mplayer = os.popen("which mplayer").read().strip() -mplayer += " - 1> /dev/null" -pin, pout = os.popen2(mplayer) +#mplayer = os.popen("which mplayer").read().strip() +#mplayer += " - 1> /dev/null" +#pin, pout = os.popen2(mplayer) + +teste = open("/tmp/teste2", "w") data = socket.recv(1024) i = 0 while (data != ""): - pin.write(data) + #pin.write(data) + teste.write(data) data = socket.recv(1024) if (i == 500): socket.send("OK") i += 1 -pin.close() +#pin.close() socket.close()