[Vnc2swf-users] using edit.yp to read from stdin?
Status: Alpha
Brought to you by:
euske
From: The A. <the...@gm...> - 2008-03-21 19:59:20
|
I'm setting up a logging system based on VNC. Vnc2swf sounded like a great way to go, except that swf encoding uses way too much CPU time. Instead, I use vncrec to save the rfb stream to a file. With CopyRect encoding, the files aren't unmanageably large, but pyvnc2swf's edit.pycomplains about unrecognized "CopyRect" encoding. So now I switched to using "vncrec -encodings raw". To keep file size down, I had to modify vncrec to allow me to write to stdout, so I can pipe it to gzip. To my surprise, gzip -9 takes <1% CPU, while pyvnc2swf takes ~80% CPU ( 3.2GHz Xeon)... both result in about the same file size. Anyway, it means that I end up with log files like: logfile.vnc.gz. I can review them with something like: zcat logfile.vnc.gz | vncrec -play - (since I've modified it to also allow reading from stdin). But with 4 hour log files, I need seekable and pausable playback. edit.py to the rescue? Almost: edit.py can't read from stdin either :( When I pipe a raw vnc stream to it, I get: # zcat logfile.vnc.gz | edit.py -o logfile.swf - Using pygame 1.7.1release RangeError: -1: must be in 0...-1 If I instead use a fifo, I get: # zcat logfile.vnc.gz > fifo.vnc & # edit.py -o logfile.swf fifo.vnc Traceback .... [snip] IOError: [Errno 29] Illegal seek I'd really like to avoid having to expand the already massive logfile.vnc.gzinto an uncompressed, raw rfb data stream before running edit.py. Has anyone found a way to make edit.py support reading an rfb stream from stdin? -- http://theamigo.blogspot.com |