release 1.1 (/srs)
* Fixed bug where video would not export to directory * Fixed bug where recording would not end on the "End Remix" block * Fixed a bug where the SampleRate would not match the user's set SampleRate * Fixed a bug where the resolution would not match the user's set resolution * Added a feature when exporting to select the recording FPS * Added framedrop detection that exits out of the recording when there are significant lag spikes
This commit is contained in:
parent
2164d055a9
commit
27e83116ef
|
|
@ -9,7 +9,7 @@ public class AudioRenderer : MonoBehaviour
|
||||||
// constants for the wave file header
|
// constants for the wave file header
|
||||||
private const int HEADER_SIZE = 44;
|
private const int HEADER_SIZE = 44;
|
||||||
private const short BITS_PER_SAMPLE = 16;
|
private const short BITS_PER_SAMPLE = 16;
|
||||||
private const int SAMPLE_RATE = 44100;
|
public int SAMPLE_RATE = 48000;
|
||||||
|
|
||||||
//the video recorder
|
//the video recorder
|
||||||
public bool recorderBegin;
|
public bool recorderBegin;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ namespace FFmpegOut
|
||||||
|
|
||||||
public int bitRate;
|
public int bitRate;
|
||||||
public string path;
|
public string path;
|
||||||
|
public bool dropping;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -81,6 +82,7 @@ namespace FFmpegOut
|
||||||
"time instability into output video. Decreasing the recording " +
|
"time instability into output video. Decreasing the recording " +
|
||||||
"frame rate is recommended."
|
"frame rate is recommended."
|
||||||
);
|
);
|
||||||
|
dropping = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
public static class AppInfo {
|
public static class AppInfo {
|
||||||
public const string Version = "1.0.11";
|
public const string Version = "1.0.13";
|
||||||
public static readonly DateTime Date = new DateTime(2024, 02, 08, 04, 50, 47, 856, DateTimeKind.Utc);
|
public static readonly DateTime Date = new DateTime(2024, 02, 08, 06, 00, 58, 712, DateTimeKind.Utc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -765,7 +765,7 @@ namespace HeavenStudio
|
||||||
|
|
||||||
public void Stop(double beat, bool restart = false, float restartDelay = 0f)
|
public void Stop(double beat, bool restart = false, float restartDelay = 0f)
|
||||||
{
|
{
|
||||||
// I feel like I should standardize the names
|
// I feel like I should standardize the names //hm maybe
|
||||||
if (Conductor.instance.isPlaying)
|
if (Conductor.instance.isPlaying)
|
||||||
{
|
{
|
||||||
SkillStarManager.instance.KillStar();
|
SkillStarManager.instance.KillStar();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using System.IO;
|
||||||
using HeavenStudio.Editor;
|
using HeavenStudio.Editor;
|
||||||
using HeavenStudio;
|
using HeavenStudio;
|
||||||
using HeavenStudio.Editor.Track;
|
using HeavenStudio.Editor.Track;
|
||||||
|
using HeavenStudio.Common;
|
||||||
|
|
||||||
namespace FFmpegOut
|
namespace FFmpegOut
|
||||||
{
|
{
|
||||||
|
|
@ -38,9 +39,23 @@ public class HeavenRecorderController : MonoBehaviour
|
||||||
{
|
{
|
||||||
StopRecording();
|
StopRecording();
|
||||||
}
|
}
|
||||||
|
if(recorder.dropping)
|
||||||
|
{
|
||||||
|
StopRecording();
|
||||||
|
dialog.LagOutError();
|
||||||
|
recorder.dropping = false;
|
||||||
|
}
|
||||||
if(audioRenderer.recorderBegin && !recorder.enabled)
|
if(audioRenderer.recorderBegin && !recorder.enabled)
|
||||||
{
|
{
|
||||||
recorder.enabled = true;
|
recorder.enabled = true;
|
||||||
|
timeline.PlaybackBeat = startBeatRecorder;
|
||||||
|
// Conductor.instance.SetBeat(startBeatRecorder);
|
||||||
|
timeline.PlayCheck(true);
|
||||||
|
}
|
||||||
|
if(Input.GetKeyDown(KeyCode.L))
|
||||||
|
{
|
||||||
|
//to simulate lag
|
||||||
|
Application.targetFrameRate = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,7 +63,7 @@ public class HeavenRecorderController : MonoBehaviour
|
||||||
{
|
{
|
||||||
exporting = false;
|
exporting = false;
|
||||||
FFmpegSession _session;
|
FFmpegSession _session;
|
||||||
_session = FFmpegSession.CreateWithArguments("-y -i "+ pathHeavenRecorder + "temp.mp4 -i "+ pathHeavenRecorder + "temp.wav -c:v copy -c:a aac " + actualDirectory);
|
_session = FFmpegSession.CreateWithArguments("-y -i "+ "\"" + pathHeavenRecorder + "\"" + "temp.mp4 -i " + "\"" + pathHeavenRecorder + "\"" + "temp.wav -c:v copy -c:a aac " + "\"" + actualDirectory + "\"");
|
||||||
_session.Close();
|
_session.Close();
|
||||||
_session.Dispose();
|
_session.Dispose();
|
||||||
_session = null;
|
_session = null;
|
||||||
|
|
@ -120,6 +135,9 @@ public class HeavenRecorderController : MonoBehaviour
|
||||||
|
|
||||||
public void BeginRecording()
|
public void BeginRecording()
|
||||||
{
|
{
|
||||||
|
audioRenderer.SAMPLE_RATE = PersistentDataManager.gameSettings.sampleRate;
|
||||||
|
recorder.width = PersistentDataManager.gameSettings.resolutionWidth;
|
||||||
|
recorder.height = PersistentDataManager.gameSettings.resolutionHeight;
|
||||||
dialog.RecordingIndicator(true);
|
dialog.RecordingIndicator(true);
|
||||||
if(!recorder.enabled)
|
if(!recorder.enabled)
|
||||||
{
|
{
|
||||||
|
|
@ -136,13 +154,10 @@ public class HeavenRecorderController : MonoBehaviour
|
||||||
print("recording started!");
|
print("recording started!");
|
||||||
// recorder.enabled = true;
|
// recorder.enabled = true;
|
||||||
exporting = true;
|
exporting = true;
|
||||||
timeline.PlaybackBeat = startBeatRecorder;
|
|
||||||
Conductor.instance.SetBeat(startBeatRecorder);
|
|
||||||
timeline.PlayCheck(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopRecording()
|
public void StopRecording()
|
||||||
{
|
{
|
||||||
if(recorder.enabled && audioRenderer.Rendering)
|
if(recorder.enabled && audioRenderer.Rendering)
|
||||||
{
|
{
|
||||||
|
|
@ -155,11 +170,16 @@ public class HeavenRecorderController : MonoBehaviour
|
||||||
Merge();
|
Merge();
|
||||||
audioRenderer.Clear();
|
audioRenderer.Clear();
|
||||||
}
|
}
|
||||||
timeline.PlayCheck(false);
|
timeline.PlaybackBeat = prevStartBeat;
|
||||||
timeline.PlaybackBeat = endBeatRecorder;
|
timeline.PlayCheck(true);
|
||||||
Conductor.instance.SetBeat(prevStartBeat);
|
// Conductor.instance.SetBeat(prevStartBeat);
|
||||||
dialog.RecordingIndicator(false);
|
dialog.RecordingIndicator(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetCamFPS(float fps)
|
||||||
|
{
|
||||||
|
recorder.frameRate = fps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,12 @@ public class HeavenRecorderDialog : Dialog
|
||||||
[SerializeField]TextMeshProUGUI directoryText;
|
[SerializeField]TextMeshProUGUI directoryText;
|
||||||
[SerializeField]TextMeshProUGUI qualityNum;
|
[SerializeField]TextMeshProUGUI qualityNum;
|
||||||
[SerializeField]TextMeshProUGUI beatNumError;
|
[SerializeField]TextMeshProUGUI beatNumError;
|
||||||
|
[SerializeField]TextMeshProUGUI FPSError;
|
||||||
[SerializeField]TextMeshProUGUI exportButtonText;
|
[SerializeField]TextMeshProUGUI exportButtonText;
|
||||||
[SerializeField]Slider qualitySlide;
|
[SerializeField]Slider qualitySlide;
|
||||||
[SerializeField]TMP_InputField startBeat;
|
[SerializeField]TMP_InputField startBeat;
|
||||||
[SerializeField]TMP_InputField endBeat;
|
[SerializeField]TMP_InputField endBeat;
|
||||||
|
[SerializeField]TMP_InputField FPS;
|
||||||
[SerializeField]Button exportButton;
|
[SerializeField]Button exportButton;
|
||||||
[SerializeField]Color exportButtonColorReady;
|
[SerializeField]Color exportButtonColorReady;
|
||||||
|
|
||||||
|
|
@ -37,7 +39,9 @@ public class HeavenRecorderDialog : Dialog
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
UpdateQualityNum();
|
UpdateQualityNum();
|
||||||
|
SetFPS();
|
||||||
beatNumError.SetText("");
|
beatNumError.SetText("");
|
||||||
|
FPSError.SetText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
string BeatError()
|
string BeatError()
|
||||||
|
|
@ -101,6 +105,11 @@ public class HeavenRecorderDialog : Dialog
|
||||||
heavenRecorder.SetBitRate((int)qualitySlide.value);
|
heavenRecorder.SetBitRate((int)qualitySlide.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFPS()
|
||||||
|
{
|
||||||
|
heavenRecorder.SetCamFPS(float.Parse(FPS.text));
|
||||||
|
}
|
||||||
|
|
||||||
void PreFlightCheckSendOff()
|
void PreFlightCheckSendOff()
|
||||||
{
|
{
|
||||||
//check two bools and send off all of the beat data to heavenrecordercontroller
|
//check two bools and send off all of the beat data to heavenrecordercontroller
|
||||||
|
|
@ -119,6 +128,7 @@ public class HeavenRecorderDialog : Dialog
|
||||||
ExportUI.SetActive(false);
|
ExportUI.SetActive(false);
|
||||||
RecordingUI.SetActive(true);
|
RecordingUI.SetActive(true);
|
||||||
exitButton.SetActive(false);
|
exitButton.SetActive(false);
|
||||||
|
FPSError.SetText("");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -127,5 +137,10 @@ public class HeavenRecorderDialog : Dialog
|
||||||
exitButton.SetActive(true);
|
exitButton.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LagOutError()
|
||||||
|
{
|
||||||
|
FPSError.SetText("LAG OUT ERROR: Set your FPS Lower!! (have mercy on your PC...)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using UnityEngine.EventSystems;
|
||||||
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using Starpelly;
|
using Starpelly;
|
||||||
|
using FFmpegOut;
|
||||||
using Jukebox;
|
using Jukebox;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -48,6 +49,8 @@ namespace HeavenStudio.Editor.Track
|
||||||
public Vector2 RelativeMousePos => relativeMousePos;
|
public Vector2 RelativeMousePos => relativeMousePos;
|
||||||
public float PlaybackBeat = 0.0f;
|
public float PlaybackBeat = 0.0f;
|
||||||
|
|
||||||
|
[SerializeField]HeavenRecorderController recorder;
|
||||||
|
|
||||||
public static float SnapInterval() { return instance.snapInterval; }
|
public static float SnapInterval() { return instance.snapInterval; }
|
||||||
|
|
||||||
public void SetSnap(float snap) { snapInterval = snap; }
|
public void SetSnap(float snap) { snapInterval = snap; }
|
||||||
|
|
@ -702,7 +705,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
{
|
{
|
||||||
// isPaused = true;
|
// isPaused = true;
|
||||||
// timelineSlider.value = 0;
|
// timelineSlider.value = 0;
|
||||||
|
recorder.StopRecording();
|
||||||
if (TimelineSongPosLine != null)
|
if (TimelineSongPosLine != null)
|
||||||
Destroy(TimelineSongPosLine.gameObject);
|
Destroy(TimelineSongPosLine.gameObject);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 1.0.11
|
bundleVersion: 1.0.13
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
|
|
@ -158,11 +158,11 @@ PlayerSettings:
|
||||||
applicationIdentifier:
|
applicationIdentifier:
|
||||||
Standalone: com.RHeavenStudio.Heaven-Studio
|
Standalone: com.RHeavenStudio.Heaven-Studio
|
||||||
buildNumber:
|
buildNumber:
|
||||||
Standalone: 100011
|
Standalone: 100013
|
||||||
iPhone: 0
|
iPhone: 0
|
||||||
tvOS: 0
|
tvOS: 0
|
||||||
overrideDefaultApplicationIdentifier: 0
|
overrideDefaultApplicationIdentifier: 0
|
||||||
AndroidBundleVersionCode: 100011
|
AndroidBundleVersionCode: 100013
|
||||||
AndroidMinSdkVersion: 22
|
AndroidMinSdkVersion: 22
|
||||||
AndroidTargetSdkVersion: 0
|
AndroidTargetSdkVersion: 0
|
||||||
AndroidPreferredInstallLocation: 1
|
AndroidPreferredInstallLocation: 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue