Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- : Script : x264 HD Benchmark
- : Originally coded by : Graysky
- : Updated and sustained by: Dashken and Adrian Wong
- :
- : Revision:
- : v1.0 - v4.0
- : - Initial release and many updates :D
- :
- : v5.0 [May 25, 2012] - Dashken Chan & Adrian Wong
- : - Expanded the benchmark to support 64-bit x264 encoding.
- : - Updated to the latest x264 encoder (r2200).
- : - Added a new 1080p video sample.
- : - Adjusted the x264 encoding settings to better test newer multi-core processors.
- : - Converted the script to support 64-bit versions of x264.exe and dgdecode.dll
- : - Added 32-bit/64-bit menu if script detects 64-bit OS
- : - Added installation of Avisynthx64 (Built on 3/09/2010 with ICC 11) by JoshyD
- : - Added sleep cycles to wait for CPU-Z to complete generating its information.
- : - Cleaned up the codes
- :
- : v5.0.1 [June 6, 2012] - Dashken Chan & Adrian Wong
- : - Solved the problem of the benchmark not generating results if the benchmark folder has
- : a space or spaces in the name.
- : - Solved the problem of the "missing" results.rtf file.
- : - Corrected minor mistakes in the script.
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- cls
- pushd "%CD%\test"
- :avisynth_check32
- if exist "%PROGRAMFILES%\AviSynth 2.5" (
- set bit2run=32
- goto start )
- :avisynth_check64
- if exist "%PROGRAMFILES(x86)%\AviSynth 2.5" (
- set bit2run=64
- goto start )
- goto error
- :error
- echo Attention: Avisynth 2.5.8 not found on this machine
- echo You need to download and install avisynth 2.5.8 for this benchmark to run
- echo Now feeding your browser the link to Avisynth 2.5.8
- echo.
- echo Please try again once you have installed AviSynth
- "Link to download Avisynth.url"
- set /p target=hit ENTER to close this window
- goto exit
- :start
- echo.
- type header.jw
- set /p target=e.g. the CPU multiplier and FSB (like 333x9 for example):
- echo.
- echo The results will be written to x264_1080p-%target%.rtf
- echo.
- echo This new benchmark uses the latest x264 r2197 32-bit and 64-bit encoders so
- echo it will better reflect the performance of multi-core processors. It will
- echo also be more representative of the performance of the latest x264 encoders.
- echo.
- echo The benchmark will now encode a 1080p (1920 x 1080) Full HD video sample.
- echo.
- echo The benchmark will run 4 times with 2 passes per run, for a total of 8 passes.
- echo.
- echo It will take a long time with slower processors, so PLEASE BE PATIENT!
- echo.
- echo For accurate results, please make sure :
- echo - you do NOT use your PC while the benchmark running!
- echo - you have already closed or disabled as many background apps as possible.
- echo.
- :bitrunchoice
- if "%bit2run%"=="64" (
- echo.
- echo Detected 64-bit operating system. Do you want to run the benchmark in:
- echo 1. 32-bit or
- echo 2. 64-bit
- CHOICE /N /C:12 [Select 1 or 2] %1
- REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT
- IF ERRORLEVEL ==2 GOTO 64_bit
- IF ERRORLEVEL ==1 GOTO 32_bit
- )
- :32_bit
- set bit2run=32
- copy /Y dgdecode32.dll dgdecode.dll >NUL
- goto run1
- :64_bit
- copy /Y dgdecode64.dll dgdecode.dll >NUL
- pushd "%CD%\avisynth64_4-16-10"
- call avisynth64_install_techarp.cmd
- popd
- :DEBUGdashky
- REM goto cpuzdetails
- :run1
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 1 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 1 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output NUL "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass1.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 2 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 3 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 4 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 5 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 6 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 7 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 8 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 9 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 10 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 11 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 12 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 13 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 14 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 15 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 16 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 17 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 18 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 19 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- echo --- Now Starting %bit2run%-bit Run 1 : Pass 20 of 20 ---
- echo.
- start /high /b x264-%bit2run% --quiet --pass 2 --stats "1.stats" --preset slower --bitrate 8000 --ref 4 --aq-mode 2 --level 4.1 --keyint 24 --min-keyint 1 --ipratio 1.40 --qcomp 0.6 --threads auto --thread-input --output "../run1-1080p.mp4" "test-1080p.avs" --mvrange 511 --aud 2>&1 | tee run1pass2.log
- echo.
- :cpuzdetails
- REM Load CPU-Z while SpeedStep is off to accurately report the CPU multiplier
- start /low /b cpuz -txt=system_details
- :waitcpuz
- if not exist system_details.txt (
- ping 127.0.0.1 -n 5 -w 1000 >NUL 2>&1
- goto waitcpuz
- )
- :analyze-new
- echo x264 HD BENCHMARK 5.0 RESULTS >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- echo Please do NOT compare it with older versions of the benchmark! >> "x264_1080p-%target%.rtf"
- echo.
- echo Please copy/paste everything below the line to to report your data >> "x264_1080p-%target%.rtf"
- echo to http://forums.techarp.com/reviews-articles/26957-x264-hd-benchmark-5-0-a.html >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- echo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> "x264_1080p-%target%.rtf"
- echo Results for x264.exe r2200 >> "x264_1080p-%target%.rtf"
- echo x264 Benchmark: %bit2run%-bit >> "x264_1080p-%target%.rtf"
- echo ========================== >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- echo Pass 1 >> "x264_1080p-%target%.rtf"
- echo ------ >> "x264_1080p-%target%.rtf"
- grep -U "encoded 5906" run1pass1.log >> "x264_1080p-%target%.rtf"
- grep -U "encoded 11812" run1pass1.log >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- echo Pass 2 >> "x264_1080p-%target%.rtf"
- echo ------ >> "x264_1080p-%target%.rtf"
- grep -U "encoded 5906" run1pass2.log >> "x264_1080p-%target%.rtf"
- grep -U "encoded 11812" run1pass2.log >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- :end
- REM Insert system info into report
- echo. >> "x264_1080p-%target%.rtf"
- echo System Details >> "x264_1080p-%target%.rtf"
- echo -------------- >> "x264_1080p-%target%.rtf"
- grep -U -s "Name" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Codename" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Specification" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Core Stepping" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Technology" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Stock frequency" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Core Speed" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "FID range" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- grep -U -s "Northbridge" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Southbridge" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- grep -U -s "CAS#" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "RAS# Precharge" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Cycle Time (tRAS)" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Command Rate" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Memory Frequency" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Memory Type" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Memory Size" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Channels" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- grep -U -s "Windows Version" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- grep -U -s "max VID" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Voltage sensor 0" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Number of processors" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Number of threads" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "L2 cache" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Instructions sets" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- grep -U -s "Package" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- echo. >> "x264_1080p-%target%.rtf"
- grep -U -s "Temperature" "%CD%\system_details.txt" >> "x264_1080p-%target%.rtf"
- :clean-up
- ping 127.0.0.1 -n 5 -w 1000 >NUL 2>&1
- del *.log >NUL 2>&1
- del *.stats >NUL 2>&1
- del *.mbtree >NUL 2>&1
- del ..\*.mp4 >NUL 2>&1
- del system_details.txt >NUL 2>&1
- move "x264_1080p-%target%.rtf" .. >NUL 2>&1
- ping 127.0.0.1 -n 5 -w 1000 >NUL 2>&1
- if "%bit2run%"=="64" ( pushd "%CD%\avisynth64_4-16-10"
- call avisynth64_uninstall_techarp.cmd
- popd )
- popd
- ping 127.0.0.1 -n 5 -w 1000 >NUL 2>&1
- :publish-new
- echo.
- echo All runs complete!
- echo.
- echo Data written to x264_1080p-%target%.rtf
- echo.
- set /p target=Hit the ENTER key to close this window and open your report!
- start /b wordpad "x264_1080p-%target%.rtf"
- :exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement