self-organizing multi-state
Active transcoder SysteM for active network

User Manual

Medianet Lab

Kent State University

December 30, 2000

Bug report: mailto:comments@medianet.kent.edu


Overview
How to Obtain
Compile
Run
Options


Overview:

We are developing the Active Video Transcoder (AVT) system that can perform video transformation on an MPEG-2 video bit-stream system at the Kent MEDIANET lab. This document accompanies the AVT software that we have implemented for concept demonstration. This distribution contains an ISO-/IEC 13818-2 stream transcoder for an Active Router. The system can perform dynamic video rate adaptation, perceptual bit-allocation, and is also capable of demonstrating self-organization behavior. Its self-organization ability currently has multi-configuration running mode from full logic MPEG-2 transcoding mode to Motion Vector reuse mode. 

Current distribution contains three general parts: 

Server – a simple MPEG-2 server program, which supplies movie file as a bit stream to Transcoder. 

Transcoder – program, which does all necessary, changes (rate control and bit-reallocation) to bit stream provided by the Server, and sends new bit stream to Player 

Player – program, which displays the received bitstream and displays it on the screen. 

These three components are expected to run on three different machines. 

Plus there is an additional program written on Java and called “Active Node Control Center,” which gives GUI to transcoder node. It provides an easy way to make all changes in transcoder except the network part. For information how to install and run that program see “Active Node transcoder Control Center” user manual.

Transcoder does two major transformations to the incoming bit stream:

  1. Changes bit rate: it reduces the output bitstream rate (size) comparing to the input one.
  2. Rate re-allocation.
  3. Motion Vector (MV) bypass: reduces coding time by reusing some information about MV.
In the following document you will find information about how to configure and run Transcoder distribution. It also includes scripts, which can be used to test run a simple transcoding session. This is an internal distribution of a system under development andhas been tested only on a limited platform, and is intended for internal use only. 

 

How to Obtain the Distribution:

The name of the current distribution is s-mvX-p.tar. It’s a compressed tar file. Untar the file: 

%tar xvf s-mvX-p.tar 

As a result you should receive new directory ./s-mvX-p, and in it’s turn it will contain five directories: 

./svr-directory for the server 

./player – directory for the player 

./xenc-directory for encoder 

./xdec-directory for decoder 

./test-directory for transcoder (which is combined from decoder and encoder) 

How to Compile:

To compile the server go to the server directory and make the server: 

%cd svr 

%make 

you will receive an executable file “svr” for the server. 

To compile the player go to the player directory and make: 

%cd player 

%make 

you will receive an executable file “mpeg2play” for the player. 

To compile the transcoder go to the test directory and make: 

%cd test 

%make 

you will receive an executable file “xcoder” for the transcoder 

How to Test Run:

Step-1: Distribute the System:

Build the system on all three platform machines.However, for each system compiling only the designated directory will be enough. All three directories are self-sufficient. For more detail see section “Extended Options” of this document. 

All three has been tested on LINUX system. The player platform will require its color depth to be set to 8 bits. Do the following in the player platform to ensure the color depth. 

Step-2: Setup the Network Map:

To run the program can be run in two modes. In the network mode, the server, the transcoder and the player are run in three different machines. The network map of the overall system should be specified in the file net.par. It has following structure. The IP address currently cannot be DNS. None of the system currently requires player address, therefore it can be anywhere. You can use any text editor to edit this file.

 
Component
IP
PORT
Srv
server_ip
server_port
xcoder
xcoder_ip
xcoder_port 
player
*
*

Change the file net.par in the following directories: 

For the server machine in the directory ./svr 

For the player machine in the directory ./player 

For the transcoder machine in the directory ./test 

It should be identical in all three machines.

Step-3: Setup Player Graphic:

Set the color depth of XSERVER to 8 for the Player platform. Check if it is using XDM. If so you need to modify the /etc/X11/xdm/Xservers file. In this file change the statement “X”to “X –bpp 8”. The other option, is to invoke Xserver with “-bpp 8” options.

Step-4: Running the program:

./s-mvX-p directory contains several script files which will help you to run the program in the easiest way,
they are: “serverrun” for the server, “playerrun” for the player, “xocderrun” for the transcoder. 

To start running the server, on the server machine run the command: 

%serverrun 

In the case of the success of this command you will see some output messages 

telling you about the state of execution 

To start running the transcoder, on the transcoder machine run the command: 

%xcoderrun 

In the case of the success of this command you will see some output messages 

telling you about the state of execution 

To start running the player, on the player machine run the command: 

%playerrun 

In the case of the success of this command you will see some output messages 

telling you about the state of execution 

If everything works fine you will see a movie playing on the player machine. 

The movie you’ll see is located in the ./svr directory, the name of the movie file is svr.m2v, it’s possible to change it if you would like to test some other video samples. For changing this file, copy to the ./svr directory some video file with extension *.m2v (it means that this video is encoded in MPEG 2 without audio stream ), then rename the copied file to svr.m2v. 

Setting up the Transcoding Output Bitstream Rate

To vary the bit-rate of the output video: 

change file “rate.par” in the ./test directory, 

There is only float point value N in this file, where N could be 0.0 or any other positive float point number. In case when N is not zero the transcoder will try to re-encode incoming bitstream with bit-rate N bits per second. Keep in mind, that if N is unreasonably small – for example if incoming bitstream has 10Mb/s bit-rate, and N=0.5Mb/s -- then that bit-rate is never going to be achieved, because N is only target bit-rate, and transcoder will try to encode the video stream as close to that bit-rate as it possible, but for each bitstream there is minimum after which bit-rate could not be reduced. 

The default value in this file is 0.0, that means that transcoding process won’t affect the bit-rate of the given bitstream. It means that incoming bitstream will me re-encoded at the same bit-rate as it came. 

Note: changes to this file “rate.par” could be done during the execution of the program and changes will take affect immediately. 

Setting up the Transcoding with adjustable Bitdistribution

It’s possible to set transcoder in the “adjustable bit distribution” mode – when number of available bits for the particular frame will be distributed between one/several “quality windows” and other frame area. These “quality windows” will be located inside the video frame, and picture in this area(s)/window(s) will have different visible quality characteristics than surrounding areas, depending on given parameters in the specified file.

The control file “adjustq” is located in the ./test directory and has the following structure: 

It could contain up to 9 strings with following attributes: 

NXtYtXb Yb

N is the number of “quality window”. 

Xtis right top X-coordinate of the “quality window”. 

Ytis right top Y-coordinate of the “quality window”. 

Xbis left bottom X-coordinate of the “quality window”.

Ybis left bottom Y-coordinate of the “quality window”.

K is the “quality window” parameter – it’s the integer value. In the case it’s positive, the area inside “quality window” will be higher quality than by default encoding, the bigger K the more bits will be allocated for that area – the higher picture quality will be received. In the case it’s negative, the area inside “quality window” will be lower quality than by default encoding, the smaller K the less bits will be allocated for that area – the lower picture quality will be received. In the case it’s zero, the area inside “quality window” will be the same quality as by default encoding. 

Note: Whole frame is presented as 100x100, it’s virtual size and not the actual one in pixels.That means Xt, Yt, Xb, Yb can vary from 0 to 100. 

Extended Options:

It’s actually enough to have on the server machinedirectory:
./svr from the main distribution. 

On the transcoder machine you should have directories: 

./test;./xenc; ./xdec 

On player machine: ./player 

Change file net.par in the directories ./svr; ./test; ./player in a way it’s writtenabove. 

Then on the server machine go to the ./svr directory and run command 

%svr 

In the case of success you will see some messages telling you about the state of the executing program 

Then on the transcoder machine go to the ./test directory and run command 

%ftest 

In the case of success you will see some messages telling you about the state of the executing program 

Then on the player machine go to the ./player directory and run command 

%mpeg2play net.par 

In the case of success you will see some messages telling you about the state of the executing program 

Dynamic motion vector bypassandRateControlcouldbeachieved by changing files “bypass.par” and“rate.par” in the way it’s written in sections: Dynamic Motion Vector Bypass for “bypass.par” and Setting up the Transcoding Output Bitstream Rate for “rate.par”. The important thing to know that these files could be changed during execution of the program and the changes will take affect immediately. You also will see some output statements telling what parameters are changed. 

Dynamic Motion Vector Bypass:

Dynamic motion vector bypass could be done by changing “bypass.par” file, which is located in ./test directory. There’re two flags in it dynamic bypass and bypass by frame. Both these numbers could be zero or one. These flags can be changed in this file at any time before or at the time of the program’s execution by any text editor. Decoder reads this file before the execution and depending on the values does the following:


 
DYN_ON
MVB_ON
Function
0
0
Indicates that the program from now on will work without bypassing any information about motion vectors from decoder to encoder. And the program till the end of the execution never reads file bypass.par again.
 
0
1
Indicates that the program from now on will work with bypassing motion vectors information from decoder to encoder. And the program till the end of the execution never reads file bypass.par again.
 
1
0
that means that the program WON’T bypass motion vectors information from decoder to encoder during execution of current frames. And the program keeps reading file “bypass.par” every next frame. So if information in “bypass.par” is changed than depending on the new values of the dynamic bypass and bypass by frame the program will change its behavior.
 
1
1
that means that the program WILL bypass motion vectors information from decoder to encoder during execution of current frames. And the program keeps reading file “bypass.par” every next frame. So if information in “bypass.par” is changed than depending on the new values of the dynamic bypass and bypass by frame the program will change its behavior.
 

Note: changes to the file “bypass.par” could be done during the execution of the program and changes will take affect immediately. 

The work has been funded by DARPA Research Grant F30602-99-1-0515 under it's Active Network initiative.