Skip to content

Commit e1aaff7

Browse files
committed
Add logo file option for gource
Signed-off-by: Bensuperpc <[email protected]>
1 parent 2e4b5d6 commit e1aaff7

File tree

3 files changed

+125
-55
lines changed

3 files changed

+125
-55
lines changed

video/gource-nvenc-screenless-4k.sh

Lines changed: 59 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,66 @@
3131
# FFMPEG -pix_fmt yuv420p yuvj420p rgb0
3232

3333
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-
--font-scale 1.50 \
47-
--key \
48-
--filename-time 2 \
49-
--file-idle-time 0 \
50-
--output-framerate 60 \
51-
--hide mouse \
52-
--file-extension-fallback \
53-
--path . \
54-
--output-ppm-stream - \
55-
--title "$git_url" \
56-
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
57-
-vcodec hevc_nvenc -pix_fmt rgb0 \
58-
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
59-
-preset:v p7 -tune:v hq \
60-
-rc:v vbr -cq:v 10 -b:v 0 \
61-
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$1"
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+
--font-scale 1.50 \
47+
--key \
48+
--filename-time 2 \
49+
--file-idle-time 0 \
50+
--output-framerate 60 \
51+
--hide mouse \
52+
--file-extension-fallback \
53+
--path . \
54+
--output-ppm-stream - \
55+
--title "$git_url" \
56+
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
57+
-vcodec hevc_nvenc -pix_fmt rgb0 \
58+
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
59+
-preset:v p7 -tune:v hq \
60+
-rc:v vbr -cq:v 10 -b:v 0 \
61+
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$1"
62+
elif (($# == 2)); then
63+
git_url=$(git config --get remote.origin.url)
64+
xvfb-run -a -s "-screen 0 3840x2160x24" \
65+
gource \
66+
--stop-at-end \
67+
--fullscreen \
68+
--multi-sampling \
69+
--seconds-per-day 0.1 \
70+
--highlight-users \
71+
--max-files 0 \
72+
--auto-skip-seconds 0.1 \
73+
--background-colour 000000 \
74+
--bloom-multiplier 0.8 \
75+
--font-scale 1.50 \
76+
--key \
77+
--filename-time 2 \
78+
--file-idle-time 0 \
79+
--output-framerate 60 \
80+
--hide mouse \
81+
--file-extension-fallback \
82+
--logo "$1" \
83+
--path . \
84+
--output-ppm-stream - \
85+
--title "$git_url" \
86+
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
87+
-vcodec hevc_nvenc -pix_fmt rgb0 \
88+
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
89+
-preset:v p7 -tune:v hq \
90+
-rc:v vbr -cq:v 10 -b:v 0 \
91+
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$2"
6292
else
6393
echo "Usage: ${0##*/} <ouput file>"
94+
echo " ${0##*/} <logo file> <ouput file>"
6495
exit 1
6596
fi

video/gource-nvenc-screenless.sh

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,64 @@
3131
# FFMPEG -pix_fmt yuv420p yuvj420p rgb0
3232

3333
if (($# == 1)); then
34-
git_url=$(git config --get remote.origin.url)
35-
xvfb-run -a -s "-screen 0 2560x1440x24" \
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"
34+
git_url=$(git config --get remote.origin.url)
35+
xvfb-run -a -s "-screen 0 2560x1440x24" \
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+
elif (($# == 2)); then
62+
git_url=$(git config --get remote.origin.url)
63+
xvfb-run -a -s "-screen 0 2560x1440x24" \
64+
gource \
65+
--stop-at-end \
66+
--fullscreen \
67+
--multi-sampling \
68+
--seconds-per-day 0.1 \
69+
--highlight-users \
70+
--max-files 0 \
71+
--auto-skip-seconds 0.1 \
72+
--background-colour 000000 \
73+
--bloom-multiplier 0.8 \
74+
--key \
75+
--filename-time 2 \
76+
--file-idle-time 0 \
77+
--output-framerate 60 \
78+
--hide mouse \
79+
--file-extension-fallback \
80+
--logo "$1" \
81+
--path . \
82+
--output-ppm-stream - \
83+
--title "$git_url" \
84+
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
85+
-vcodec hevc_nvenc -pix_fmt rgb0 \
86+
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
87+
-preset:v p7 -tune:v hq \
88+
-rc:v vbr -cq:v 10 -b:v 0 \
89+
-minrate:v 1M -maxrate:v 800M -bufsize:v 800M "$2"
6190
else
6291
echo "Usage: ${0##*/} <output file .mkv>"
92+
echo " ${0##*/} <logo file> <output file .mkv>"
6393
exit 1
6494
fi

video/gource-nvenc.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ if (($# == 1)); then
3030
-f image2pipe -vcodec ppm -i - -vcodec hevc_nvenc \
3131
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
3232
-pix_fmt rgb0 -preset:v p7 -tune:v hq -rc:v vbr -cq:v 10 -b:v 0 -minrate:v 1M -maxrate:v 400M -bufsize:v 800M "$1"
33+
elif (($# == 2)); then
34+
git_url=$(git config --get remote.origin.url)
35+
gource --fullscreen --disable-input --multi-sampling --output-framerate 60 --seconds-per-day 0.1 --logo "$1" \
36+
--hide mouse --filename-time 2 --max-files 0 --bloom-multiplier 0.8 --highlight-users --file-extension-fallback --path . \
37+
--auto-skip-seconds 0.1 --background-colour 000000 --key --stop-at-end --title "$git_url" --output-ppm-stream - | ffmpeg -y -r 60 \
38+
-f image2pipe -vcodec ppm -i - -vcodec hevc_nvenc \
39+
-bf:v 3 -rc-lookahead:v 32 -refs:v 16 -b_ref_mode:v middle \
40+
-pix_fmt rgb0 -preset:v p7 -tune:v hq -rc:v vbr -cq:v 10 -b:v 0 -minrate:v 1M -maxrate:v 400M -bufsize:v 800M "$2"
3341
else
3442
echo "Usage: ${0##*/} <output file .mkv>"
43+
echo " ${0##*/} <logo file> <output file .mkv>"
3544
exit 1
3645
fi

0 commit comments

Comments
 (0)