HD-VideoBench compiles on Linux and most UNIX architectures, also in MS-Windows with cygwin or mingw.
Required tools: GCC and (gnu) make.
It has been tested on the following architectures:
Linux / x86: Pentium III, gcc-4.1.2
Mac-OS-X / PowerPC. PPC970, gcc-3.3.3
Linux / PowerPC. PPC970, gcc-4.1.1
wget
http://people.ac.upc.edu/alvarez/misc/hdvideobench-0.1.tar.gz(22 MB)
(MD5 signature: hdvideobench-0.1.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/576p25_yuv.tar.gz (134 MB)
(MD5 signature: 576p25_yuv.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/720p25_yuv.tar.gz (284 MB)
(MD5 signature: 720p25_yuv.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/1088p25_yuv.tar.gz (640 MB)
MD5 signature: 1088p25_yuv.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/mpeg2.tar.gz (94 MB)
(MD5 signature: mpeg2.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/mpeg4.tar.gz (69 MB)
(MD5 signature: mpeg4.tar.gz.asc)
wget
http://people.ac.upc.edu/alvarez/misc/h264.tar.gz (32 MB)
(MD5 signature: h264.tar.gz.asc)
tar xvfz hd-videobench-0.1.tar.gztar xvfz 576p25_yuv.tar.gztar xvfz 720p25_yuv.tar.gztar xvfz 1088p25_yuv.tar.gztar xvfz mpeg2.tar.gztar xvfz mpeg4.tar.gztar xvfz h264.tar.gzAfter 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
We provide a script called install.sh for automating the installation process, you only need to:
Modify the includes.inc file (included in the hdvideobench distribution)
Set the variable HDBENCH_DIR with your base directory.
Execute the installation script
./install.sh
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:
HDBENCH: the complete route to the hdvideobench directory:
export HDBENCH=/home/user/hdvideobench
cd ${HDBENCH}/src
tar xvfz ${HDBENCH}/tarballs/nasm-0.98.39.tar.gz
cd nasm-0.98.39
./configure --prefix=${HDBENCH}/local
make
make install
cd ${HDBENCH}/src/
tar xvfj ${HDBENCH}/tarballs/xvidcore-1.1.2.tar.bz2
cd xvidcore-1.1.2/build/generic/
./configure --prefix=${HDBENCH}/local
make
make install
cd ${HDBENCH}/src
tar xvfj ${HDBENCH}/tarballs/x264-snapshot-20070314-2245.tar.bz2
cd x264-snapshot-20070314-2245
./configure --prefix=${HDBENCH}/local
make
make install
cd ${HDBENCH}/src
tar xvfj ${HDBENCH}/tarballs/MPlayer-1.0rc1.tar.bz2
cd MPlayer-1.0rc1
./configure --prefix=${HDBENCH}/local \
--with-extralibdir=${HDBENCH}/local/lib
\
-with-extraincdir=${HDBENCH}/local/include
make
make install
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)
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.
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).
${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
${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/mpeg2/576p25_blue_sky.avi -vc mpeg12 -nosound -vo null -benchmark
${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
${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/mpeg4/576p25_blue_sky.avi -vc xvid -nosound -vo null -benchmark
${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
${HDBENCH}/local/bin/mplayer ${HDBENCH}/test_sequences/h264/576p25_blue_sky.h264 -vc ffh264 -nosound -vo null -benchmark
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.
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
ffmpeg -s 1920x1088 - r 25 -f rawvideo -pix_fmt yuv420p -i input_video.yuv \
-vcodec copy -y output_video.avi
mplayer input_video.yuv -demuxer rawvideo \
-rawvideo w=<width>:h=<heigth>_fps=<frames_per_sec>:format:i420
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
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