Skip to content

Commit 304c7c3

Browse files
committed
Add gource-nvenc-screenless scripts
Signed-off-by: Bensuperpc <[email protected]>
1 parent f404f35 commit 304c7c3

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

Commands.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ For encoding, creating, recording or downloading videos
145145
- [`screen-capture`](#screen-capture)
146146
- [`screen-capture-webcam`](#screen-capture-webcam)
147147
- [`gource-nvenc`](#gource-nvenc)
148+
- [`gource-nvenc-screenless`](#gource-nvenc-screenless)
148149
- [`gource-h265`](#gource-h265)
149150
- [`h265-nvenc`](#h265-nvenc)
150151
- [`merge-audio-video`](#merge-audio-video)
@@ -822,6 +823,14 @@ Generate video with all commit and repository evolution (with nvenc)
822823
$ gource-nvenc <output file>
823824
```
824825

826+
### gource-nvenc-screenless
827+
828+
Generate video with all commit and repository evolution in CLI, without screen (with nvenc and xvfb-run)
829+
830+
```bash
831+
$ gource-nvenc-screenless <output file>
832+
```
833+
825834
### gource-h265
826835

827836
Generate video with all commit and repository evolution (with H265)

video/gource-nvenc-screenless.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env bash
2+
#//////////////////////////////////////////////////////////////
3+
#// ____ //
4+
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
5+
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
6+
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
7+
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
8+
#// |_| |_| //
9+
#//////////////////////////////////////////////////////////////
10+
#// //
11+
#// Script, 2021 //
12+
#// Created: 30, September, 2021 //
13+
#// Modified: 30, September, 2021 //
14+
#// file: - //
15+
#// - //
16+
#// Source: https://gist.github.com/rafi/365926 //
17+
#// https://github.com/acaudwell/Gource/issues/137 //
18+
#// OS: ALL //
19+
#// CPU: ALL //
20+
#// //
21+
#//////////////////////////////////////////////////////////////
22+
23+
# 720p: 1280x720x24
24+
# 1080p: 1920x1080x24
25+
# 2K: 2560x1440x24
26+
# 4K: 3840x2160x24
27+
# 5ĸ: 4800x2700x24 # Not tested
28+
# 8K: 7680x4320x24 # 30fps (On nvidia ampere)
29+
30+
# -2560x1440 # If not --fullscreen # --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500
31+
# FFMPEG -pix_fmt yuv420p yuvj420p rgb0
32+
33+
if (($# == 1)); then
34+
git_url=$(git config --get remote.origin.url)
35+
xvfb-run -a -s "-screen 0 3840x2160x24" \
36+
gource \
37+
--stop-at-end \
38+
--fullscreen \
39+
--multi-sampling \
40+
--seconds-per-day 0.1 \
41+
--highlight-users \
42+
--max-files 0 \
43+
--auto-skip-seconds 0.1 \
44+
--background-colour 000000 \
45+
--bloom-multiplier 0.8 \
46+
--key \
47+
--filename-time 2 \
48+
--file-idle-time 0 \
49+
--output-framerate 60 \
50+
--hide mouse \
51+
--file-extension-fallback \
52+
--path . \
53+
--output-ppm-stream - \
54+
--title "$git_url" \
55+
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
56+
-vcodec hevc_nvenc -pix_fmt rgb0 \
57+
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
58+
-preset:v p7 -tune:v hq \
59+
-rc:v vbr -cq:v 10 -b:v 0 \
60+
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$1"
61+
else
62+
echo "Usage: ${0##*/} <ouput file>"
63+
exit 1
64+
fi

0 commit comments

Comments
 (0)