UI: Allow generated filenames for FFmpeg output

This changes the way the advanced output section's FFmpeg output
settings work by allowing the user to select whether they want to output
to a file or output to a URL, and makes it so file names are
automatically generated like other recording outputs.

If they choose to output to a file, it'll only require an output
directory similarly to how other recording outputs work.  They can
select a directory to output to rather than being required to type in a
full path and filename; the filename is automatically generated.  The
extension is also automatically retrieved from libff depending on the
format selected.

Otherwise if they have Output to URL selected, it'll show a simple edit
box where they can type in the target URL.
This commit is contained in:
jp9000
2015-08-18 20:58:24 -07:00
parent cd222f8ce0
commit 75dcd1ffa3
5 changed files with 290 additions and 158 deletions

View File

@@ -681,6 +681,11 @@ bool OBSBasic::InitBasicConfigDefaults()
config_set_default_string(basicConfig, "AdvOut", "RecEncoder",
"none");
config_set_default_bool (basicConfig, "AdvOut", "FFOutputToFile",
true);
config_set_default_string(basicConfig, "AdvOut", "FFFilePath",
GetDefaultVideoSavePath().c_str());
config_set_default_string(basicConfig, "AdvOut", "FFExtension", "mp4");
config_set_default_uint (basicConfig, "AdvOut", "FFVBitrate", 2500);
config_set_default_bool (basicConfig, "AdvOut", "FFUseRescale",
false);