This repository has been archived by the owner on Jan 14, 2024. It is now read-only.
forked from Purple-CSGO/CSGO-Config-Presets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffmpeg.cfg
120 lines (108 loc) · 11.7 KB
/
ffmpeg.cfg
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// ═══════════════════════════════════════════
// Config Preset V1.7 by Purp1e
// CFG预设(Purp1e制作)
// #2023/1/12#
// https://space.bilibili.com/73115492
// ═══════════════════════════════════════════
// FFmpeg录制预设CFG by Purple-CSGO
// 1.安装FFMPEG到 "hlae安装目录\ffmpeg\bin\ffmpeg.exe"
// 2.输入预设指令改变录制参数(p0 p1 p2等)
// 3.推荐使用1号预设 如 c1 n1
// 4.硬件加速可以极大减少CPU占用,在CPU偏弱时很有帮助,注意显卡驱动过旧会导致录制出错
// 窗口失焦/在后台时不掉帧
engine_no_focus_sleep 0
// Command: Clear all presets
mirv_exec alias allclear "tga;mirv_streams settings remove tga;mirv_streams settings remove p0;mirv_streams settings remove p0a;mirv_streams settings remove p1;mirv_streams settings remove c0;mirv_streams settings remove c0p;mirv_streams settings remove c1;mirv_streams settings remove c1p;clear2;clear3";
mirv_exec alias clear2 "mirv_streams settings remove c2;mirv_streams settings remove c2p;mirv_streams settings remove he0;mirv_streams settings remove he0p;mirv_streams settings remove he1;mirv_streams settings remove he1p;mirv_streams settings remove he2;mirv_streams settings remove he2p;mirv_streams settings remove n0;mirv_streams settings remove n0p";
mirv_exec alias clear3 "mirv_streams settings remove n1;mirv_streams settings remove n1p;mirv_streams settings remove n2;mirv_streams settings remove n2p;mirv_streams settings remove a0;mirv_streams settings remove a1;mirv_streams settings remove a2;mirv_streams settings remove i0;mirv_streams settings remove i1;mirv_streams settings remove i2";
// ProRes
mirv_streams settings add ffmpeg p0 "-c:v prores -profile:v 4 {QUOTE}{AFX_STREAM_PATH}.mov{QUOTE}"
mirv_streams settings add ffmpeg p0a "-c:v prores -profile:v 4 -alpha_bits 8 {QUOTE}{AFX_STREAM_PATH}.mov{QUOTE}"
mirv_streams settings add ffmpeg p1 "-c:v prores -profile:v 2 -pix_fmt yuv422p10le {QUOTE}{AFX_STREAM_PATH}.mov{QUOTE}"
// CPU
mirv_streams settings add ffmpeg c0 "-c:v libx264 -preset 0 -qp 0 -g 300 -keyint_min 1 -pix_fmt yuv422p10le {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg c0p "-c:v libx264 -preset 0 -qp 0 -g 300 -keyint_min 1 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg c1 "-c:v libx264 -preset 1 -crf 4 -qmax 20 -g 300 -keyint_min 1 -pix_fmt yuv420p -x264-params ref=3:me=hex:subme=3:merange=12:b-adapt=1:aq-mode=2:aq-strength=0.9:no-fast-pskip=1 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg c1p "-c:v libx264 -preset 1 -crf 4 -qmax 20 -g 300 -keyint_min 1 -pix_fmt yuv444p -x264-params ref=3:me=hex:subme=3:merange=12:b-adapt=1:aq-mode=2:aq-strength=0.9:no-fast-pskip=1 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg c2 "-c:v libx264 -preset 1 -crf 12 -qmax 26 -g 300 -keyint_min 1 -pix_fmt yuv420p -x264-params ref=3:me=hex:subme=3:merange=12:b-adapt=1:aq-mode=2:aq-strength=0.9:no-fast-pskip=1 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg c2p "-c:v libx264 -preset 1 -crf 12 -qmax 26 -g 300 -keyint_min 1 -pix_fmt yuv444p -x264-params ref=3:me=hex:subme=3:merange=12:b-adapt=1:aq-mode=2:aq-strength=0.9:no-fast-pskip=1 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he0 "-c:v libx265 -x265-params no-sao=1 -preset 0 -lossless -g 300 -keyint_min 1 -pix_fmt yuv422p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he0p "-c:v libx265 -x265-params no-sao=1 -preset 0 -lossless -g 300 -keyint_min 1 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he1 "-c:v libx265 -x265-params no-sao=1 -preset 1 -crf 8 -qmax 20 -g 300 -keyint_min 1 -pix_fmt yuv422p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he1p "-c:v libx265 -x265-params no-sao=1 -preset 1 -crf 8 -qmax 20 -g 300 -keyint_min 1 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he2 "-c:v libx265 -x265-params no-sao=1 -preset 1 -crf 16 -qmax 28 -g 300 -keyint_min 1 -pix_fmt yuv422p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg he2p "-c:v libx265 -x265-params no-sao=1 -preset 1 -crf 16 -qmax 28 -g 300 -keyint_min 1 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
// Nvidia
mirv_streams settings add ffmpeg n0 "-c:v hevc_nvenc -g 300 -tune lossless -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg n0p "-c:v hevc_nvenc -g 300 -tune lossless -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg n1 "-c:v hevc_nvenc -g 300 -preset medium -tune hq -rc constqp -qp 14 -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg n1p "-c:v hevc_nvenc -g 300 -preset medium -tune hq -rc constqp -qp 14 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg n2 "-c:v hevc_nvenc -g 300 -preset medium -tune hq -rc constqp -qp 20 -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg n2p "-c:v hevc_nvenc -g 300 -preset medium -tune hq -rc constqp -qp 20 -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
// AMD
mirv_streams settings add ffmpeg a0 "-c:v hevc_amf -usage 0 -quality 0 -rc cqp -qp 0 -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg a1 "-c:v hevc_amf -usage 0 -quality 0 -rc cqp -qp 12 -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg a2 "-c:v hevc_amf -usage 0 -quality 0 -rc cqp -qp 20 -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
// Intel
mirv_streams settings add ffmpeg i0 "-c:v hevc_qsv -q:v 0 -preset veryfast -g 300 -pix_fmt nv12 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg i1 "-c:v hevc_qsv -q:v 12 -preset veryfast -g 300 -pix_fmt nv12 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
mirv_streams settings add ffmpeg i2 "-c:v hevc_qsv -q:v 20 -preset veryfast -g 300 -pix_fmt nv12 {QUOTE}{AFX_STREAM_PATH}.mp4{QUOTE}"
// Command Aliases
mirv_exec alias tga "mirv_streams settings edit afxDefault settings afxClassic;echo;echo {QUOTE}当前录制设置: afxClassic - 无损tga图片序列{QUOTE};echo;";
mirv_exec alias p0 "mirv_streams settings edit afxDefault settings p0 ;echo;echo {QUOTE}当前录制设置: p0 {QUOTE};echo;"
mirv_exec alias p0a "mirv_streams settings edit afxDefault settings p0a ;echo;echo {QUOTE}当前录制设置: p0a {QUOTE};echo;"
mirv_exec alias p1 "mirv_streams settings edit afxDefault settings p1 ;echo;echo {QUOTE}当前录制设置: p1 {QUOTE};echo;"
mirv_exec alias c0 "mirv_streams settings edit afxDefault settings c0 ;echo;echo {QUOTE}当前录制设置: c0 {QUOTE};echo;"
mirv_exec alias c0p "mirv_streams settings edit afxDefault settings c0p ;echo;echo {QUOTE}当前录制设置: c0p {QUOTE};echo;"
mirv_exec alias c1 "mirv_streams settings edit afxDefault settings c1 ;echo;echo {QUOTE}当前录制设置: c1 {QUOTE};echo;"
mirv_exec alias c1p "mirv_streams settings edit afxDefault settings c1p ;echo;echo {QUOTE}当前录制设置: c1p {QUOTE};echo;"
mirv_exec alias c2 "mirv_streams settings edit afxDefault settings c2 ;echo;echo {QUOTE}当前录制设置: c2 {QUOTE};echo;"
mirv_exec alias c2p "mirv_streams settings edit afxDefault settings c2p ;echo;echo {QUOTE}当前录制设置: c2p {QUOTE};echo;"
mirv_exec alias he0 "mirv_streams settings edit afxDefault settings he0 ;echo;echo {QUOTE}当前录制设置: he0 {QUOTE};echo;"
mirv_exec alias he0p "mirv_streams settings edit afxDefault settings he0p;echo;echo {QUOTE}当前录制设置: he0p{QUOTE};echo;"
mirv_exec alias he1 "mirv_streams settings edit afxDefault settings he1 ;echo;echo {QUOTE}当前录制设置: he1 {QUOTE};echo;"
mirv_exec alias he1p "mirv_streams settings edit afxDefault settings he1p;echo;echo {QUOTE}当前录制设置: he1p{QUOTE};echo;"
mirv_exec alias he2 "mirv_streams settings edit afxDefault settings he2 ;echo;echo {QUOTE}当前录制设置: he2 {QUOTE};echo;"
mirv_exec alias he2p "mirv_streams settings edit afxDefault settings he2p;echo;echo {QUOTE}当前录制设置: he2p{QUOTE};echo;"
mirv_exec alias n0 "mirv_streams settings edit afxDefault settings n0 ;echo;echo {QUOTE}当前录制设置: n0 {QUOTE};echo;"
mirv_exec alias n0p "mirv_streams settings edit afxDefault settings n0p ;echo;echo {QUOTE}当前录制设置: n0p {QUOTE};echo;"
mirv_exec alias n1 "mirv_streams settings edit afxDefault settings n1 ;echo;echo {QUOTE}当前录制设置: n1 {QUOTE};echo;"
mirv_exec alias n1p "mirv_streams settings edit afxDefault settings n1p ;echo;echo {QUOTE}当前录制设置: n1p {QUOTE};echo;"
mirv_exec alias n2 "mirv_streams settings edit afxDefault settings n2 ;echo;echo {QUOTE}当前录制设置: n2 {QUOTE};echo;"
mirv_exec alias n2p "mirv_streams settings edit afxDefault settings n2p ;echo;echo {QUOTE}当前录制设置: n2p {QUOTE};echo;"
mirv_exec alias a0 "mirv_streams settings edit afxDefault settings a0 ;echo;echo {QUOTE}当前录制设置: a0 {QUOTE};echo;"
mirv_exec alias a1 "mirv_streams settings edit afxDefault settings a1 ;echo;echo {QUOTE}当前录制设置: a1 {QUOTE};echo;"
mirv_exec alias a2 "mirv_streams settings edit afxDefault settings a2 ;echo;echo {QUOTE}当前录制设置: a2 {QUOTE};echo;"
mirv_exec alias i0 "mirv_streams settings edit afxDefault settings i0 ;echo;echo {QUOTE}当前录制设置: i0 {QUOTE};echo;"
mirv_exec alias i1 "mirv_streams settings edit afxDefault settings i1 ;echo;echo {QUOTE}当前录制设置: i1 {QUOTE};echo;"
mirv_exec alias i2 "mirv_streams settings edit afxDefault settings i2 ;echo;echo {QUOTE}当前录制设置: i2 {QUOTE};echo;"
echo "────────────┬────────────┬────────────────────"
echo " 指令 | 8bit 444 | 含义 "
echo "────────────┼────────────┼────────────────────"
echo " tga | | .tga 图片序列"
echo " p0 | | ProRes 4444"
echo " p0a | | ProRes 4444 8bits Alpha通道"
echo " p1 | | ProRes 422"
echo " c0 | c0p | x264 无损"
echo " c1 | c1p | x264 高画质"
echo " c2 | c2p | x264 中画质"
echo " he0 | he0p | x265 无损"
echo " he1 | he1p | x265 高画质"
echo " he2 | he2p | x265 中画质"
echo " n0 | n0p | hevc Nvidia 加速 无损"
echo " n1 | n1p | hevc Nvidia 加速 高画质"
echo " n2 | n2p | hevc Nvidia 加速 中画质"
echo " a0 | | hevc AMD 加速 无损"
echo " a1 | | hevc AMD 加速 高画质"
echo " a2 | | hevc AMD 加速 中画质"
echo " i0 | | hevc Intel 加速 无损"
echo " i1 | | hevc Intel 加速 高画质"
echo " i2 | | hevc Intel 加速 中画质"
echo "────────────┴────────────┴──────────────────────"
echo "████ 注意";echo;
echo "1. 显卡编码需要满足驱动版本 出错请更新驱动"
echo "2. 显卡编码可能有数量限制 N卡最多同时录三层"
echo "3. 较老的显卡不支持hevc"
echo " → 手动替换所有 hevc_nvenc/amf/qsv 为 h264_nvenc ...";
// 设定默认使用的预设(此处根据需要修改)
c1;