SHA256
Add Custom Output Path API
This commit is contained in:
1 parent
2a5ceb4889
commit
bdc8b4abb0
2 files changed
+10
-4
No files matched your search
@@ -27,12 +27,14 @@ namespace ADOFAIRenderer.Core
|
||||
public static bool TimePatch = true;
|
||||
public static bool ScreenPatch = true;
|
||||
public static Func<bool> EndCondition = () => scrController.instance.state == States.Won;
|
||||
public static string? OutputPath;
|
||||
|
||||
public static void Reset()
|
||||
{
|
||||
Auto = true;
|
||||
TimePatch = true; ScreenPatch = true;
|
||||
EndCondition = () => scrController.instance.state == States.Won;
|
||||
OutputPath = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,7 +413,7 @@ namespace ADOFAIRenderer.Core
|
||||
|
||||
private IEnumerator SetupPlay()
|
||||
{
|
||||
if (Configuration.AudioConfig.RenderAudio && GetOutputExtension(Configuration.VideoConfig.Codec) != ".mp4")
|
||||
if (Configuration.AudioConfig.RenderAudio && Configuration.VideoConfig.Codec is Codec.VP9 or Codec.AV1 or Codec.VVC)
|
||||
{
|
||||
Configuration.AudioConfig.AudioSampleRate = 48000;
|
||||
}
|
||||
@@ -506,11 +508,13 @@ namespace ADOFAIRenderer.Core
|
||||
var fileName = startTime.ToString("yyyy-MM-dd HH-mm-ss") + ext;
|
||||
_currentOutPath = Path.Combine(MelonEnvironment.GameRootDirectory, "Render", fileName);
|
||||
|
||||
if (RenderContext.OutputPath != null) _currentOutPath = RenderContext.OutputPath;
|
||||
|
||||
FFmpegNativeEncoder? videoFFmpeg = null;
|
||||
try
|
||||
{
|
||||
var effectiveVideoFps = Math.Min(videoFPS, renderFPS);
|
||||
var codecId = GetAudioCodecId(ext);
|
||||
var codecId = AudioCodecMatch[Configuration.VideoConfig.Codec];
|
||||
var settings = new FFmpegNativeEncoder.EncoderSettings
|
||||
{
|
||||
Width = Configuration.RenderWidth,
|
||||
|
||||
Reference in new issue
Block a user