Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
1fd30221
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1fd30221
编写于
2月 17, 2017
作者:
D
derrod
提交者:
jp9000
2月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add gop size option for custom ffmpeg output
Closes jp9000/obs-studio#804
上级
bb51d3d2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
48 addition
and
13 deletion
+48
-13
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+1
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+37
-13
UI/window-basic-main-outputs.cpp
UI/window-basic-main-outputs.cpp
+3
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+1
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+6
-0
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
1fd30221
...
...
@@ -538,6 +538,7 @@ Basic.Settings.Output.Adv.FFmpeg.VEncoderSettings="Video Encoder Settings (if an
Basic.Settings.Output.Adv.FFmpeg.AEncoder
=
"Audio Encoder"
Basic.Settings.Output.Adv.FFmpeg.AEncoderSettings
=
"Audio Encoder Settings (if any)"
Basic.Settings.Output.Adv.FFmpeg.MuxerSettings
=
"Muxer Settings (if any)"
Basic.Settings.Output.Adv.FFmpeg.GOPSize
=
"Keyframe interval (frames)"
# basic mode 'output' settings - advanced section - recording subsection - completer
FilenameFormatting.completer
=
"%CCYY-%MM-%DD %hh-%mm-%ss
\n
%YY-%MM-%DD %hh-%mm-%ss
\n
%Y-%m-%d %H-%M-%S
\n
%y-%m-%d %H-%M-%S
\n
%a %Y-%m-%d %H-%M-%S
\n
%A %Y-%m-%d %H-%M-%S
\n
%Y-%b-%d %H-%M-%S
\n
%Y-%B-%d %H-%M-%S
\n
%Y-%m-%d %I-%M-%S-%p
\n
%Y-%m-%d %H-%M-%S-%z
\n
%Y-%m-%d %H-%M-%S-%Z"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
1fd30221
...
...
@@ -1951,7 +1951,30 @@
</property>
</widget>
</item>
<item
row=
"7"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"advOutFFVGOPSize"
>
<property
name=
"maximum"
>
<number>
1000000000
</number>
</property>
<property
name=
"value"
>
<number>
250
</number>
</property>
</widget>
</item>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_63"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.FFmpeg.GOPSize
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
</set>
</property>
<property
name=
"buddy"
>
<cstring>
advOutFFVGOPSize
</cstring>
</property>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"advOutFFUseRescale"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Expanding"
>
...
...
@@ -1967,7 +1990,7 @@
</property>
</widget>
</item>
<item
row=
"
7
"
column=
"1"
>
<item
row=
"
8
"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutFFRescale"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
...
...
@@ -1977,7 +2000,7 @@
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"0"
>
<item
row=
"
9
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_37"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.FFmpeg.VEncoder
</string>
...
...
@@ -1987,10 +2010,10 @@
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"1"
>
<item
row=
"
9
"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutFFVEncoder"
/>
</item>
<item
row=
"1
0
"
column=
"0"
>
<item
row=
"1
1
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_38"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.FFmpeg.VEncoderSettings
</string>
...
...
@@ -2000,10 +2023,10 @@
</property>
</widget>
</item>
<item
row=
"1
0
"
column=
"1"
>
<item
row=
"1
1
"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"advOutFFVCfg"
/>
</item>
<item
row=
"1
1
"
column=
"0"
>
<item
row=
"1
2
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_41"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.AudioBitrate
</string>
...
...
@@ -2013,7 +2036,7 @@
</property>
</widget>
</item>
<item
row=
"1
1
"
column=
"1"
>
<item
row=
"1
2
"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"advOutFFABitrate"
>
<property
name=
"minimum"
>
<number>
32
</number>
...
...
@@ -2029,14 +2052,14 @@
</property>
</widget>
</item>
<item
row=
"1
2
"
column=
"0"
>
<item
row=
"1
3
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_47"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.AudioTrack
</string>
</property>
</widget>
</item>
<item
row=
"1
2
"
column=
"1"
>
<item
row=
"1
3
"
column=
"1"
>
<widget
class=
"QWidget"
name=
"widget_10"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Maximum"
vsizetype=
"Preferred"
>
...
...
@@ -2105,7 +2128,7 @@
</layout>
</widget>
</item>
<item
row=
"1
3
"
column=
"0"
>
<item
row=
"1
4
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_39"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.FFmpeg.AEncoder
</string>
...
...
@@ -2115,10 +2138,10 @@
</property>
</widget>
</item>
<item
row=
"1
3
"
column=
"1"
>
<item
row=
"1
4
"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutFFAEncoder"
/>
</item>
<item
row=
"1
4
"
column=
"0"
>
<item
row=
"1
5
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_46"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.FFmpeg.AEncoderSettings
</string>
...
...
@@ -2128,7 +2151,7 @@
</property>
</widget>
</item>
<item
row=
"1
4
"
column=
"1"
>
<item
row=
"1
5
"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"advOutFFACfg"
/>
</item>
<item
row=
"0"
column=
"0"
>
...
...
@@ -4132,6 +4155,7 @@
<tabstop>
advOutFFURL
</tabstop>
<tabstop>
advOutFFFormat
</tabstop>
<tabstop>
advOutFFVBitrate
</tabstop>
<tabstop>
advOutFFVGOPSize
</tabstop>
<tabstop>
advOutFFUseRescale
</tabstop>
<tabstop>
advOutFFRescale
</tabstop>
<tabstop>
advOutFFVEncoder
</tabstop>
...
...
UI/window-basic-main-outputs.cpp
浏览文件 @
1fd30221
...
...
@@ -1170,6 +1170,8 @@ inline void AdvancedOutput::SetupFFmpeg()
const
char
*
url
=
config_get_string
(
main
->
Config
(),
"AdvOut"
,
"FFURL"
);
int
vBitrate
=
config_get_int
(
main
->
Config
(),
"AdvOut"
,
"FFVBitrate"
);
int
gopSize
=
config_get_int
(
main
->
Config
(),
"AdvOut"
,
"FFVGOPSize"
);
bool
rescale
=
config_get_bool
(
main
->
Config
(),
"AdvOut"
,
"FFRescale"
);
const
char
*
rescaleRes
=
config_get_string
(
main
->
Config
(),
"AdvOut"
,
...
...
@@ -1202,6 +1204,7 @@ inline void AdvancedOutput::SetupFFmpeg()
obs_data_set_string
(
settings
,
"format_name"
,
formatName
);
obs_data_set_string
(
settings
,
"format_mime_type"
,
mimeType
);
obs_data_set_string
(
settings
,
"muxer_settings"
,
muxCustom
);
obs_data_set_int
(
settings
,
"gop_size"
,
gopSize
);
obs_data_set_int
(
settings
,
"video_bitrate"
,
vBitrate
);
obs_data_set_string
(
settings
,
"video_encoder"
,
vEncoder
);
obs_data_set_int
(
settings
,
"video_encoder_id"
,
vEncoderId
);
...
...
UI/window-basic-main.cpp
浏览文件 @
1fd30221
...
...
@@ -974,6 +974,7 @@ bool OBSBasic::InitBasicConfigDefaults()
GetDefaultVideoSavePath
().
c_str
());
config_set_default_string
(
basicConfig
,
"AdvOut"
,
"FFExtension"
,
"mp4"
);
config_set_default_uint
(
basicConfig
,
"AdvOut"
,
"FFVBitrate"
,
2500
);
config_set_default_uint
(
basicConfig
,
"AdvOut"
,
"FFVGOPSize"
,
250
);
config_set_default_bool
(
basicConfig
,
"AdvOut"
,
"FFUseRescale"
,
false
);
config_set_default_uint
(
basicConfig
,
"AdvOut"
,
"FFABitrate"
,
160
);
...
...
UI/window-basic-settings.cpp
浏览文件 @
1fd30221
...
...
@@ -340,6 +340,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
advOutFFFormat
,
COMBO_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFMCfg
,
EDIT_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFVBitrate
,
SCROLL_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFVGOPSize
,
SCROLL_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFUseRescale
,
CHECK_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFRescale
,
CBEDIT_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
advOutFFVEncoder
,
COMBO_CHANGED
,
OUTPUTS_CHANGED
);
...
...
@@ -1558,6 +1559,8 @@ void OBSBasicSettings::LoadAdvOutputFFmpegSettings()
"FFMCustom"
);
int
videoBitrate
=
config_get_int
(
main
->
Config
(),
"AdvOut"
,
"FFVBitrate"
);
int
gopSize
=
config_get_int
(
main
->
Config
(),
"AdvOut"
,
"FFVGOPSize"
);
bool
rescale
=
config_get_bool
(
main
->
Config
(),
"AdvOut"
,
"FFRescale"
);
const
char
*
rescaleRes
=
config_get_string
(
main
->
Config
(),
"AdvOut"
,
...
...
@@ -1586,6 +1589,7 @@ void OBSBasicSettings::LoadAdvOutputFFmpegSettings()
SelectFormat
(
ui
->
advOutFFFormat
,
format
,
mimeType
);
ui
->
advOutFFMCfg
->
setText
(
muxCustom
);
ui
->
advOutFFVBitrate
->
setValue
(
videoBitrate
);
ui
->
advOutFFVGOPSize
->
setValue
(
gopSize
);
ui
->
advOutFFUseRescale
->
setChecked
(
rescale
);
ui
->
advOutFFRescale
->
setEnabled
(
rescale
);
ui
->
advOutFFRescale
->
setCurrentText
(
rescaleRes
);
...
...
@@ -1701,6 +1705,7 @@ void OBSBasicSettings::SetAdvOutputFFmpegEnablement(
switch
(
encoderType
)
{
case
FF_CODEC_VIDEO
:
ui
->
advOutFFVBitrate
->
setEnabled
(
enabled
);
ui
->
advOutFFVGOPSize
->
setEnabled
(
enabled
);
ui
->
advOutFFUseRescale
->
setEnabled
(
enabled
);
ui
->
advOutFFRescale
->
setEnabled
(
enabled
&&
rescale
);
ui
->
advOutFFVEncoder
->
setEnabled
(
enabled
||
enableEncoder
);
...
...
@@ -2746,6 +2751,7 @@ void OBSBasicSettings::SaveOutputSettings()
SaveFormat
(
ui
->
advOutFFFormat
);
SaveEdit
(
ui
->
advOutFFMCfg
,
"AdvOut"
,
"FFMCustom"
);
SaveSpinBox
(
ui
->
advOutFFVBitrate
,
"AdvOut"
,
"FFVBitrate"
);
SaveSpinBox
(
ui
->
advOutFFVGOPSize
,
"AdvOut"
,
"FFVGOPSize"
);
SaveCheckBox
(
ui
->
advOutFFUseRescale
,
"AdvOut"
,
"FFRescale"
);
SaveCombo
(
ui
->
advOutFFRescale
,
"AdvOut"
,
"FFRescaleRes"
);
SaveEncoder
(
ui
->
advOutFFVEncoder
,
"AdvOut"
,
"FFVEncoder"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录