Record VNC session with Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
examples
ext/enchex_c
lib
spec
.gitignore
.rspec
CHANGELOG.md
Gemfile
LICENSE.txt
README.md
Rakefile
vncrec.gemspec

README.md

VNCRec

VNCRec is a gem that provides you tools to record VNC session.

Installation

gem install vncrec

Usage

There is a binary called vncrec, which is a recorder tool.

With no host specified, it will listen on given port (5900 by default) for connection from VNC server (they refer to that mode as reverse connection). This is intended to be used when you want to record remote desktop and you don't know if it's available.

Call vncrec -h for list of available options. To stop recording send SIGINT (press ^C).

You can also use VNCRec::Recorder class in your ruby code.

require 'vncrec'

r = VNCRec::Recorder.new(filename: "myvncsession.mp4")
r.run
# loop do 
#   sleep 100
# end

If you have FFmpeg installed, file extension is passed just through to it, so you can specify encoder you want by passing .mp4 or .flv, etc. If no filename specified, vncrec assumes raw. There is also a way to record raw video by specifying filename with extension .raw. This way FFmpeg is not required.

NOTE: you should use avconv (from libav-tools) on some debian systems. Please, make a symlink, e.g. ln -s /usr/bin/avconv /usr/bin/ffmpeg.