Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Is the Unity recorder really this broken?

Discussion in 'Audio & Video' started by msyoung2012, Oct 24, 2021.

  1. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    Anyone know why the audio is choppy/crackling in the Unity recorder? Been pretty disappointed with it as the quality has been abysmal so far - large files, unusable/missing audio, terrible lag.

    Link to an example recording:


    Have to think it's an error on my end as I doubt the Unity team would ship a feature this broken! You can see the quality settings here - the video it records is like ~18-20 fps (game runs at 60 in build and in editor).

    Screen_Shot_2021-10-23_at_6.45.53_PM.png

    The mp4 and webm file formats audio is comically sped up and then totally drops sometimes so I'm forced to use ProRes Quicktime which doesn't have that but still has some bad crackling.

    I'm running pretty strong hardware (macOS Big Sur 11.4, 2.3 GHz Quade Core Intel i5 w/8 GB mem, ssd, etc.) so seems like this is just a software issue.
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,105
    I've used the recorder not so long ago and it all worked fine. Maybe try to save the video file to a different disk
     
  3. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    745
    Were you able to hear your audio while recording? If so, I'd love to know how you did that.
     
  4. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    I did not hear any audio while recording except for maybe the first 1-2 seconds. I assume this meant the audio was outputting to a different source (the recorder?). However as you can see in the video the audio is captured, just badly mangled by the recorder.
     
  5. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    No luck, thanks for the suggestion though. The location the file is saved has no impact on what was written to it.
     
  6. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    745
    me too. could not hear audio, which I really needed. And the audio was messed up in one of my recordings, I am assuming because of the CPU load. But I actually asked the fellow who claimed it worked just fine... because afaik, the audio does not play for anyone while recording.
     
    msyoung2012 likes this.
  7. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,105
    when recording the game had no audio. you are right, I've forgot about this. I was mentioning that the video quality was fine (not great) and there was no lag.

    sorry about this, the audio part is important
     
  8. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    I know it is sort of a meme that the Unity folks always turn out half-finished and broken features that never get fixed before they go on to the next thing. Unfortunately, this looks like another bit of evidence in that column. I was really hoping it was not the case!
     
  9. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I would note an i5 with 8gb memory is a pretty low powered machine. Video encoding is a very computationally expensive operation. You would need a lot of spare CPU left over from the game to keep up. (Encoding is generally much more expensive than decoding at playback time.)

    Having said that, I also have problems with video quality on a 12 core i9 with 32gb of memory (and high end graphics card). I gave up on MP4 files because it tries to keep up real time, degrading video quality to keep up. (No audio, just the image quality was low.) Complex scenes (with wind etc) and it failed to keep up.

    I wonder if Unity needs to have another output file format that is more of a raw stream (no compression - AVI files I have seen used for this purpose) just so they can write it to disk fast. Then later use a separate tool to convert to a compressed video file format. Have you tried writing as an image sequence? It stresses the OS however (creating so many separate files - file creation can be slow - which is why AVI file raw streaming I think would work better - one file).

    I have no experience with audio (I don't record it).
     
  10. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    Have not tried the video sequence yet but will look into it later today. I guess my frustration is applications like Quicktime capture the screen with very high fidelity quite easily, just that it doesn't grab the audio. I was hoping the recorder would allow that.
     
  11. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Yes, I know what you mean. Most screen capture programs I think benefit from being a separate process (at the cost of not synchronizing exactly with the framerate of the program generating content), and frequently not writing out files that are compressed that efficiently. I assume the Unity implementation hooks into the frame generation code, making life harder for Unity - but guaranteeing synchronization with its internal framerate. That is why I was hoping writing an uncompressed video file might help it keep up... maybe!
     
  12. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Hi. On what platform are you recording and your Editor version. Also, could you share the video file created? It will help me understand where the issue is.
     
  13. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    Hi, the platform information is further up. Can you see that? If there's something missing let me know. And sure, I can send a file. How would you like me to send it?
     
  14. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    My bad, I didn't see the specs. Still, I would need your Editor version. I was not able to reproduce the issue on my side. My specs are macOS Big Sur 11.6, Editor 2021.1.9f1, and Unity Recorder 2.5.5. I used the same recording settings (1080p, 16:9, ProRes QuickTime, Apple ProRes 4444 XQ ap4x, HD Rec. 709). I don't think the issue is performance, but anyway, do you know what your average fps was during recording? I sent you a DM to share your video file in private.
     
  15. JoaCHIP

    JoaCHIP

    Joined:
    Nov 5, 2020
    Posts:
    8
    The set of codecs offered by Unity appears somewhat odd. I've had great results with this add-on (combined with the .wav recorder for audio):

    https://github.com/keijiro/FFmpegRecorder

    Only drawback is that you cannot hear the audio while playing.
     
  16. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    Is the audio recorded in the movie? That's a significant drawback.
     
  17. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    745
    Yes, but you cant hear it while recording.
     
  18. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    375
    M
    Maybe you play too much multiple sounds if you play too much at the same time it gives problems.Maybe you play music multiple times because of the some code
     
  19. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    That's not the case.
     
  20. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Thank you for sharing your files. Like we told you in DM for some reason, your files have 5 audio channels. Can you check in Project Settings > Audio > Default Speak Mode is set to Stereo and not Surround?
     
    Last edited: Feb 24, 2022
  21. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    Now I get this (somewhat comical) result. What could possibly explain the camera acting like this!?

    See still from the video and settings.
     

    Attached Files:

  22. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    It was fixed in 3.0.0-pre2. Update your Recorder to the latest (3.0.3), and it should work.
     
  23. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    I did that and it didn't work. I was able to resolve this by downgrading and then upgrading my Unity version. But now there is a new error - the audio does not play in the game view after I finish recording... permanently. The recorder breaks audio for the entire application.
     
    SenaJP likes this.
  24. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Can you check that mute audio is not enabled?
    upload_2022-3-15_10-33-48.png
     
  25. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    It's not enabled.
     
  26. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    And restarting Unity doesn't fix it? Does removing the recorder package fix the audio?
     
  27. msyoung2012

    msyoung2012

    Joined:
    Mar 20, 2014
    Posts:
    49
    I was able to get it working for a bit by upgrading and then downgrading my unity instance. But, now it doesn't work again ... because FMOD is not supported. So there's no way to record my game? I really wish this feature worked.
     
  28. Pinsukka

    Pinsukka

    Joined:
    Feb 17, 2014
    Posts:
    15
    For me, mp4 files are the only ones that work. QuickTime videos show nothing at all (and don't play audio either), WebM files show video but are sped up like crazy. Mp4 would be fine otherwise, but even when set at high quality I can see artifacts on 4K 60fps videos.

    I've tried this on multiple computers, operating systems and Unity versions — it's a broken mess with all of them. Come on Unity team, fix the recorder, it's terrible!