HD-VideoBench. A Benchmark for Evaluating High Definition Digital Video Applications

Installation and running instructions

Index

  1. Before installing

  2. Download HD-VideoBench

  3. Installation script

  4. Detailed Installation Instructions

  5. Running the Benchmark

  6. Auxiliary Video Tools


1. Before Installing

2. Download HD-VideoBench and Test Sequences

HD-VideoBench is provided in three packages:
- The first one is hd-videobench-0.1.tar.gz which consist of the current distribution of the source code of all the applications.
- The other contains the complete set of uncompressed input videos in YUF format in three resolutions (1088p25, 720p25 and 576p25). This package have been divided into three packages, one for each of the resolutions covered by HD-VideoBench.
- The third package contains the video sequences compressed with MPEG-2, MPEG-4 and H.264 video codecs, which is subdivided in three packages one for each Codec.

After unpacking HD-VideoBench you should have a directory structure like this:

                hdvideobench
                          |
                          ------------- local                      # resulting binaries and libraries
                          ------------- src                        # source code of the applications
                          ------------- tarballs                   # tar.gz or tar.bz2 of application's source code
                          ------------- test_sequences              # input video sequences 
                          

                         defines.inc                               # definitions for automating the installation and execution
                         install.sh                               #installation script                         
                         running.sh                               # running script

                        

3. Installation script

We provide a script called install.sh for automating the installation process, you only need to:


4. Detailed Installation Instructions

If you (for any reason) do not want to use the installation script or if you have any problem with it, you can follow the detailed installation instructions:

4.1 Define the following variable

4.2 Compile and install the required libraries and applications.

4.3.1 NASM assembler
Required by X264 and Xvid on the X86 architecture.
4.3.2 Installation of Xvid
4.3.3 Installation of X264
4.3.4 Installation of MPlayer
MPLayer includes the code of FFMPEG and Libmpeg-2.

5. Running the Benchmark

For HD-VideoBench MPlayer simplifies the process of installing and running multiple video libraries because it includes Libmpeg-2 and FFMPEG. The only external libraries needed are Xvid and X264. By using MPlayer calling the video codecs included in HD-VideoBench can be done through a unified interface. MPlayer selects the appropriate codec and code or decode the input video using it. By default we have disabled the output of the video to the screen (-vo null) because we are interested in benchmarking the video codecs not the output video device. Additionally we want to test the maximum capacity of the hardware platform (-benchmark) even if this result in performance beyond the real time requirements of the video codec (i.e more than 25 fps)

5.1. Script for automatic runnings

We provide a script for automating the execution of the benchmarks: running.sh. By default the script will execute all the applications (MPEG2, MPEG-4 and H.264/AVC encoders and decoders) for all the input sequences (blue_sky, pedestrian, riverbed, rush_hour) and resolutions (576p25, 720p25, 1088p25). If you want to test only a part of the applications and/or a selection of the input sequences you only have to comment some lines in the script and/or restrict the set of input sequences to be used. An example of that is detailed in the script itself.

The results of the encoding process go to the ${HDBENCH/test/sequences/out directory, after an execution of the benchmark it is a good idea to clean the files of this directory especially if you are running out of space. The decoding applications do not produce output files because we have disable the output of this process.

5.2 Manual execution of HDVideoBench Applications

If you do not want to use the running script, below, we provide the detailed commands required for coding and decoding an example input video sequence (576p25_blue_sky).

5.2.1 MPEG-2 Encoding

${HDBENCH}/local/bin/mencoder ${HDBENCH}/test_sequences/yuv/576p25_blue_sky.yuv \
    -demuxer rawvideo -rawvideo fps=25:w=720:h=576 \
    -o ${HDBENCH}/test_sequences/out/576p25_blue_sky_mpeg2.avi -ofps 25 \
    -ovc lavc -lavcopts vcodec=mpeg2video:vqscale=5:vmax_b_frames=2:subq=8:psnr

5.2.2 MPEG-2 Decoding

${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/mpeg2/576p25_blue_sky.avi -vc mpeg12 -nosound -vo null -benchmark

5.2.3 MPEG-4 Encoding

${HDBENCH}/local/bin/mencoder ${HDBENCH}/test_sequences/yuv/576p25_blue_sky.yuv \
    -demuxer rawvideo -rawvideo fps=25:format=i420:w=176:h=144 \
    -o ${HDBENCH}/test_sequences/out/576p25_blue_sky_mpeg4.avi \
    -ofps 25 -ovc xvid -xvidencopts fixed_quant=5:max_bframes=2:qpel:psnr:debug=3

5.4 MPEG-4 Decoding

${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/mpeg4/576p25_blue_sky.avi -vc xvid -nosound -vo null -benchmark

5.5 H.264/AVC Encoding

${HDBENCH}/local/bin/x264 --bframes 2 --no-b-adapt --b-bias=0 --ref 16 --qp=26 \
    --analyse all --weightb --me hex --merange 24 --subme 7 --8x8dct \
    -fps 25 --frames 101 --progress -o ${HDBENCH}/test_sequences/out/576p25_blue_sky.h264 \
    ${HDBENCH}/test_sequences/yuv/576p25_blue_sky.yuv 720x576

5.6 H.264 Decoding

${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/h264/576p25_blue_sky.h264 -vc ffh264 -nosound -vo null -benchmark


6. Auxiliary Video Tools

FFMPEG and MPlayer are very useful tools for video processing in research environments. They allow to display, encode, decode and transcode video in multiple formats. Here, we provide some useful tips for manipulating videos in different formats, specially in YUV 4:2:0 uncompressed planar format.

6.1 Resamplig YUV files using FFMPEG (upsamplig from 1920x1080 to 1920x1088)

ffmpeg -s 1920×1080 - r 25 -f rawvideo -pix_fmt yuv420p -i input_video.yuv \
-an -s 1920x1088 -f rawvideo -pix_fmt yuv420p -y output_video.yuv

6.2 Insert a YUV file into an AVI container without compressing using FFMPEG

ffmpeg -s 1920x1088 - r 25 -f rawvideo -pix_fmt yuv420p -i input_video.yuv \
-vcodec copy -y output_video.avi

6.3 Playing YUVs with mplayer

mplayer input_video.yuv -demuxer rawvideo \
-rawvideo w=<width>:h=<heigth>_fps=<frames_per_sec>:format:i420

6. 4 Re-scaling YUVs with mencoder

mencoder -demuxer rawvideo -rawvideo fps=25:w=352:h=288:format=i420 -vf \
scale=176:144,format=i420 -ovc raw -of rawvideo input.cif.yuv -o output.qcif.yuv

6.5 Display macroblock types in mpeg4 videos with mplayer

mplayer -vo x11 -fps 25 -lavdopts debug=0×400:vismv=1 “$@” file.avi


Created by Mauricio Alvarez alvarez AT ac.upc.edu

last revision: 19.06.2007