- Home /
Record the entire level and save that video in Desktop/Gallery of PC/Android [In-Game]
Hi all,
I need to Record my Game (with Play/Pause/Stop buttons) and then save it (the video) in my Gallery/Desktop.
I did found the video capture plugin - https://assetstore.unity.com/packages/tools/video/video-capture-75653. But it is not recording Legacy UI elements somehow and it is for Desktop only.
I need some approach/solution to this.
Thanks in Advance,
Sumit
Answer by logicandchaos · Feb 04, 2020 at 04:02 PM
You can use other programs too like OBS or FRAPS to record your game footage. I recommend OBS.
Answer by kbartek · Feb 04, 2020 at 10:15 PM
If you need to record your game from the editor to the highest resolution and framerate possible, you can use the Unity Recorder, that is available in the Package Manager. Just search for "Unity Recorder" and click Install, then select Window > General > Recorder > Recorder Window, set your output resolution and framerate, then select the path to the file, and Unity will record everything that is happening. If your FPS drops during the recording, don't worry, because it the drop won't be present in the resulting recording.
If you need to record your game from the player (when it has already been built to an APK/EXE/whatever and is not running under the Unity Editor), then you can try saving everything that is being rendered by using the OnRenderImage
method, then append that image to an MP4 file using FFmpeg. This has already been done for you: https://github.com/keijiro/FFmpegOut You can still attempt to make your own recorder, you just need to find an FFmpeg port to Unity, and you would be good to go.
Please note that FFmpeg is licenced under GPL/LGPL!
Thank you, And Yes, I need to implement the latter one. In my game I need Play, Pause and Stop buttons which records my game and when pressed stopped it asks where to save the video file (or I could pre-define this in Editor).
I'm testing/checking the link you provided.
Your answer
Follow this Question
Related Questions
How to record video from the screen on android and save it to gallery? 1 Answer
Camera Recording for Unity 3D 0 Answers
Record video on iPhone or Android? 6 Answers
How to record from standalone app built for windows10 automatically? 1 Answer
Can Hanheld.PlayFullScreenMovie run concurrently with other process? 0 Answers