• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D26-Aug-200517.6 KiB341281

ChangeLogH A D26-Aug-20057 KiB241157

Makefile.amH A D30-Aug-20053.9 KiB12050

Makefile.inH A D30-Aug-200524.8 KiB774637

READMEH A D30-Aug-20056.7 KiB204145

TODOH A D26-Aug-2005301 65

aclocal.m4H A D27-Aug-200530.8 KiB863773

autogen.shH A D26-Aug-2005148 105

config.guessH A D26-Aug-200542.6 KiB1,4601,260

config.h.inH A D27-Aug-20052.6 KiB10469

config.subH A D26-Aug-200530.4 KiB1,5501,409

configureH A D27-Aug-2005182.8 KiB6,2005,124

configure.inH A D27-Aug-2005923 4331

depcompH A D26-Aug-200515.5 KiB530329

install-shH A D26-Aug-20059 KiB324189

missingH A D26-Aug-200510.6 KiB358267

mkinstalldirsH A D26-Aug-20051.9 KiB11285

rfbproxy.1H A D30-Aug-20057.3 KiB293272

rfbproxy.cH A D03-May-202272.1 KiB2,8722,002

rfbproxy.specH A D27-Aug-20052 KiB8363

rfbproxy.spec.inH A D27-Aug-20052 KiB8363

README

1rfbproxy
2
3This is a record/replay proxy for RFB (used by VNC).  It can be used
4as a proxy between a VNC viewer and a VNC server to permit recording
5into a file, or it can record from a server independently of a client.
6It can also be used as a pseudo-VNC server to play back a recorded
7session, and can convert a recorded VNC session into various video
8formats.
9
10See the man page and comments in rfbproxy.c for more information.
11
12During a proxy record, rfbproxy acts this way:
13
14VNC server <---> rfbproxy <---> VNC viewer
15                    |
16		    v
17		/some/file.rfb
18
19During a shared-session record, rfbproxy acts this way:
20
21VNC viewer(s) <---> VNC server <---> rfbproxy
22                                        |
23                                        v
24                                    /some/file.rfb
25
26During playback, the concept is much simpler:
27
28rfbproxy <---> VNC viewer
29
30rfbproxy then reads a file to present it to the VNC viewer.
31
32
33RECORDING
34
35To record a session (from a running XFree86 server):
36
371. XFree86 version 4 supports VNC's RFB protocol directly.  You can
38   record directly from a running X server; no additional VNC server
39   is needed.  Insure VNC support is available by verifying that
40   the following line is present in your XF86Config file's "Module"
41   section:
42
43      Load "vnc"
44
45   You'll also want to add Option lines to the "Screen" section, at least:
46
47      Option "passwordFile" "/home/baccala/.vnc/passwd"
48
49   If these lines are not present, you'll need to add them and restart X.
50
512. Run 'rfbproxy --record --shared rfb.log'
52   You will be prompted for display's VNC password.
533. Once rfbproxy has connected, your display is being recorded.
544. When finished, kill rfbproxy (either 'kill PID' or CNTL-C should work)
55
56To record a session (from a running non-XFree86 X server):
57
58"x0vncserver" and "x11vnc" are programs that connect to an X server as
59ordinary X clients and function as VNC servers.  Techniques such as
60polling or shared memory are used to determine the contents of the X
61desktop.  Although slower and less reliable than an X server with
62built-in VNC support, these programs require no support beyond the
63core X protocol.  Also, "x11vnc" is capable of exporting a single X
64window instead of the entire desktop.  Use them in place of XFree86's
65"vnc" module in the above instructions.
66
67To record a session (from Microsoft Windows):
68
691. Start the Windows VNC server (available from www.realvnc.com)
70   on the Microsoft system
712. Run 'rfbproxy --record --shared --server SERVER:0 rfb.log' on Linux
72   Replace SERVER with the DNS or IP address of the Microsoft system.
73   You will be prompted for the display's VNC password.
743. Once rfbproxy has connected, your display is being recorded.
754. When finished, kill rfbproxy (either 'kill PID' or CNTL-C should work)
76
77To record a session (from the command line, in proxy mode):
78
791. Start a VNC server on the same host as the rfbproxy will be running on.
802. Run rfbproxy in record mode (--record).  This will create a VNC proxy
81   server running on display :10 (port 5910).
823. Run a VNC viewer, connecting to the VNC proxy server now running as
83   display :10.
844. Once the viewer has connected, your display is being recorded.
855. When finished, quit the VNC viewer.  The VNC proxy server will then
86   quit also; the VNC server should be unaffected.
87
88To record a session (using xinetd, in proxy mode):
89
901. Configure /etc/xinetd.conf to use rfbproxy in record mode:
91
92service rfbproxy-record1
93{
94	port		= 5911
95	socket_type	= stream
96	protocol	= tcp
97	wait		= no
98	user		= nobody
99	server		= /usr/bin/rfbproxy
100	server_args     = --server=:1 --stdout --record /tmp/record:1.rfb
101}
102
103The port is the display number + 5900 (this example uses display :11).
104The --server option specifies which server is controlling the display which
105is being recorded.
106
107For convenience sake, use displays :11 (5911) through :19 (5909) for
108servers on displays :1 (5901) through :9 (5909).  Makes it easy to remember,
109and still leaves display :10 (5910) open for playback.
110
1112. Use a VNC viewer, connecting to the display specified; in this case,
112   display :11.
113
1143. When done, quit the viewer.
115
116To record a session (in shared-session mode):
117
1181. Start a VNC server as normal, on localhost:1
1192. Run 'rfbproxy --record --shared rfb.log'
1203. Once rfbproxy has connected, your display is being recorded.
1214. Run VNC viewer(s), connecting directly to the VNC server
1225. When finished, kill rfbproxy (either 'kill PID' or CNTL-C should work)
123
124
125PLAYBACK
126
127To play back a session, there are three possibilities:
128
129A) Use rfbproxy, this time in playback mode (--playback).  This does
130   not require X; only a VNC viewer somewhere on the network.
131   Use a command like:
132
133   rfbproxy --playback /pub/bugzilla.rfb
134
135B) Use rfbproxy (like A) but from xinetd:
136
137service rfbproxy
138{
139	port		= 5910
140	socket_type	= stream
141	protocol	= tcp
142	wait		= no
143	user		= nobody
144	server		= /usr/bin/rfbproxy
145	server_args     = --stdout --playback /pub/bugzilla.rfb
146}
147
148This example uses display :10 (that is, port 5910 - 5900).
149
150C) Use xrfbviewer, available from www.hexonet.de.  This requires X to run,
151   but also comes with x0rfbserver, a very nice package to allow remote
152   control of a local standard X11 server display.
153
154
155RECORDING TO VIDEO
156
157You probably need to record in shared-session mode for --export to
158work.  See the comments at the beginning of rfbproxy.c to understand
159why.  There are several different video codecs you can use, though I
160think mjpegtools and ffmpeg are the main ones, and many different ways
161to combine the various options.  Look at the man page and the Makefile
162for additional possibilities.
163
164About the simplest video conversion is to convert a recorded session
165to MPEG using the mjpegtools package, doing something like (for DVD
166format):
167
168rfbproxy --export rfb.log \
169	| ppmtoy4m \
170	| yuvscaler -n ntsc -O DVD \
171	| mpeg2enc -f 8 -o video.mpg
172
173It is possible to record audio simultaneously.  I use the 'vrec'
174program from sndkit to record raw audio, then use 'lame' to convert
175this to mpeg audio, then 'mplex' (also from mjpegtools) to multiplex
176this with the video into an MPEG program stream.  The only part at all
177tricky is getting the video and audio synchronized.  I use a shell
178script (see man page) to start and stop rfbproxy and 'vrec'
179simultaneously.
180
181Then lame is used like this:
182
183	lame -m m -x -r -s 48 -h audio audio.mp3
184
185And mplex like this:
186
187	mplex -f 8 -o program.mpg audio.mp3 video.mpg
188
189Now you've got a DVD-compatible MPEG program stream with both video
190and audio in it.
191
192
193Have fun.
194
195NOTES
196
197  If you intend to use the --loop or --cycle options when playing back,
198  you CANNOT use the ZRLE encoding when recording.  This is because the
199  zlib state cannot be maintained.
200
201  DO NOT suspend (CNTL-Z) rfbproxy (or the record script) when recording
202  in shared session mode, as this can freeze all sessions attached to
203  the VNC server.
204