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

Recording video with VideoCapture AudioState.None blocks voice commands after recording is finished

Discussion in 'VR' started by crowbf, Jan 16, 2017.

  1. crowbf

    crowbf

    Joined:
    Aug 10, 2013
    Posts:
    3
    I've been using the information here:
    https://developer.microsoft.com/en-us/windows/holographic/locatable_camera_in_unity
    To capture images and video from the HoloLens.

    All is working great apart from if I capture video using the option AudioState.None when calling StartVideoModeAsync (which is the AudioState used in the example given). We put StopVideoModeAsync and all the clean up and disposing of the video resources on the selection of a UI object which then meant we got an mp4 video saved out to the data path as expected. However at this point voice commands on the HoloLens in our app, all other other apps and also in the main menu (Cortana) etc. all stopped working even after our video recording had been cleanly stopped and our app exited. Even a re-boot wouldn't enable voice, only a full reset from the Hololens settings menu thus setting the HoloLens up from scratch resolved it.

    Recording with AudioState.MicAudio doesn't show this behaviour and all voice commands carry on working in the app (even during a recording) and on the main menu etc. as expected.

    Is there a way to get the microphone and voice commands etc. enabled again after capturing a video with AudioState.None? Is there some extra code needed after stopping the recording to re-enable the mic?

    In the future it would be ideal if you could record a video with AudioState.None and still have voice commands work even during the recording, this should be possible by leaving the microphone active while writing a blank audio stream to the movie (and is really what I would think is the expected behaviour). As an initial step I'll take being able to re-activate the microphone on stopping recording as I ask above.
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Thank you for bringing this issue to our attention, I was able to reproduce the issue and have filed a bug for the team to follow up on.
     
  3. crowbf

    crowbf

    Joined:
    Aug 10, 2013
    Posts:
    3
    Thanks for your reply Unity_Wesley.

    Is there a place where I can keep an eye on that bug and the resolution of it or will you check back in here with more info when it is fixed?
     
  4. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    I can keep an eye on the bug then touch base back here in the forum when its fixed. I will see if I can get a public link to the issue.
     
  5. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    This is fixed as far as we can get it (in the sense we are guarding for the user best we can), the root of the issue resides in the Microsoft OS for the Hololens. As long as you stop the capture mode, and clean up the capture objects. You should be fine.

    Warning:
    I haven't heard any news of a fix on Microsoft's side, so if you crash in the app or not properly clean up and dispose you will hit the bug.
     
  6. crowbf

    crowbf

    Joined:
    Aug 10, 2013
    Posts:
    3
    Thank you for the reply Wesley, it is appreciated. I might follow up with Microsoft and see if there is anything they can do on their side too, seems a bit harsh that this puts the Hololens in a state that requires a full re-install if anything goes wrong / interrupts the cleanup.