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
|
||||
private const int HEADER_SIZE = 44;
|
||||
private const short BITS_PER_SAMPLE = 16;
|
||||
private const int SAMPLE_RATE = 44100;
|
||||
public int SAMPLE_RATE = 48000;
|
||||
|
||||
//the video recorder
|
||||
public bool recorderBegin;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace FFmpegOut
|
|||
|
||||
public int bitRate;
|
||||
public string path;
|
||||
public bool dropping;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
@ -81,6 +82,7 @@ namespace FFmpegOut
|
|||
"time instability into output video. Decreasing the recording " +
|
||||
"frame rate is recommended."
|
||||
);
|
||||
dropping = true;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
public static class AppInfo {
|
||||
public const string Version = "1.0.11";
|
||||
public static readonly DateTime Date = new DateTime(2024, 02, 08, 04, 50, 47, 856, DateTimeKind.Utc);
|
||||
public const string Version = "1.0.13";
|
||||
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)
|
||||
{
|
||||
// I feel like I should standardize the names
|
||||
// I feel like I should standardize the names //hm maybe
|
||||
if (Conductor.instance.isPlaying)
|
||||
{
|
||||
SkillStarManager.instance.KillStar();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.IO;
|
|||
using HeavenStudio.Editor;
|
||||
using HeavenStudio;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using HeavenStudio.Common;
|
||||
|
||||
namespace FFmpegOut
|
||||
{
|
||||
|
|
@ -38,9 +39,23 @@ public class HeavenRecorderController : MonoBehaviour
|
|||
{
|
||||
StopRecording();
|
||||
}
|
||||
if(recorder.dropping)
|
||||
{
|
||||
StopRecording();
|
||||
dialog.LagOutError();
|
||||
recorder.dropping = false;
|
||||
}
|
||||
if(audioRenderer.recorderBegin && !recorder.enabled)
|
||||
{
|
||||
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;
|
||||
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.Dispose();
|
||||
_session = null;
|
||||
|
|
@ -120,6 +135,9 @@ public class HeavenRecorderController : MonoBehaviour
|
|||
|
||||
public void BeginRecording()
|
||||
{
|
||||
audioRenderer.SAMPLE_RATE = PersistentDataManager.gameSettings.sampleRate;
|
||||
recorder.width = PersistentDataManager.gameSettings.resolutionWidth;
|
||||
recorder.height = PersistentDataManager.gameSettings.resolutionHeight;
|
||||
dialog.RecordingIndicator(true);
|
||||
if(!recorder.enabled)
|
||||
{
|
||||
|
|
@ -136,13 +154,10 @@ public class HeavenRecorderController : MonoBehaviour
|
|||
print("recording started!");
|
||||
// recorder.enabled = true;
|
||||
exporting = true;
|
||||
timeline.PlaybackBeat = startBeatRecorder;
|
||||
Conductor.instance.SetBeat(startBeatRecorder);
|
||||
timeline.PlayCheck(false);
|
||||
}
|
||||
}
|
||||
|
||||
void StopRecording()
|
||||
public void StopRecording()
|
||||
{
|
||||
if(recorder.enabled && audioRenderer.Rendering)
|
||||
{
|
||||
|
|
@ -155,11 +170,16 @@ public class HeavenRecorderController : MonoBehaviour
|
|||
Merge();
|
||||
audioRenderer.Clear();
|
||||
}
|
||||
timeline.PlayCheck(false);
|
||||
timeline.PlaybackBeat = endBeatRecorder;
|
||||
Conductor.instance.SetBeat(prevStartBeat);
|
||||
timeline.PlaybackBeat = prevStartBeat;
|
||||
timeline.PlayCheck(true);
|
||||
// Conductor.instance.SetBeat(prevStartBeat);
|
||||
dialog.RecordingIndicator(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCamFPS(float fps)
|
||||
{
|
||||
recorder.frameRate = fps;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ public class HeavenRecorderDialog : Dialog
|
|||
[SerializeField]TextMeshProUGUI directoryText;
|
||||
[SerializeField]TextMeshProUGUI qualityNum;
|
||||
[SerializeField]TextMeshProUGUI beatNumError;
|
||||
[SerializeField]TextMeshProUGUI FPSError;
|
||||
[SerializeField]TextMeshProUGUI exportButtonText;
|
||||
[SerializeField]Slider qualitySlide;
|
||||
[SerializeField]TMP_InputField startBeat;
|
||||
[SerializeField]TMP_InputField endBeat;
|
||||
[SerializeField]TMP_InputField FPS;
|
||||
[SerializeField]Button exportButton;
|
||||
[SerializeField]Color exportButtonColorReady;
|
||||
|
||||
|
|
@ -37,7 +39,9 @@ public class HeavenRecorderDialog : Dialog
|
|||
void Start()
|
||||
{
|
||||
UpdateQualityNum();
|
||||
SetFPS();
|
||||
beatNumError.SetText("");
|
||||
FPSError.SetText("");
|
||||
}
|
||||
|
||||
string BeatError()
|
||||
|
|
@ -101,6 +105,11 @@ public class HeavenRecorderDialog : Dialog
|
|||
heavenRecorder.SetBitRate((int)qualitySlide.value);
|
||||
}
|
||||
|
||||
public void SetFPS()
|
||||
{
|
||||
heavenRecorder.SetCamFPS(float.Parse(FPS.text));
|
||||
}
|
||||
|
||||
void PreFlightCheckSendOff()
|
||||
{
|
||||
//check two bools and send off all of the beat data to heavenrecordercontroller
|
||||
|
|
@ -119,6 +128,7 @@ public class HeavenRecorderDialog : Dialog
|
|||
ExportUI.SetActive(false);
|
||||
RecordingUI.SetActive(true);
|
||||
exitButton.SetActive(false);
|
||||
FPSError.SetText("");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -127,5 +137,10 @@ public class HeavenRecorderDialog : Dialog
|
|||
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 Starpelly;
|
||||
using FFmpegOut;
|
||||
using Jukebox;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
|
|
@ -48,6 +49,8 @@ namespace HeavenStudio.Editor.Track
|
|||
public Vector2 RelativeMousePos => relativeMousePos;
|
||||
public float PlaybackBeat = 0.0f;
|
||||
|
||||
[SerializeField]HeavenRecorderController recorder;
|
||||
|
||||
public static float SnapInterval() { return instance.snapInterval; }
|
||||
|
||||
public void SetSnap(float snap) { snapInterval = snap; }
|
||||
|
|
@ -702,7 +705,7 @@ namespace HeavenStudio.Editor.Track
|
|||
{
|
||||
// isPaused = true;
|
||||
// timelineSlider.value = 0;
|
||||
|
||||
recorder.StopRecording();
|
||||
if (TimelineSongPosLine != null)
|
||||
Destroy(TimelineSongPosLine.gameObject);
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
|||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 1.0.11
|
||||
bundleVersion: 1.0.13
|
||||
preloadedAssets:
|
||||
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
||||
metroInputSource: 0
|
||||
|
|
@ -158,11 +158,11 @@ PlayerSettings:
|
|||
applicationIdentifier:
|
||||
Standalone: com.RHeavenStudio.Heaven-Studio
|
||||
buildNumber:
|
||||
Standalone: 100011
|
||||
Standalone: 100013
|
||||
iPhone: 0
|
||||
tvOS: 0
|
||||
overrideDefaultApplicationIdentifier: 0
|
||||
AndroidBundleVersionCode: 100011
|
||||
AndroidBundleVersionCode: 100013
|
||||
AndroidMinSdkVersion: 22
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue