Tests
Suites
Latest Results
Search
Register
Login
Popular Tests
Timed Linux Kernel Compilation
Blender
7-Zip Compression
SVT-AV1
FFmpeg
Newest Tests
OpenVINO GenAI
Rustls
LiteRT
WarpX
Epoch
Valkey
Recently Updated Tests
RELION
Llama.cpp
OpenVINO
Renaissance
Blender
vkpeak
New & Recently Updated Tests
Recently Updated Suites
Machine Learning
Server Motherboard
HPC - High Performance Computing
New & Recently Updated Suites
Component Benchmarks
CPUs / Processors
GPUs / Graphics
OpenGL
Disks / Storage
Motherboards
File-Systems
Operating Systems
OpenBenchmarking.org
Corporate / Organization Info
Bug Reports / Feature Requests
FFmpeg 7.0.1
pts/ffmpeg-7.0.1
- 05 April 2024 -
Update against FFmpeg 7.0 upstream.
downloads.xml
<?xml version="1.0"?> <!--Phoronix Test Suite v10.8.5--> <PhoronixTestSuite> <Downloads> <Package> <URL>http://ffmpeg.org/releases/ffmpeg-7.0.tar.xz</URL> <MD5>d2edfc6ec6494c432828876e3102f740</MD5> <SHA256>4426a94dd2c814945456600c8adfc402bee65ec14a70e8c531ec9a2cd651da7b</SHA256> <FileName>ffmpeg-7.0.tar.xz</FileName> <FileSize>10791240</FileSize> </Package> <Package> <URL>https://code.videolan.org/videolan/x264/-/archive/7ed753b10a61d0be95f683289dfb925b800b0676/x264-7ed753b10a61d0be95f683289dfb925b800b0676.zip</URL> <MD5>dec93f9a2fd2a91afff1e9d5fb2fea54</MD5> <SHA256>48b9160177774f3efd29a60d722d9eddd6c023c0904a9a4f83377aa6e6845edb</SHA256> <FileName>x264-7ed753b10a61d0be95f683289dfb925b800b0676.zip</FileName> <FileSize>1222728</FileSize> </Package> <Package> <URL>https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.6.tar.gz</URL> <MD5>99997ecc8ee4d3575ba7715c759ad3bb</MD5> <SHA256>663531f341c5389f460d730e62e10a4fcca3428ca2ca109693867bc5fe2e2807</SHA256> <FileName>x265_3.6.tar.gz</FileName> <FileSize>1655889</FileSize> </Package> <Package> <URL>http://arcade.cs.columbia.edu/vbench/data/vbench.zip</URL> <MD5>f7f5217fbcaabc17363d99a1559800f8</MD5> <SHA256>c34b873a18b151322483ca460fcf9ed6a5dbbc2bb74934c57927b88ee1de3472</SHA256> <FileName>vbench-01.zip</FileName> <FileSize>874958969</FileSize> </Package> </Downloads> </PhoronixTestSuite>
install.sh
#!/bin/sh tar -xf ffmpeg-7.0.tar.xz unzip -o x264-7ed753b10a61d0be95f683289dfb925b800b0676.zip tar -xf x265_3.6.tar.gz mkdir ffmpeg_/ export PKG_CONFIG_PATH="$HOME/ffmpeg_/lib/pkgconfig" cd ~/x264-7ed753b10a61d0be95f683289dfb925b800b0676 ./configure --prefix=$HOME/ffmpeg_/ --enable-static --enable-lto --enable-pic make -j $NUM_CPU_CORES make install cd ~/x265_3.6/build cmake ../source/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/ffmpeg_/ make -j $NUM_CPU_CORES make install cd ~/ffmpeg-7.0/ ./configure --disable-zlib --disable-doc --prefix=$HOME/ffmpeg_/ --extra-cflags="-I$HOME/ffmpeg_/include" --extra-ldflags="-L$HOME/ffmpeg_/lib -ldl" --bindir="$HOME/ffmpeg_/bin" --pkg-config-flags="--static" --enable-gpl --enable-libx264 --enable-libx265 make -j $NUM_CPU_CORES echo $? > ~/install-exit-status make install cd ~ rm -rf ffmpeg-7.0/ unzip -o vbench-01.zip cd vbench/code patch -p0 <<'EOF' diff -Naur reference.py.orig reference.py --- reference.py.orig 2021-03-21 17:47:18.000000000 -0400 +++ reference.py 2022-10-30 13:36:31.346904399 -0400 @@ -13,7 +13,7 @@ p = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE,shell=True) out, err = p.communicate() - m = re.search("average:([0-9]+\.[0-9]+)",err) + m = re.search("average:([0-9]+\.[0-9]+)",err.decode('utf-8')) # cleanup try: @@ -22,7 +22,7 @@ pass if m is None: - m = re.search("average:(inf)",err) + m = re.search("average:(inf)",err.decode('utf-8')) assert m is not None return 100.0 else: @@ -34,7 +34,7 @@ p = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - m = re.search("bitrate: ([0-9]+) kb/s",err) + m = re.search("bitrate: ([0-9]+) kb/s",err.decode('utf-8')) assert m is not None return int(m.group(1))*1000 #report in b/s @@ -45,24 +45,29 @@ cmd = [ffprobe,"-show_entries","stream=width,height",video] p = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - # grep resolution - width = re.search("width=([0-9]+)",out) + width = re.search("width=([0-9]+)",out.decode('utf-8')) assert width is not None, "Problem in fetching video width with {} on {}".format(ffprobe,video) - height = re.search("height=([0-9]+)",out) + height = re.search("height=([0-9]+)",out.decode('utf-8')) assert height is not None, "Problem in fetching video height with {} on {}".format(ffprobe,video) resolution = int( width.group(1) ) * int( height.group(1) ) # grep framerate - frame = re.search("([0-9\.]+) fps",err) + frame = re.search("([0-9\.]+) fps",err.decode('utf-8')) assert frame is not None, "Problem in fetching framerate with {} on {}".format(ffprobe,video) framerate = float(frame.group(1)) - return resolution, framerate + cmd = [ffprobe,"-select_streams", "v:0", "-count_frames", "-show_entries", "stream=nb_read_frames",video] + p = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + num_frames = re.search("nb_read_frames=([0-9]+)",out.decode('utf-8')) + frame_count = int(num_frames.group(1)) + + return resolution, framerate, frame_count -def encode(ffmpeg, video, settings, output): +def encode(ffmpeg, video, settings, output, encoder): ''' perform the transcode operation using ffmpeg ''' - cmd = [ffmpeg,"-i",video,"-c:v","libx264","-threads",str(1)]+settings+["-y",output] + cmd = [ffmpeg,"-i",video,"-c:v",encoder,"-threads",str(1)]+settings+["-y",output] start = timer() p = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() @@ -70,10 +75,10 @@ return elapsed -def encode_2pass(ffmpeg, video, settings, output_file): +def encode_2pass(ffmpeg, video, settings, output_file, encoder): ''' perform two pass transcoding ''' - time_to_encode1 = encode(ffmpeg, video, ["-pass", str(1) ,"-f", "null", "-an", "-sn"]+settings, "/dev/null") - time_to_encode2 = encode(ffmpeg, video, ["-pass", str(2)]+settings, output_file) + time_to_encode1 = encode(ffmpeg, video, ["-pass", str(1) ,"-f", "null", "-an", "-sn"]+settings, "/dev/null", encoder) + time_to_encode2 = encode(ffmpeg, video, ["-pass", str(2)]+settings, output_file, encoder) return time_to_encode1+time_to_encode2 @@ -89,6 +94,8 @@ help="Transcoding scenario") parser.add_argument("--output_dir", type=str,default="/tmp", help="Where to save transcoded videos") + parser.add_argument("--encoder", type=str,default="libx264", + help="FFmpeg encoder to use") parser.add_argument("--ffmpeg_dir", type=str, default=os.path.join(vbench_root,"code/bin"), help="Path to ffmpeg installation folder") @@ -106,6 +113,7 @@ else: video_dir = os.path.join(os.getenv("VBENCH_ROOT"),"videos/crf18") + ffmpeg_encoder = args.encoder ffmpeg = os.path.join(args.ffmpeg_dir, "ffmpeg") ffprobe = os.path.join(args.ffmpeg_dir, "ffprobe") assert(os.path.isfile(ffmpeg) and os.access(ffmpeg, os.X_OK)), \ @@ -129,7 +137,9 @@ # perform transcoding ############################################### - print "# video_name, transcoding time, psnr compared to original, transcode bitrate" + print("# video_name, transcoding time, psnr compared to original, transcode bitrate") + total_elapsed = 0 + total_frames = 0 for v_name in input_files: video = os.path.join(video_dir, v_name) @@ -138,10 +148,12 @@ if args.scenario == "upload": settings = [ "-crf","18" ] - elapsed = encode(ffmpeg,video,settings,output_video) + resolution, framerate, num_frames = get_video_stats(ffprobe, video) + elapsed = encode(ffmpeg,video,settings,output_video, ffmpeg_encoder) else: # get stats of the video and use to compute target_bitrate - resolution, framerate = get_video_stats(ffprobe, video) + resolution, framerate, num_frames = get_video_stats(ffprobe, video) + total_frames += num_frames # fixed number of bits per pixel as target bitrate if framerate > 30: @@ -163,13 +175,15 @@ else: settings += [ "-preset","veryfast","-tune","zerolatency" ] - elapsed = encode(ffmpeg,video,settings,output_video) + elapsed = encode(ffmpeg,video,settings,output_video, ffmpeg_encoder) elif args.scenario in ["vod","platform"]: settings += [ "-preset","medium" ] - elapsed = encode_2pass(ffmpeg, video, settings, output_video) + elapsed = encode_2pass(ffmpeg, video, settings, output_video, ffmpeg_encoder) + num_frames *= 2 elif args.scenario == "popular": settings += [ "-preset","veryslow" ] - elapsed = encode_2pass(ffmpeg, video, settings, output_video) + elapsed = encode_2pass(ffmpeg, video, settings, output_video, ffmpeg_encoder) + num_frames *= 2 else: raise NotImplementedError @@ -177,7 +191,13 @@ psnr = get_psnr(ffmpeg, output_video, video) transcode_bitrate = get_bitrate(ffprobe, output_video) - print "{},{},{},{}".format(v_name, elapsed, psnr, transcode_bitrate) + print("{},{},{},{}".format(v_name, elapsed, psnr, transcode_bitrate)) + total_elapsed += elapsed + total_frames += num_frames + + print("Total Elaped Time (s): {}".format(total_elapsed)) + print("Total Frames: {}".format(total_frames)) + print("Average FPS: {}".format(total_frames / total_elapsed)) # cleanup try: EOF cd ~ echo "#!/bin/sh cd vbench/code export LD_LIBRARY_PATH=\$HOME/ffmpeg_/lib/:\$LD_LIBRARY_PATH VBENCH_ROOT=\$HOME/vbench/ python3 reference.py --ffmpeg_dir=\$HOME/ffmpeg_/bin/ \$@ > \$LOG_FILE 2>&1 echo \$? > ~/test-exit-status" > ffmpeg chmod +x ffmpeg
results-definition.xml
<?xml version="1.0"?> <!--Phoronix Test Suite v10.8.5--> <PhoronixTestSuite> <ResultsParser> <OutputTemplate>Average FPS: #_RESULTS_#</OutputTemplate> <ResultScale>FPS</ResultScale> <ResultProportion>HIB</ResultProportion> </ResultsParser> </PhoronixTestSuite>
test-definition.xml
<?xml version="1.0"?> <!--Phoronix Test Suite v10.8.5--> <PhoronixTestSuite> <TestInformation> <Title>FFmpeg</Title> <AppVersion>7.0</AppVersion> <Description>This is a benchmark of the FFmpeg multimedia framework. The FFmpeg test profile is making use of a modified version of vbench from Columbia University's Architecture and Design Lab (ARCADE) [http://arcade.cs.columbia.edu/vbench/] that is a benchmark for video-as-a-service workloads. The test profile offers the options of a range of vbench scenarios based on freely distributable video content and offers the options of using the x264 or x265 video encoders for transcoding.</Description> <ResultScale>FPS</ResultScale> <Proportion>HIB</Proportion> <TimesToRun>3</TimesToRun> </TestInformation> <TestProfile> <Version>7.0.1</Version> <SupportedPlatforms>Linux</SupportedPlatforms> <SoftwareType>Utility</SoftwareType> <TestType>Processor</TestType> <License>Free</License> <Status>Verified</Status> <ExternalDependencies>build-utilities, yasm, nasm, python, cmake</ExternalDependencies> <EnvironmentSize>1300</EnvironmentSize> <ProjectURL>https://ffmpeg.org/</ProjectURL> <RepositoryURL>https://github.com/FFmpeg/FFmpeg</RepositoryURL> <Maintainer>Michael Larabel</Maintainer> <SystemDependencies>pkg-config</SystemDependencies> </TestProfile> <TestSettings> <Option> <DisplayName>Encoder</DisplayName> <Identifier>encoder</Identifier> <ArgumentPrefix>--encoder=</ArgumentPrefix> <Menu> <Entry> <Name>libx264</Name> <Value>libx264</Value> </Entry> <Entry> <Name>libx265</Name> <Value>libx265</Value> </Entry> </Menu> </Option> <Option> <DisplayName>Scenario</DisplayName> <Identifier>scenario</Identifier> <Menu> <Entry> <Name>Live</Name> <Value>live</Value> </Entry> <Entry> <Name>Upload</Name> <Value>upload</Value> </Entry> <Entry> <Name>Platform</Name> <Value>platform</Value> </Entry> <Entry> <Name>Video On Demand</Name> <Value>vod</Value> </Entry> <Entry> <Name>Upload</Name> <Value>upload</Value> </Entry> </Menu> </Option> </TestSettings> </PhoronixTestSuite>