Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
2fedcab9
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2fedcab9
编写于
5月 08, 2017
作者:
C
cg2121
提交者:
Clayton Groeneveld
9月 18, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add option to auto remux
上级
14ae6351
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
365 addition
and
251 deletion
+365
-251
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+2
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+263
-243
UI/obs-app.cpp
UI/obs-app.cpp
+13
-0
UI/obs-app.hpp
UI/obs-app.hpp
+4
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+20
-0
UI/window-basic-main.hpp
UI/window-basic-main.hpp
+2
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+19
-0
UI/window-remux.cpp
UI/window-remux.cpp
+35
-7
UI/window-remux.hpp
UI/window-remux.hpp
+7
-1
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
2fedcab9
...
...
@@ -760,6 +760,8 @@ Basic.Settings.Advanced.Network.BindToIP="Bind to IP"
Basic.Settings.Advanced.Network.EnableNewSocketLoop
=
"Enable new networking code"
Basic.Settings.Advanced.Network.EnableLowLatencyMode
=
"Low latency mode"
Basic.Settings.Advanced.Hotkeys.DisableHotkeysInFocus
=
"Disable hotkeys when main window is in focus"
Basic.Settings.Advanced.AutoRemux
=
"Automatically remux to mp4"
Basic.Settings.Advanced.AutoRemux.MP4
=
"(record as mkv)"
# advanced audio properties
Basic.AdvAudio
=
"Advanced Audio Properties"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
2fedcab9
...
...
@@ -145,8 +145,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
80
1
</width>
<height>
836
</height>
<width>
80
4
</width>
<height>
1072
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_19"
>
...
...
@@ -797,8 +797,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
81
8
</width>
<height>
697
</height>
<width>
81
3
</width>
<height>
770
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_21"
>
...
...
@@ -1389,7 +1389,7 @@
<item>
<widget
class=
"QTabWidget"
name=
"advOutTabs"
>
<property
name=
"currentIndex"
>
<number>
0
</number>
<number>
1
</number>
</property>
<property
name=
"usesScrollButtons"
>
<bool>
true
</bool>
...
...
@@ -1680,285 +1680,285 @@
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item
alignment=
"Qt::AlignTop"
>
<widget
class=
"QWidget"
name=
"widget_7"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_15"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
<item>
<widget
class=
"QWidget"
name=
"advOutRecTopContainer"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Maximum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout_16"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::AllNonFixedFieldsGrow
</enum>
</property>
<property
name=
"
rightMargin
"
>
<
number>
0
</number
>
<property
name=
"
labelAlignment
"
>
<
set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set
>
</property>
<property
name=
"
bottom
Margin"
>
<property
name=
"
top
Margin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"Q
Widget"
name=
"advOutRecTopContainer"
native=
"true
"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_32
"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Maximum
"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Expanding
"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout_16"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::AllNonFixedFieldsGrow
</enum>
<property
name=
"minimumSize"
>
<size>
<width>
170
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Simple.SavePath
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecPath
</cstring>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
>
<item>
<widget
class=
"QLineEdit"
name=
"advOutRecPath"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"advOutRecPathBrowse"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Browse
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"advOutNoSpace"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.NoSpaceFileName
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_43"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Format
</string>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecFormat
</cstring>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutRecFormat"
>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
flv
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mp4
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mov
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mkv
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
ts
</string>
</property>
<property
name=
"labelAlignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
m3u8
</string>
</property>
</item>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_29"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.AudioTrack
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QWidget"
name=
"widget_9"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Maximum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_9"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_32"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
170
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack1"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Simple.SavePath
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecPath
</cstring>
<string
notr=
"true"
>
1
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
>
<item>
<widget
class=
"QLineEdit"
name=
"advOutRecPath"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"advOutRecPathBrowse"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Browse
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"advOutNoSpace"
>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack2"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.NoSpaceFileName
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
<string
notr=
"true"
>
2
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_4
3"
>
<item>
<widget
class=
"Q
CheckBox"
name=
"advOutRecTrack
3"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Format
</string>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecFormat
</cstring>
<string
notr=
"true"
>
3
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutRecFormat"
>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
flv
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mp4
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mov
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
mkv
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
ts
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string
notr=
"true"
>
m3u8
</string>
</property>
</item>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_29"
>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack4"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.AudioTrack
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QWidget"
name=
"widget_9"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Maximum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
<string
notr=
"true"
>
4
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_9"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack1"
>
<property
name=
"text"
>
<string
notr=
"true"
>
1
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack2"
>
<property
name=
"text"
>
<string
notr=
"true"
>
2
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack3"
>
<property
name=
"text"
>
<string
notr=
"true"
>
3
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack4"
>
<property
name=
"text"
>
<string
notr=
"true"
>
4
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack5"
>
<property
name=
"text"
>
<string
notr=
"true"
>
5
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack6"
>
<property
name=
"text"
>
<string
notr=
"true"
>
6
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"advOutRecEncLabel
"
>
<item>
<widget
class=
"Q
CheckBox"
name=
"advOutRecTrack5
"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Encoder
</string>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecEncoder
</cstring>
<string
notr=
"true"
>
5
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutRecEncoder"
/>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"advOutRecUseRescale"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"layoutDirection"
>
<enum>
Qt::RightToLeft
</enum>
</property>
<item>
<widget
class=
"QCheckBox"
name=
"advOutRecTrack6"
>
<property
name=
"text"
>
<string
>
Basic.Settings.Output.Adv.Rescale
</string>
<string
notr=
"true"
>
6
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QWidget"
name=
"advOutRecRescaleContainer"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QComboBox"
name=
"advOutRecRescale"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"editable"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_9001"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.CustomMuxerSettings
</string>
</layout>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"advOutRecEncLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Encoder
</string>
</property>
<property
name=
"buddy"
>
<cstring>
advOutRecEncoder
</cstring>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"advOutRecEncoder"
/>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"advOutRecUseRescale"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"layoutDirection"
>
<enum>
Qt::RightToLeft
</enum>
</property>
<property
name=
"text"
>
<string>
Basic.Settings.Output.Adv.Rescale
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QWidget"
name=
"advOutRecRescaleContainer"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QComboBox"
name=
"advOutRecRescale"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"
buddy
"
>
<
cstring>
advOutMuxCustom
</cstring
>
<property
name=
"
editable
"
>
<
bool>
true
</bool
>
</property>
</widget>
</item>
<item
row=
"6"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"advOutMuxCustom"
/>
</item>
</layout>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_9001"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.CustomMuxerSettings
</string>
</property>
<property
name=
"buddy"
>
<cstring>
advOutMuxCustom
</cstring>
</property>
</widget>
</item>
<item
row=
"6"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"advOutMuxCustom"
/>
</item>
</layout>
</widget>
</item>
<item
alignment=
"Qt::AlignTop"
>
<widget
class=
"QWidget"
name=
"widget_7"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_15"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
</layout>
</widget>
</item>
...
...
@@ -3498,8 +3498,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
800
</width>
<height>
69
</height>
<width>
98
</width>
<height>
28
</height>
</rect>
</property>
</widget>
...
...
@@ -4265,7 +4265,7 @@
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"1"
>
<item
row=
"
3
"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_14"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
...
...
@@ -4297,7 +4297,7 @@
</item>
</layout>
</item>
<item
row=
"
2
"
column=
"0"
>
<item
row=
"
3
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_57"
>
<property
name=
"text"
>
<string>
Basic.Settings.Output.ReplayBuffer.Prefix
</string>
...
...
@@ -4320,6 +4320,26 @@
</property>
</spacer>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"autoRemux"
>
<property
name=
"text"
>
<string>
Basic.Settings.Advanced.AutoRemux
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<spacer
name=
"horizontalSpacer_16"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
...
...
UI/obs-app.cpp
浏览文件 @
2fedcab9
...
...
@@ -77,6 +77,9 @@ string opt_starting_collection;
string
opt_starting_profile
;
string
opt_starting_scene
;
bool
remuxAfterRecord
=
false
;
string
remuxFilename
;
// GPU hint exports for AMD/NVIDIA laptops
#ifdef _MSC_VER
extern
"C"
__declspec
(
dllexport
)
DWORD
NvOptimusEnablement
=
1
;
...
...
@@ -1493,8 +1496,18 @@ string GenerateTimeDateFilename(const char *extension, bool noSpace)
string
GenerateSpecifiedFilename
(
const
char
*
extension
,
bool
noSpace
,
const
char
*
format
)
{
OBSBasic
*
main
=
reinterpret_cast
<
OBSBasic
*>
(
App
()
->
GetMainWindow
());
bool
autoRemux
=
config_get_bool
(
main
->
Config
(),
"Video"
,
"AutoRemux"
);
if
((
strcmp
(
extension
,
"mp4"
)
==
0
)
&&
autoRemux
)
extension
=
"mkv"
;
BPtr
<
char
>
filename
=
os_generate_formatted_filename
(
extension
,
!
noSpace
,
format
);
remuxFilename
=
string
(
filename
);
remuxAfterRecord
=
autoRemux
;
return
string
(
filename
);
}
...
...
UI/obs-app.hpp
浏览文件 @
2fedcab9
...
...
@@ -197,6 +197,10 @@ static inline int GetProfilePath(char *path, size_t size, const char *file)
}
extern
bool
portable_mode
;
extern
bool
remuxAfterRecord
;
extern
std
::
string
remuxFilename
;
extern
bool
opt_start_streaming
;
extern
bool
opt_start_recording
;
extern
bool
opt_start_replaybuffer
;
...
...
UI/window-basic-main.cpp
浏览文件 @
2fedcab9
...
...
@@ -5003,6 +5003,23 @@ void OBSBasic::StreamingStop(int code, QString last_error)
}
}
void
OBSBasic
::
AutoRemux
()
{
const
char
*
mode
=
config_get_string
(
basicConfig
,
"Output"
,
"Mode"
);
const
char
*
path
=
strcmp
(
mode
,
"Advanced"
)
?
config_get_string
(
basicConfig
,
"SimpleOutput"
,
"FilePath"
)
:
config_get_string
(
basicConfig
,
"AdvOut"
,
"RecFilePath"
);
std
::
string
s
(
path
);
s
+=
"/"
;
s
+=
remuxFilename
;
const
QString
&
str
=
QString
::
fromStdString
(
s
);
QString
file
=
str
.
section
(
"."
,
0
,
0
);
OBSRemux
*
remux
=
new
OBSRemux
(
path
,
this
,
true
);
remux
->
show
();
remux
->
AutoRemux
(
str
,
file
+
".mp4"
);
}
void
OBSBasic
::
StartRecording
()
{
if
(
outputHandler
->
RecordingActive
())
...
...
@@ -5101,6 +5118,9 @@ void OBSBasic::RecordingStop(int code)
if
(
api
)
api
->
on_event
(
OBS_FRONTEND_EVENT_RECORDING_STOPPED
);
if
(
remuxAfterRecord
)
AutoRemux
();
OnDeactivate
();
}
...
...
UI/window-basic-main.hpp
浏览文件 @
2fedcab9
...
...
@@ -507,6 +507,8 @@ private:
static
void
HotkeyTriggered
(
void
*
data
,
obs_hotkey_id
id
,
bool
pressed
);
void
AutoRemux
();
public:
OBSSource
GetProgramSource
();
OBSScene
GetCurrentScene
();
...
...
UI/window-basic-settings.cpp
浏览文件 @
2fedcab9
...
...
@@ -448,6 +448,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
enableNewSocketLoop
,
CHECK_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
enableLowLatencyMode
,
CHECK_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
disableFocusHotkeys
,
CHECK_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
autoRemux
,
CHECK_CHANGED
,
ADV_CHANGED
);
#if !defined(_WIN32) && !defined(__APPLE__)
delete
ui
->
enableAutoUpdates
;
...
...
@@ -2236,6 +2237,8 @@ void OBSBasicSettings::LoadAdvancedSettings()
"RecRBTime"
);
int
rbSize
=
config_get_int
(
main
->
Config
(),
"AdvOut"
,
"RecRBSize"
);
bool
autoRemux
=
config_get_bool
(
main
->
Config
(),
"Video"
,
"AutoRemux"
);
loading
=
true
;
...
...
@@ -2262,6 +2265,7 @@ void OBSBasicSettings::LoadAdvancedSettings()
ui
->
streamDelaySec
->
setValue
(
delaySec
);
ui
->
streamDelayPreserve
->
setChecked
(
preserveDelay
);
ui
->
streamDelayEnable
->
setChecked
(
enableDelay
);
ui
->
autoRemux
->
setChecked
(
autoRemux
);
SetComboByName
(
ui
->
colorFormat
,
videoColorFormat
);
...
...
@@ -2935,6 +2939,7 @@ void OBSBasicSettings::SaveAdvancedSettings()
SaveSpinBox
(
ui
->
reconnectRetryDelay
,
"Output"
,
"RetryDelay"
);
SaveSpinBox
(
ui
->
reconnectMaxRetries
,
"Output"
,
"MaxRetries"
);
SaveComboData
(
ui
->
bindToIP
,
"Output"
,
"BindIP"
);
SaveCheckBox
(
ui
->
autoRemux
,
"Video"
,
"AutoRemux"
);
#if defined(_WIN32) || defined(__APPLE__) || HAVE_PULSEAUDIO
QString
newDevice
=
ui
->
monitoringDevice
->
currentData
().
toString
();
...
...
@@ -3914,6 +3919,13 @@ void OBSBasicSettings::AdvOutRecCheckWarnings()
if
(
!
warningMsg
.
isEmpty
())
warningMsg
+=
"
\n\n
"
;
warningMsg
+=
QTStr
(
"OutputWarnings.MP4Recording"
);
ui
->
autoRemux
->
setText
(
QTStr
(
"Basic.Settings.Advanced.AutoRemux"
)
+
" "
+
QTStr
(
"Basic.Settings.Advanced.AutoRemux.MP4"
));
}
else
{
ui
->
autoRemux
->
setText
(
QTStr
(
"Basic.Settings.Advanced.AutoRemux"
));
}
delete
advOutRecWarning
;
...
...
@@ -4370,6 +4382,13 @@ void OBSBasicSettings::SimpleRecordingEncoderChanged()
if
(
!
warning
.
isEmpty
())
warning
+=
"
\n\n
"
;
warning
+=
QTStr
(
"OutputWarnings.MP4Recording"
);
ui
->
autoRemux
->
setText
(
QTStr
(
"Basic.Settings.Advanced.AutoRemux"
)
+
" "
+
QTStr
(
"Basic.Settings.Advanced.AutoRemux.MP4"
));
}
else
{
ui
->
autoRemux
->
setText
(
QTStr
(
"Basic.Settings.Advanced.AutoRemux"
));
}
if
(
warning
.
isEmpty
())
...
...
UI/window-remux.cpp
浏览文件 @
2fedcab9
...
...
@@ -31,6 +31,7 @@
#include <QStandardItemModel>
#include <QStyledItemDelegate>
#include <QToolButton>
#include <QTimer>
#include "qt-wrappers.hpp"
...
...
@@ -632,12 +633,13 @@ void RemuxQueueModel::finishEntry(bool success)
The actual remux window implementation
**********************************************************/
OBSRemux
::
OBSRemux
(
const
char
*
path
,
QWidget
*
parent
)
OBSRemux
::
OBSRemux
(
const
char
*
path
,
QWidget
*
parent
,
bool
autoRemux_
)
:
QDialog
(
parent
),
queueModel
(
new
RemuxQueueModel
),
worker
(
new
RemuxWorker
()),
ui
(
new
Ui
::
OBSRemux
),
recPath
(
path
)
recPath
(
path
),
autoRemux
(
autoRemux_
)
{
setAcceptDrops
(
true
);
...
...
@@ -649,6 +651,13 @@ OBSRemux::OBSRemux(const char *path, QWidget *parent)
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
RestoreDefaults
)
->
setEnabled
(
false
);
if
(
autoRemux
)
{
resize
(
280
,
40
);
ui
->
tableView
->
hide
();
ui
->
buttonBox
->
hide
();
ui
->
label
->
hide
();
}
ui
->
progressBar
->
setMinimum
(
0
);
ui
->
progressBar
->
setMaximum
(
1000
);
ui
->
progressBar
->
setValue
(
0
);
...
...
@@ -860,7 +869,14 @@ void OBSRemux::beginRemux()
setAcceptDrops
(
false
);
remuxNextEntry
();
}
void
OBSRemux
::
AutoRemux
(
QString
inFile
,
QString
outFile
)
{
if
(
inFile
!=
""
&&
outFile
!=
""
&&
autoRemux
)
{
emit
remux
(
inFile
,
outFile
);
autoRemuxFile
=
inFile
;
}
}
void
OBSRemux
::
remuxNextEntry
()
...
...
@@ -873,12 +889,15 @@ void OBSRemux::remuxNextEntry()
}
else
{
queueModel
->
endProcessing
();
OBSMessageBox
::
information
(
this
,
QTStr
(
"Remux.FinishedTitle"
),
queueModel
->
checkForErrors
()
?
QTStr
(
"Remux.FinishedError"
)
:
QTStr
(
"Remux.Finished"
));
if
(
!
autoRemux
)
{
OBSMessageBox
::
information
(
this
,
QTStr
(
"Remux.FinishedTitle"
),
queueModel
->
checkForErrors
()
?
QTStr
(
"Remux.FinishedError"
)
:
QTStr
(
"Remux.Finished"
));
}
ui
->
progressBar
->
setVisible
(
false
);
ui
->
progressBar
->
setVisible
(
autoRemux
);
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
)
->
setText
(
QTStr
(
"Remux.Remux"
));
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
RestoreDefaults
)
->
...
...
@@ -912,7 +931,16 @@ void OBSRemux::updateProgress(float percent)
void
OBSRemux
::
remuxFinished
(
bool
success
)
{
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
)
->
setEnabled
(
true
);
queueModel
->
finishEntry
(
success
);
if
(
autoRemux
&&
autoRemuxFile
!=
""
)
{
QFile
::
remove
(
autoRemuxFile
);
QTimer
::
singleShot
(
3000
,
this
,
SLOT
(
close
()));
}
remuxNextEntry
();
}
...
...
UI/window-remux.hpp
浏览文件 @
2fedcab9
...
...
@@ -56,12 +56,18 @@ class OBSRemux : public QDialog {
virtual
void
closeEvent
(
QCloseEvent
*
event
)
override
;
virtual
void
reject
()
override
;
bool
autoRemux
;
QString
autoRemuxFile
;
public:
explicit
OBSRemux
(
const
char
*
recPath
,
QWidget
*
parent
=
nullptr
);
explicit
OBSRemux
(
const
char
*
recPath
,
QWidget
*
parent
=
nullptr
,
bool
autoRemux
=
false
);
virtual
~
OBSRemux
()
override
;
using
job_t
=
std
::
shared_ptr
<
struct
media_remux_job
>
;
void
AutoRemux
(
QString
inFile
,
QString
outFile
);
protected:
void
dropEvent
(
QDropEvent
*
ev
);
void
dragEnterEvent
(
QDragEnterEvent
*
ev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录