Skip to content

setup example

Werner Robitza edited this page Sep 15, 2020 · 1 revision

Example: Chain Setup

In order to make the setup documentation more understandable a small example is provided on this page.

Requirements

Before the example can start it is necessary to install all requirements. Further more the chain has to be cloned via git to a valid path. Alternatively it is also possible to download it as a zip file and unpack it. Nevertheless let's say for this example the chain is completely located in the following path: /home/myuser/stream-sim.

Setting up the chain

First of all, it has to be mentioned, that the hereby named "SETUP" operation does not setup anything for the script. It is hereby used to setup a new StreamSim project. So at least you can compare the hereby used setup-command as if you will generate a new project in a programming IDE or create a new document with you preferred writing application. So everytime, if you want to create a new stream-sim project you should perform an appropriate setup.

For the next steps we want to setup a basic example project in /home/myuser/proj1. Of course you can also setup it anywhere else. At first we need to create the appropriate path:

mkdir /home/myuser/proj1

Now after we have created the folder there are two possible ways to execute the toolchain. The first one is to switch in into the appropriate path where the projected proj1 should be located in and execute the python script remotely.

cd /home/myuser/proj1 && python ../stream-sim/chain.py setup

OR: The second possibility is to switch into the stream-sim directory and execute the setup with the -p parameter. This might be useful for more complex pathes.

cd /home/myuser/stream-sim && python chain.py setup -p /home/myuser/proj1

Note that these code snippets are only examples and can be applied also in other path constellations. In both cases you'll get an output like:

MKDIR: /home/myuser/proj1/config/
MKDIR: /home/myuser/proj1/logs/
Generate config file pvs @ /home/myuser/proj1/config/
Generate config file src @ /home/myuser/proj1/config/
Generate config file hrc @ /home/myuser/proj1/config/
Generate config file encoding @ /home/myuser/proj1/config/hrc/
Generate config file packet_loss @ /home/myuser/proj1/config/hrc/
Generate config file tc @ /home/myuser/proj1/config/hrc/packet_loss/
Generate config file gemodel @ /home/myuser/proj1/config/hrc/packet_loss/tc/
Generate config file state @ /home/myuser/proj1/config/hrc/packet_loss/tc/
Generate config file random @ /home/myuser/proj1/config/hrc/packet_loss/tc/
Generate config file telchemy @ /home/myuser/proj1/config/hrc/packet_loss/
Generate config file read_trace @ /home/myuser/proj1/config/hrc/packet_loss/telchemy/
Generate config file markov @ /home/myuser/proj1/config/hrc/packet_loss/telchemy/
Generate config file markov2state @ /home/myuser/proj1/config/hrc/packet_loss/telchemy/markov/
Generate config file markov4state @ /home/myuser/proj1/config/hrc/packet_loss/telchemy/markov/
Generate config file pnamspnbams4 @ /home/myuser/proj1/config/hrc/packet_loss/telchemy/markov/
Generate config file x264 @ /home/myuser/proj1/config/codec/
Generate config file x265 @ /home/myuser/proj1/config/codec/
MKDIR: /home/myuser/proj1/outputPcapLoss
MKDIR: /home/myuser/proj1/outputPcap
MKDIR: /home/myuser/proj1/outputDecoded
MKDIR: /media/drive2/proj1/srcVid
MKDIR: /media/drive2/proj1/outputHevc
MKDIR: /media/drive2/proj1/outputPayload

The meaning of this output will be explained in the next section.

What happend during the setup?

Let's have a look into the proj1 directory. It contains the following folders:

  • config: Herein you can find all configuration files. How to use them is also explained in the wiki. An additional documentation for the separate fields is additionally given in the separate configuration file headers.
  • logs: If you will use later the -l option during the chain execution all log files are put into this directory
  • outputDecoded: This folder will contain after the final chain execution the decoded video files.
  • outputHevc: This folder will contain the encoded video contents. Do not wonder because of the HEVC name. This is a residue from former developing times and will be renamed in the future. StreamSim is anyways able to work for other coding formats, than HEVC. So it might be possible, that depending on your settings in the configuration, this folder will also contain non-HEVC data.
  • outputPayload: The raw payload data of the restreamed pcap files
  • outputPcap: The pcap files which will be recorded during the first (i.e. not manipulated) streaming process.
  • outputPcapLoss: The pcap files which will be recorded during the second (i.e. manipulated) streaming process
  • srcVid: The raw video sources in AVI format where the stream simulator tool chain will operate on

If you look into the proj1/config-folder you'll see all configuration files, which can be in order to configure the project for each video source file individually.

What to do next?

Before we can start now to configure the chain, we need to pack raw source videos, stored in the AVI format, into the srcVid folder.

Clone this wiki locally