forked from Purple-CSGO/CS2-Config-Presets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffmpeg.cfg
120 lines (108 loc) · 11.5 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 V2.4 by Purp1e
// CFG预设(Purp1e制作)
// #2024/2/25#
// 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
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";
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";
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}\video.mov{QUOTE}"
mirv_streams settings add ffmpeg p0a "-c:v prores -profile:v 4 -alpha_bits 8 {QUOTE}{AFX_STREAM_PATH}\video.mov{QUOTE}"
mirv_streams settings add ffmpeg p1 "-c:v prores -profile:v 2 -pix_fmt yuv422p10le {QUOTE}{AFX_STREAM_PATH}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.mp4{QUOTE}"
// Nvidia
mirv_streams settings add ffmpeg n0 "-c:v hevc_nvenc -g 300 -tune lossless -pix_fmt yuv420p {QUOTE}{AFX_STREAM_PATH}\video.mp4{QUOTE}"
mirv_streams settings add ffmpeg n0p "-c:v hevc_nvenc -g 300 -tune lossless -pix_fmt yuv444p {QUOTE}{AFX_STREAM_PATH}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.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}\video.mp4{QUOTE}"
// Command Aliases
alias tga "mirv_streams settings edit afxDefault settings afxClassic;echo [当前录制设置];echo afxClassic - 无损 .tga 图片序列"
alias p0 "mirv_streams settings edit afxDefault settings p0 ;echo [当前录制设置];echo p0 - ProRes 4444"
alias p0a "mirv_streams settings edit afxDefault settings p0a ;echo [当前录制设置];echo p0a - ProRes 4444 8bits Alpha通道"
alias p1 "mirv_streams settings edit afxDefault settings p1 ;echo [当前录制设置];echo p1 - ProRes 422"
alias c0 "mirv_streams settings edit afxDefault settings c0 ;echo [当前录制设置];echo c0 - x264 无损"
alias c0p "mirv_streams settings edit afxDefault settings c0p ;echo [当前录制设置];echo c0p - x264 无损 YUV44"
alias c1 "mirv_streams settings edit afxDefault settings c1 ;echo [当前录制设置];echo c1 - x264 高画质"
alias c1p "mirv_streams settings edit afxDefault settings c1p ;echo [当前录制设置];echo c1p - x264 高画质 YUV444"
alias c2 "mirv_streams settings edit afxDefault settings c2 ;echo [当前录制设置];echo c2 - x264 中画质"
alias c2p "mirv_streams settings edit afxDefault settings c2p ;echo [当前录制设置];echo c2p - x264 中画质 YUV444"
alias he0 "mirv_streams settings edit afxDefault settings he0 ;echo [当前录制设置];echo he0 - x265 无损"
alias he0p "mirv_streams settings edit afxDefault settings he0p;echo [当前录制设置];echo he0p - x265 无损 YUV444"
alias he1 "mirv_streams settings edit afxDefault settings he1 ;echo [当前录制设置];echo he1 - x265 高画质"
alias he1p "mirv_streams settings edit afxDefault settings he1p;echo [当前录制设置];echo he1p - x265 高画质 YUV444"
alias he2 "mirv_streams settings edit afxDefault settings he2 ;echo [当前录制设置];echo he2 - x265 中画质"
alias he2p "mirv_streams settings edit afxDefault settings he2p;echo [当前录制设置];echo he2p - x265 中画质 YUV444"
alias n0 "mirv_streams settings edit afxDefault settings n0 ;echo [当前录制设置];echo n0 - hevc Nvidia 加速 无损"
alias n0p "mirv_streams settings edit afxDefault settings n0p ;echo [当前录制设置];echo n0p - hevc Nvidia 加速 无损 YUV444"
alias n1 "mirv_streams settings edit afxDefault settings n1 ;echo [当前录制设置];echo n1 - hevc Nvidia 加速 高画质"
alias n1p "mirv_streams settings edit afxDefault settings n1p ;echo [当前录制设置];echo n1p - hevc Nvidia 加速 高画质 YUV444"
alias n2 "mirv_streams settings edit afxDefault settings n2 ;echo [当前录制设置];echo n2 - hevc Nvidia 加速 中画质"
alias n2p "mirv_streams settings edit afxDefault settings n2p ;echo [当前录制设置];echo n2p - hevc Nvidia 加速 中画质 YUV444"
alias a0 "mirv_streams settings edit afxDefault settings a0 ;echo [当前录制设置];echo a0 - hevc AMD 加速 无损"
alias a1 "mirv_streams settings edit afxDefault settings a1 ;echo [当前录制设置];echo a1 - hevc AMD 加速 高画质"
alias a2 "mirv_streams settings edit afxDefault settings a2 ;echo [当前录制设置];echo a2 - hevc AMD 加速 中画质"
alias i0 "mirv_streams settings edit afxDefault settings i0 ;echo [当前录制设置];echo i0 - hevc Intel 加速 无损"
alias i1 "mirv_streams settings edit afxDefault settings i1 ;echo [当前录制设置];echo i1 - hevc Intel 加速 高画质"
alias i2 "mirv_streams settings edit afxDefault settings i2 ;echo [当前录制设置];echo i2 - hevc Intel 加速 中画质"
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;