Created
October 18, 2018 12:13
-
-
Save ilyaevseev/fc75df36fe27f1ab580e6afb285b9ab7 to your computer and use it in GitHub Desktop.
Benchmark concurrent ffmpeg-nvenc instances.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
test $# = 1 || { echo "Usage: ${0##*/} num-loops"; exit 1; } | |
D="/tmp/${0##*/}" | |
F="$HOME/lord-inquisitor.mp4" | |
rm -rf "$D" || : | |
mkdir -p "$D" | |
T0=`date +%s` | |
for n in `seq 1 $1`; do | |
~/ffmpeg-build-static-binaries/bin/ffmpeg \ | |
-hwaccel cuvid \ | |
-c:v h264_cuvid \ | |
-i "$F" \ | |
-vf scale_npp=1280:720 \ | |
-c:v h264_nvenc \ | |
"$D/$n.mp4" >"$D/$n.log" 2>"$D/$n.err" & | |
done | |
wait | |
echo "Done. $1 loops elapsed $[$(date +%s) - $T0] seconds." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment