Search Unity

Everyplay not capturing Microphone input

Discussion in 'Unity Everyplay' started by nhaidar, Jun 9, 2017.

  1. nhaidar

    nhaidar

    Joined:
    Jun 5, 2017
    Posts:
    3
    Hello,

    I'm trying to use Everyplay to record gameplay and microphone input, my project requires user microphone input to play.
    I followed the guide to use the facecam and make it audio only, however I still cannot capture microphone audio in the videos, when editing the video afterwards I can add a microphone commentary, so I'm assuming if that can work there it should be possible to make it work when recording. Might be worth noting that even when I try to use the facecam visibly, it doesn't appear on the game screen, yet still works in post video editing...

    I am calling Everyplay.FaceCamStartSession() before Everyplay.StartRecording() and also making sure the permissions for the facecam and microphone are granted (which they are)

    I also would like to know if it's possible to visually customize the share modal, I'd like it to fit the theme of my project, maybe not have the whole Everyplay branding on it, and if possible I would like the sharing options to be native, as in when a user selects a media file in their phones and can choose to share it through their native sharing modal which gives them more sharing options.

    I'm testing on Android and using Unity 5.6, thank you for your support
     
  2. nhaidar

    nhaidar

    Joined:
    Jun 5, 2017
    Posts:
    3
    Just a quick update,

    I've actually managed to get the facecam and microphone to work, but I had to disable the microphone input capture as well as the backfacing cam input, my project uses the devices backfacing camera and microphone, once I disabled this the facecam worked, this is both good and bad. I need to use the backfacing camera as a render texture and I need to capture the db microphone levels, is this possible with Everyplay?
     
  3. nhaidar

    nhaidar

    Joined:
    Jun 5, 2017
    Posts:
    3
    Second update,

    When trying to capture the audio levels through Everyplay, I get this error in the adb console:
    java.lang.NoSuchMethodError: no non-static method with name='faceCamAudioPowerLevel'
     
  4. kkbspod

    kkbspod

    Joined:
    Jun 13, 2017
    Posts:
    2
    Hello!
    can you tell me how to capture the microphone input? i already call Everyplay.FaceCamStartSession() and Everyplay.FaceCamSetAudioOnly (true). but it still can't capture the microphone input. This is my code:

    if (Everyplay.FaceCamIsAudioRecordingSupported ()) {
    Everyplay.FaceCamSetAudioOnly (true);
    } else {
    Debug.Log ("没有麦克风权限");
    }

    Everyplay.StartRecording();
    }

    Is there something I lost?

    Thanks !
     
  5. isoPepe

    isoPepe

    Unity Technologies

    Joined:
    Jan 26, 2017
    Posts:
    6
    Did you use faceCamGetAudioPowerLevel or faceCamGetAudioPeakLevel?
     
  6. Nkon

    Nkon

    Unity Technologies

    Joined:
    Jun 12, 2017
    Posts:
    65
    Hello!

    Here is a bit of sample code that you can adapt to your own needs:

    Code (CSharp):
    1.  
    2. void Awake()
    3. {
    4.     // use this in addition to your other initialization code
    5.  
    6.     // listen for FaceCam permission event
    7.     Everyplay.FaceCamRecordingPermission += FaceCamRecordingPermission;
    8. }
    9.  
    10. void OnDestroy()
    11. {
    12.     // stop listening for the FaceCam permission event
    13.     Everyplay.FaceCamRecordingPermission -= FaceCamRecordingPermission;
    14. }
    15.  
    16. void Start()
    17. {
    18.     if (Everyplay.FaceCamIsAudioRecordingSupported())
    19.     {
    20.         // set FaceCam to audio only mode
    21.         Everyplay.FaceCamSetAudioOnly(true);
    22.         // request permission to use the FaceCam
    23.         Everyplay.FaceCamRequestRecordingPermission();
    24.     }
    25. }
    26.  
    27. void FaceCamRecordingPermission(bool granted)
    28. {
    29.     if (granted)
    30.     {
    31.         Debug.Log("FaceCam access GRANTED");
    32.         // start the FaceCam session
    33.         if (!Everyplay.FaceCamIsSessionRunning()) Everyplay.FaceCamStartSession();
    34.     }
    35.     else Debug.Log("FaceCam access DENIED");
    36. }
    37.  
    After you've been granted the recording permission and Everyplay.FaceCamStartSession()
    has been called, you can start your recording normally and FaceCam will record using the
    microphone.

    Cheers,
    Niko
     
  7. shahbazali_cubix

    shahbazali_cubix

    Joined:
    Oct 13, 2016
    Posts:
    2
    Hello,

    I have followed the script mentioned above, but audio is not recording with microphones and headphones are connected.

    When I play video no sound heard. What could be the problem ?
     
  8. Nkon

    Nkon

    Unity Technologies

    Joined:
    Jun 12, 2017
    Posts:
    65
    Hi there,

    have you received the log message about FaceCam access (FaceCam access GRANTED / DENIED)?

    Does the recording have sound if the microphone and headphones are disconnected?

    What device are you using?

    - Niko