/
example_config
62 lines (52 loc) · 1.54 KB
/
example_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
# Resolution of your X session
# which you wish to record
#
# Default is your first monitor's resolution
export RESOLUTION="$(xdpyinfo | grep dimensions | awk 'NR==1{print $2}')"
# If you want to use CPU-based encoding instead
# of GPU-based encoding, set to true.
#
# Overrides ENCODER_STANDARD
export SOFTWARE_ENCODE="false"
# If you have an AMD GPU and desire
# to use AMF/VCE instead of VAAPI,
# then set this to true.
#
# XXX: Requires AMF to be set up:
# More details at: https://github.com/durcor/amdgpu-pro-amf-only
export NONFREE_AMD_ENCODER="false"
# Video Framerate
export FPS="60"
# Common encoders are:
# h264
# hevc
# h265
export ENCODER_STANDARD=h264
# Size of replay buffer to save
# Is in minutes
# Can be numbers such as 10 (10 minutes) or 2.5 (2 minutes and 30 seconds)
export REPLAY_BUFFER="5"
# Location to save recordings
#
# By default, saves to the default VIDEOS directory
export VIDEO_FOLDER="$(xdg-user-dir VIDEOS)"
# FFMPEG Command Options
# Change these to change how shadowreplay works with ffmpeg
# Don't mess with these unless you know what you're doing!
ffmpeg_command(){ # Create the function
ffmpeg \
-f x11grab \
-s "$RESOLUTION" \
-r ${FPS} \
-i "$DISPLAY" \
-f pulse -i default \
-ar 44100 \
$ENCODER_OPTS \
-f segment \
-segment_time 30 \
-segment_wrap "$BUFFER_SEGMENTS" \
-segment_list /tmp/ShadowRePlay.m3u8 \
-segment_list_size 6 /tmp/ShadowRePlaySeg%d.ts
}
export -f ffmpeg_command # Export the function