Search Unity

Video Unity Recorder update

Discussion in 'Audio & Video' started by ans_unity, Dec 19, 2017.

Thread Status:
Not open for further replies.
  1. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    @Arycama, @webjeff
    We're trying to reproduce the issue on our side. Can you please share the settings you used for your recordings? Thanks
     
  2. webjeff

    webjeff

    Joined:
    Mar 11, 2015
    Posts:
    39
    Hi @chafik_unity

    I was able to reproduce the issue by doing this:

    1. Create new project in 2018.2.3f1
    2. Add Unity Recorder from Asset store
    3. Add Cinemachine from Package manager (Import step here)
    4. Hit record on the default scene and watch the frame rate issue.

    I noticed it wasn't an issue until I added Cinemachine into my project.

    Let me know if you can't reproduce this and I can send you my project.

    Thanks
    Jeff.
     
  3. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    @JRW_WSP, @v1nc3nt_3d, @ShizumaruRiya
    Regarding 360 View VS Linear color space, a fix is on its way.
    Meanwhile, in Camera360Input.cs, you can add this line at the beginning of
    void NewFrameReady(RecordingSession session) :
    Code (CSharp):
    1. GL.sRGBWrite = PlayerSettings.colorSpace == ColorSpace.Linear;
     
  4. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Thanks @webjeff,

    The issue is related to the capture audio setting. When this option is disabled the MovieRecorder still expect the audio to come in but this never happens and it kills performances.

    A fix is on its way but meanwhile you can patch MovieRecorder.cs by changing:

    Code (CSharp):
    1. audioAttrsList.Add(audioAttrs);
    With:

    Code (CSharp):
    1. if (audioInput.audioSettings.preserveAudio)
    2.     audioAttrsList.Add(audioAttrs);
    Hope this helps.
     
    Last edited: Aug 21, 2018
    led_bet likes this.
  5. pChandhok

    pChandhok

    Joined:
    Mar 6, 2018
    Posts:
    4
    Hi I am unable to record worldspace UI in 360 videos. Any fixes for that?
     
  6. webjeff

    webjeff

    Joined:
    Mar 11, 2015
    Posts:
    39
    Thank you! This worked for me!
     
    chafik_unity likes this.
  7. Johnni

    Johnni

    Joined:
    Feb 24, 2017
    Posts:
    1
    I really love the recorder and I have been wanting to use the Recorder for recording particle simulations, but I cannot get the recorder to record the alpha from particles. It works fine with 3d objects. Am I overlooking something ? Any chance you could fix that?
     
  8. SquidMonkey

    SquidMonkey

    Joined:
    Jan 27, 2017
    Posts:
    5
    I've download Recorder from the asset store but am getting this error when trying to open Tools>Recorder>Video

    Parent directory must exist before creating asset at Assets/Unity/Sol/Assets/Unity Technologies/Recorder/RecorderWindowSettings.asset.

    AddAssetToSameFile failed because the other asset is not persistent

    Any suggestions?
     
  9. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Were there any updates on the recorder completely choking after getting around 2 seconds of MP4 clip saved? This makes our work excruciatingly slow, and there hasn't been any clarification or fix for this for a very long time - not on GitHub, not in the package manager, and not in the Asset Store.
     
  10. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Hi @SquidMonkey.
    This error is related to the old version of the Recorder. Make sure to use Unity 2018.1.9f1 or up.
    If it's already the case, make sure to delete the Assets/Unity Technologies/Recorder before getting the new version.
    Thanks
     
  11. ChrisDirkis

    ChrisDirkis

    Joined:
    Jun 1, 2017
    Posts:
    38
    Out of curiosity, is there a reason why the Recorder went from open to closed source? My immediate guess would be private/proprietary plugins/codecs, but if it's something else I'd be interested to know.
     
    fherbst likes this.
  12. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
  13. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Hi @Johnni,
    We're not able to reproduce the issue on our side. Could you please report a bug with repro steps? it would be very appreciated!
     
  14. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Yes, a fix is on its way but you can temporarily patch-it yourself by following the steps described in a previous post:

     
  15. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Hi, not sure why it's not working...
    Could you please report a bug? thanks a lot for your help!
     
  16. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Thanks, this works!
     
    chafik_unity likes this.
  17. MikeGardiner

    MikeGardiner

    Joined:
    Dec 8, 2016
    Posts:
    4
    Hi Unity, the recorder is awesome, however i've noticed an issue when saving as 8k frames - every so often, a random frame will glitch during the rendering. It only happens with 8k frames - 5k frames, or 4k frames / .mp4 don't exhibit the same behaviour.

    The glitch is kinda strange, like a series of concentric coloured circles - I've attached a cropped image to show this.
     

    Attached Files:

  18. SquidMonkey

    SquidMonkey

    Joined:
    Jan 27, 2017
    Posts:
    5
    Bugger,

    My project is running 2017.4. I don't want to risk the migration. The asset store states that RECORDER supports 2017.1 and higher :(

    Is there no other way around this?
     
    Last edited: Sep 4, 2018
  19. jeffsarge

    jeffsarge

    Joined:
    Jan 3, 2014
    Posts:
    32
    I'm running version 1.0.2 of the Unity Recorder with 2018.2.7 Unity on WIndows 10. I can record mp4 no problem, but when I try and record frames (jpeg, png, exr) I just get black frames.
    Any ideas?
    Thanks,
    Jeff
     
  20. jeffsarge

    jeffsarge

    Joined:
    Jan 3, 2014
    Posts:
    32
    update... I was able to render correctly to files as long as I had Game View selected in the capture field. I previously had targeted camera / Main camera selected and that did not work. Not sure why.
    Jeff
     
  21. FEERtheGame

    FEERtheGame

    Joined:
    Apr 12, 2018
    Posts:
    7
    As we design a hybrid audio game, we could need that recorded sound is hearable during play in editor.
    As soon as i hit the record button sound is routed to recording and not hearable any more.
    best
    Hansjörg
     
  22. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    304
    I have a question about using the recorder on Windows 7. I'm trying to record a 4K mp4, and I'm having the same problem that was outlined in this thread: https://forum.unity.com/threads/video-decoding-windowsvideomedia-error-0xc00d36b4.456960/

    Apparently, the built-in H.264 decoder in Win7 doesn't support anything above 1080p. Is it possible to work around this by installing a different codec, or is the issue internal to the OS and basically can't be fixed? Even if I did install a codec, I'm not sure how to tell Unity to use that one instead of the built-in one.
     
  23. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Is there any way to make pull requests to the "new" Recorder living in the AssetStore? There are still bugs + improvements to be made, I'd be willing to do so myself and create a Pull Request, but couldn't find a repository.

    Feature Request: to clarify, simple stuff like adding some more useful wildcards that are properly sorted in any file browser (e.g. "Timestamp", aka DateTime.Now.ToString("yyyyMMdd-HHmmss"), would certainly be community-contributable...

    Feature Request 2: Would be great if capturing single images didn't require Play Mode to be active.

    Bug Report 1: recording single frames from code only works a single time and throws an exception while doing so. Play Mode needs to be restarted afterwards. The example is unhelpful since it's recording a sequence.

    After some more testing:
    controllerSettings.SetRecordModeToSingleFrame(0); is buggy. What does work (but freezes the image for far longer than a single frame) is controllerSettings.SetRecordModeToSingleFrame(1);

    Bug Report 2: StopRecording has to be called even if the recording has already stopped automatically (due to single-frame recording), resulting in really weird code necessary to not get any exceptions:

    Code (CSharp):
    1. public void MakeScreenshot()
    2. {
    3.     imageRecorder.outputFile = mediaOutputFolder + "/screenshot_" + GetTimestamp();
    4.     recorderController.StartRecording();
    5.     StartCoroutine(_StopRecording());
    6. }
    7.  
    8. IEnumerator _StopRecording()
    9. {
    10.     // note that we need to wait until the recording is done before stopping it. Weird!
    11.     // without this coroutine, the next call to "MakeScreenshot" causes an exception.
    12.     while (recorderController.IsRecording())
    13.         yield return null;
    14.     recorderController.StopRecording();
    15. }
    Improvement Request: Saving a Preset for single-frame recording shows a yellow exclamation mark with "Invalid frame rate" in the Inspector.
     
    Last edited: Sep 11, 2018
  24. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    @fherbst
    That's very valuable feedback! thanks a lot for this.

    Unfortunately there's currently no way to open a PR for the Recorder. The reason behind it is that the packages are managed in internal gitlab repos that are not ready to be open to the public. The Recorder is not a package yet but the switch is going to happen at some point in the near future.
     
  25. KBossler

    KBossler

    Joined:
    Mar 8, 2017
    Posts:
    6
    I just downloaded this and set up a bunch of gif and image sequence recordings in Timeline. When I play the scene two unfortunate things happen. First everything but the UI background and particle systems turn white (see attached image) in the image sequences. Second the GIF sequeneces don't export at all. I do get DLLNotFoundException: fccore on every frame when it tries to record a GIF. Any thoughts as to what is going on?

    I am running Unity 2018.2.6f1 on mac. Promo_3Dinos.png
     
  26. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Hi, try to delete the Recorder (by deleting Assets/Unity Recorder) and reinstall it from the Asset Store.
    Hope this helps.
     
  27. KBossler

    KBossler

    Joined:
    Mar 8, 2017
    Posts:
    6
    Nope that didn't work. I deleted Assets/Unity Recorder, removed all the recorder clips from the Timeline, re-imported the unity package from the asset store, set up one GIF recorder and still get the same error.

    The image sequence export now works. I also tested an MP4 movie and that works as well. I only get the error with the GIF recorder. I tried a few different settings for the GIF recorder (active vs main camera, output resolutions, max tasks) and none made a difference.

    For now I can do a work around where I make MP4's and then use another program to turn them into GIFs. But I'd like to know how to get this working for future projects. Below are the full read outs of the errors I get.

    On every frame of recording:
    DllNotFoundException: fccore
    UnityEditor.Recorder.GIFRecorder.RecordFrame (UnityEditor.Recorder.RecordingSession session) (at Assets/Unity Recorder/Editor/Sources/Recorders/GIFRecorder/GIFRecorder.cs:41)
    UnityEditor.Recorder.RecordingSession.RecordFrame () (at Assets/Unity Recorder/Editor/Sources/RecordingSession.cs:129)

    At the end of the recording clip:
    DllNotFoundException: fccore
    UnityEditor.Recorder.FrameCapturer.fcAPI+fcGifContext.Release () (at Assets/Unity Recorder/Editor/Sources/Recorders/_Legacy/FrameCapturer/Scripts/Encoder/fcAPI.cs:253)
    UnityEditor.Recorder.GIFRecorder.EndRecording (UnityEditor.Recorder.RecordingSession session) (at Assets/Unity Recorder/Editor/Sources/Recorders/GIFRecorder/GIFRecorder.cs:23)
    UnityEditor.Recorder.RecordingSession.EndRecording () (at Assets/Unity Recorder/Editor/Sources/RecordingSession.cs:114)
    UnityEditor.Recorder.Timeline.RecorderPlayableBehaviour:OnBehaviourPause(Playable, FrameData)
     
  28. LostPhilosopher

    LostPhilosopher

    Joined:
    Feb 25, 2018
    Posts:
    23
    Test.jpg Blacnk.jpg
    Hello,Im try to capture the particles effects as image sequence with alpha ON but I'm getting output blank. For making sure that Im getting black o/p I have also added a capsule and attached the screen Shots.
    I have tested with multiple setting with Targeted Camera and main camera source and Capture modes including Targeted Capture ,360 capture and texture sampling. I'm using 2018.2.0f2(64bit).

    If Im missing something please tell me. If this is not included in the feature of 'Unity recorder' please tell me.
    Also there are no tutorials available in English.

    Edit: My mistake the verson I tested on was 2018.2.0f2(64bit) .
     
    Last edited: Sep 17, 2018
  29. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    I am on 2017.4 (as I presume a huge amount of people are, given that this is your only LTS release and 2018 is still not ready for production work).

    How do I download version 0.2? The current version on the Asset Store requires 2018.1. and up.

    Why doesn't the Asset Store allow older versions of assets to be downloaded?
     
  30. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    When I re-downloaded last week, it did give me 0.2, I am using 2017 as well.
    Have you tried downloading, it may choose which one you can use so if you are on 2017, it downloads the correct one.
     
  31. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    If you use the Asset Store from 2017.4 you should automatically download the correct version (which in this case is 0.2.0). If you still get the newer version then you need to clear the Asset Store cache by deleting "C:\Users\<USER>\AppData\Roaming\Unity\Asset Store-5.x\Unity Technologies\Unity Essentials\Unity Recorder.unitypackage". It's actually a bug in how the Asset Store works when using multiple version of Unity.

    Hope this helps!
     
  32. chafik_unity

    chafik_unity

    Unity Technologies

    Joined:
    Jun 27, 2017
    Posts:
    56
    Thanks for bringing this up! this seems like a bug, We're investigating what might be the root cause of the issue.

    Edit
    Actually it's not a bug. The issue here is that the shader used by the particle material is composing the transparency using its color and don't affect the final alpha value.

    Workaround: Use a material with a shader that changes the alpha value like the Standard (transparent) or Unlit/Transparent. That should solve the problem.
     
    Last edited: Sep 18, 2018
  33. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Yes I was given the new version automatically I also worked out that I can just set a custom resolution in my game window, and then record the window in Unity Recorded (I was trying to record a 21:9 ultrawidescreen image, which Unity Recorded did not have as an option for aspect ratio).
     
  34. robinspots

    robinspots

    Joined:
    May 10, 2018
    Posts:
    13
    Unity Recorder is producing some very bad quality videos when using the 360 option:


    You can see an example of the output here:


    Does anyone have any pointers on how to improve quality?
     
  35. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    I'm having bad quality output in 2D 1080p, not sure why. I've used it in the past and had great video and sound. Now I'm getting poor video and only some sound.
    Not sure why. You are not alone...
     
  36. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322
    @chafik_unity et all,
    I'm using the Unity Recorder and it's quite fabulous. One thing I'm wondering is whether there's an API/scripting manual page somewhere so I can hook this into an app and use it outside the editor, say in a live android app?
    Thanks for pointing me in the right direction.
     
  37. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322
  38. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322
    @chafik_unity In other news, I have the settings for the Unity Recorder as shown in the screenshot attached, and it works wonderfully for capturing a single frame, rendered to a rendertexture, but it's flipped vertically. The documentation seems to indicate there should be a "flipped image" button to flip the final image saved, but I think that "Video">UTJ>LEgacy>OpenEXR doesn't have the flip option, while the other options do have it.
    Is there any way to get it added ? Would save me a bunch 'o time and brain power...
     

    Attached Files:

  39. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Is there a way to force recording to stop automatically after a time period or frame count?
    I’m trying to make a video of a cutscene and need it to end with the music.
     
  40. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322
    @dsilverthorn While recording in video mode, I use the "Bounds/Limit" area at the bottom of settings, and choose Mode: Single Frame, (and there's more options) to limit how much is recorded, then it stops automatically. (When used in these steps: Click Play within Editor, Click Record on the Recorder window/tab, it records, and stops automatically, (However the Play mode is stopped as well, just an fyi.)
    Keep on Creating!
     
    dsilverthorn likes this.
  41. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    I'll give that a try.

    Thanks for the tip!
     
  42. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Worked like a charm! I gave it a try and it was perfect!

    Thanks again!!!:)
     
  43. postwendend

    postwendend

    Joined:
    Jun 30, 2017
    Posts:
    1
    Hey, i just hacked a SaveBytesThreaded Thread for the Recorder, it increase the write speed drastic

    add this to ImageRecorder.cs inside the namespace bracets:

    Code (CSharp):
    1.  
    2. class SaveBytesThreaded
    3.     {
    4.      
    5.         public byte[] bytes { get; set; }
    6.         public string path { get; set; }
    7.      
    8.  
    9.         public void StartThread()
    10.         {
    11.             new Thread(SaveBytes).Start();
    12.         }
    13.  
    14.         void SaveBytes()
    15.         {
    16.             File.WriteAllBytes(path, bytes);        
    17.         }
    18.     }
    19.  
    And modify the File.Write in the RecordFrame function to this:

    Code (CSharp):
    1.  
    2. SaveBytesThreaded sbt = new SaveBytesThreaded();
    3. sbt.bytes = bytes;
    4. sbt.path = path;
    5. sbt.StartThread();
    6.  
    Also add on top:
    Code (CSharp):
    1. using System.Threading;
     
    codegasm and dsilverthorn like this.
  44. psypol

    psypol

    Joined:
    Dec 20, 2013
    Posts:
    25
    hi all.

    Do any of you also experience a LOSS OF PARAMS on the recorder ?
    i set some params on recorderClip, i save the scene and project..

    then if at some point i do "mute track" all the settings set for later are lost.
    is this a bug ?
     
  45. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Hi

    i got some sound in record look stop ?


    and possible to know video.url.length ?
     
  46. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    i have try add

    if (audioInput.audioSettings.preserveAudio)

    but sound it's not played so the Visualizer Studio can't make the job in backround
     
  47. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    Is there a way to set the sample rate of the recorded audio? The system sample rate in the audio manager doesn't have any influence on that.. any ideas?
     
  48. AtahanTugraKiltan

    AtahanTugraKiltan

    Joined:
    Nov 2, 2012
    Posts:
    6
    I tried the OpenEXR Image Sequence Recorder and while it works great, I have a question.
    I set my Colorspace to Linear and my Camera has HDR enabled, I am using a Rendertexture to render, with its format set to ARGB Float, which in my head should allow for HDR values (>1) however when I look at my frames in my Editing Software, all colors are clamped at 1 (see attached image).

    Am I missing something?
     

    Attached Files:

  49. Tiny-Ninja

    Tiny-Ninja

    Joined:
    Oct 1, 2018
    Posts:
    3
    Play mode becomes incredibly slow when I start a video recorder with 1080p resolution. The game is so slow (about half speed) that I am unable to record a realistic gameplay. 720p also slows down play mode (about 1.5 second is required to progress 1 second in game). Only lower resolutions (480p and lower) don't impact game speed too significantly.

    Does everyone experience this or is it just me?

    Because of that issue, recording a standalone build with OBS at 1080p appears to be a better alternative than Unity Recorder.
     
    Last edited: Oct 1, 2018
  50. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    I get the same thing. So I only record cut scenes since mine records only about a frame a second.
     
    Tiny-Ninja likes this.
Thread Status:
Not open for further replies.