People
Supervisors: Dr Masahiro Takatsuka, Steve Smith, Nick Lowe
Programmer: Choon Jin Ng
Introduction
ViSLAB is currently engaging in the research and development of AccessGrid (AG). AG is used for large-scale distributed meetings, collaborative work sessions, seminars, lectures, tutorials, and training.
The current development of AccessGrid enables large-scale video conference to be conducted. Remote PowerPoint tool is used to provide and control PowerPoint presentation. However, there is currently no large scale sharing of desktop display. The only solution used by AG was to utilize a protocol called the VNC which also has its own limit and poses security problems.
As a direct consequent, the project VNCast is created to address these problems.
What is VNC?
VNC stands for Virtual Network Computing. It is a remote display system that allows a user to view and control a computer from anywhere in the world. VNC containts two components, a server (host to be viewed and controled) and the client (the viewer).
The Limitation of VNC
All connections made to the VNC are unicast. Therefore, there can only be limited connections made to the same VNC server. In addition, the more clints that connect to the VNC server, the heavier load and bandwidth usage the VNC server will experience as the server now has to send multiple copies of the same VNC data to each and every of the client.
Having VNC server running on the network could also pose the risk of having hacker access to the server as VNC was not designed for security.
The Solution: VNCast
To address the problems stated above, the project VNCast is introduced.
VNCast is a modified VNC Client that will receive the VNC data, compress them into format such as motion JPEG and multicast them with RTP into the network. Any media player that has RTP protocol support will then be able to receive the compressed data, decode and display it.
To achieve the objectives specified above, VNCast utilizes the following components:
LibVNCClient to recieve the VNC signal.
FFmpeg to encode the VNC signal into motion JPEG format.
LiveMedia library to implement the RTP protocol.
VNCast provides the following benefits:
Greater client scalability Since VNCast utilizes multicast technology, any client on the multicast network would be able to stream the video.
Reduces network and server load By using multicast technology, only one packet has to be sent.
Improves security VNCast would hide the VNC server layer and this would thus avoid having unauthorized access to the VNC server which could enable a hacker to access and control and computer easily.
Installation
For server
VNCServer A VNC server is required for the computer to be viewed. For installation instruction, please refer to VNCast/VNCServer .
VNCast There are a number of dependencies that are required to be compiled and installed before VNCast. Please refer to VNCast/Installation .
For client
MPlayer A custom modified MPlayer should be used with VNCast to receive the video stream. For installation instructions, please refer to VNCast/MPlayer .
VNCViewer A VNC viewer is needed to control the VNC server. For installation instruction, please refer to VNCast/VNCViewer .
Getting Started
For server
To get the server running, run vncserver first:
vncserver
Then followed by VNCast:
vncast [OPTIONS] multicast_address:port server:screen
server:screen refers to the VNC server and its screen number. If vncserver is run on localhost, simply use 127.0.0.1 or localhost. For example:
vncast 127.0.0.1:1
The multicast_address:port is optional. The default is 239.255.42.42:2222.
To change the frame rate, simple append -fps [framerate] as the option.
For further information on the usage of VNCast, simply run vncast with no arguments:
vncast
For client
Users will have to open the video stream by entering the address in the following format:
mplayer rtsp://[rtsp address]:[port number]
The controlling of VNC server can be done with vncviewer. Just run:
vncviewer -shared [vncserver address]:[screen number]
Note: -shared option must be appended to prevent vncserver from disconnecting other clients, such as VNCast.
Advanced Topic
vncserver
To start vncserver with different geometry size, just run:
vncserver -geometry [widthxheight]
To kill a vncserver, run:
vncserver -kill [screen number]
VNCast Development
This section is intended for the developers of VNCast.
Debugging VNCast
Image Produced by VNCast The image produced by VNCast can be output to a file. To do that, change the following in MJPEGDeviceSource.hh from:
#define OUTPUT_JPG_FILE 0
to
#define OUTPUT_JPG_FILE 1
The same can be done to H.264 by setting #define OUTPUT_H264_FILE 1 in H264DeviceSource.hh.
Image Multicast by VNCast The image multicast by VNCast can be retrieved and output to a file. To do this, please use the "OpenRTSP" provided by LiveMedia library. The location of the program is in live/testProgs. In order to run the program, type:
./openRTSP [OPTION] rtsp://[rtsp server]:[port]
appending -m as OPTION will output each individual frame. Otherwise, a video file is produced.
Ongoing development: H.264
H.264 is still in the middle of development in VNCast. The RTP transport protocol was designed to be used with H.264. As a result, the NAL header is supposed to co-serve as the RTP payload header. So far, I've been attempting to send each NAL unit for each RTP packet.
The file that should be examined for H.264 is the function deliverFrameToClient() in H264DeviceSource.cpp and the functions doSpecialFrameHandling() and specialHeaderSize() in H264VideoRTPSink.cpp.
I suspect that the functions doSpecialFrameHandling() and specialHeaderSize() should be left empty since NAL can be sent as the RTP payload and act as the header at the same time.
In deliverFrameToClient(), I've been trying to send only 1 NAL unit per RTP packet at a time as I'm using Singal NAL Unit Packetization Mode.
Video Encoding & Image Quality
All video encoding codes are located in VideoEncoder.cpp file. To change the video encoding code or to adjust the video quality, please look at the function add_video_stream() where parameters such as bit_rate are set.
Issues with VNCast
1. Since MJPEG is utilizing hugh amount of buffer, the buffer might not be big enough to hold the video. There are 2 ways to work around the problem:ww
- Start a lower resolution VNC server. Please see advanced topic on how to do this.
Modify the program source code, enlarge the buffer and recompile the program. Please refer to VNCast/EnlargeBuffer .
2. There are more than 10 types of MJPEG around the marker. Unfortunately, FFmpeg is using one of the rare one. As a result, only MPlayer can play the video stream. VLC and Quicktime doesn't seems to be able to play it.
Downloads
Here is an early experimental version of VNCast: vncast-pre1.0.tar.gz
Please download the specific ffmpeg and live media library provided by us.
Note: The Makefile might need to be modified, depending on where you installed your libraries.
For more information, please contact Choon Jin at cjng AT vislab DOT usyd DOT edu DOT au
ViSLAB