-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
- Loading branch information
1 parent
cfaccba
commit ac7dc7a
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
#////////////////////////////////////////////////////////////// | ||
#// ____ // | ||
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ // | ||
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| // | ||
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ // | ||
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| // | ||
#// |_| |_| // | ||
#////////////////////////////////////////////////////////////// | ||
#// // | ||
#// Script, 2021 // | ||
#// Created: 30, September, 2021 // | ||
#// Modified: 30, September, 2021 // | ||
#// file: - // | ||
#// - // | ||
#// Source: https://gist.github.com/rafi/365926 // | ||
#// https://github.com/acaudwell/Gource/issues/137 // | ||
#// OS: ALL // | ||
#// CPU: ALL // | ||
#// // | ||
#////////////////////////////////////////////////////////////// | ||
|
||
# 720p: 1280x720x24 | ||
# 1080p: 1920x1080x24 | ||
# 2K: 2560x1440x24 | ||
# 4K: 3840x2160x24 | ||
# 5ĸ: 4800x2700x24 # Not tested | ||
# 8K: 7680x4320x24 # 30fps (On nvidia ampere) | ||
|
||
# -2560x1440 # If not --fullscreen # --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500 | ||
# FFMPEG -pix_fmt yuv420p yuvj420p rgb0 | ||
|
||
if (($# == 1)); then | ||
git_url=$(git config --get remote.origin.url) | ||
xvfb-run -a -s "-screen 0 3840x2160x24" \ | ||
gource \ | ||
--stop-at-end \ | ||
--fullscreen \ | ||
--multi-sampling \ | ||
--seconds-per-day 0.1 \ | ||
--highlight-users \ | ||
--max-files 0 \ | ||
--auto-skip-seconds 0.1 \ | ||
--background-colour 000000 \ | ||
--bloom-multiplier 0.8 \ | ||
--key \ | ||
--filename-time 2 \ | ||
--file-idle-time 0 \ | ||
--output-framerate 60 \ | ||
--hide mouse \ | ||
--file-extension-fallback \ | ||
--path . \ | ||
--output-ppm-stream - \ | ||
--title "$git_url" \ | ||
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \ | ||
-vcodec hevc_nvenc -pix_fmt rgb0 \ | ||
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \ | ||
-preset:v p7 -tune:v hq \ | ||
-rc:v vbr -cq:v 10 -b:v 0 \ | ||
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$1" | ||
else | ||
echo "Usage: ${0##*/} <ouput file>" | ||
exit 1 | ||
fi |