Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

15 seconds video of size 3-4 mb.

Discussion in 'Unity Everyplay' started by 5c4r3cr0w, Oct 17, 2016.

  1. 5c4r3cr0w

    5c4r3cr0w

    Joined:
    Mar 8, 2016
    Posts:
    26
    I am recording only 15 seconds of video still getting 3 to 4 mb size of the video.

    I tried using function
    Code (CSharp):
    1. Everyplay.SetLowMemoryDevice (true);

    below down is my code:

    Code (CSharp):
    1. void Start ()
    2.     {
    3.    
    4.         Everyplay.ReadyForRecording += Everyplay_ReadyForRecording;
    5.  
    6.     }
    7.  
    8. void Everyplay_ReadyForRecording (bool enabled)
    9.     {
    10.         if (enabled) {
    11.             bool lowMemory = true;
    12.             Everyplay.SetLowMemoryDevice (lowMemory);
    13.             Everyplay.SetTargetFPS (Application.targetFrameRate);
    14.             Debug.Log ("Ready For Record");
    15.         } else
    16.             Debug.Log ("Not Ready To Record");
    17.     }
    and from below code I'm recording video:


    Code (CSharp):
    1. void Recording ()
    2.     {
    3.         if (Everyplay.IsReadyForRecording ()) {
    4.  
    5.             Everyplay.StartRecording ();
    6.             //    Debug.Log ("Recording Started");
    7.             Invoke ("StopRec", 15);
    8.         }
    9.     }
    10.  
    11.  
    12. void StopRec ()
    13.     {
    14.         Debug.Log ("Recording Stopped");
    15.         Everyplay.StopRecording ();
    16.    
    17.         finishBtn.SetActive (true);
    18.        Everyplay.ShowSharingModal ();
    19.     }
    20.  
    Please tell me what I'm doing wrong.. :(
     
    Last edited: Oct 17, 2016
  2. ullatussimo

    ullatussimo

    Unity Technologies

    Joined:
    Jun 16, 2015
    Posts:
    108
    Hello @5c4r3cr0w ,

    Thanks for reaching out.

    The SetLowMemoryDevice -function forces our SDK to low memory usage mode.
    Due to the smaller memory footprint, it is possible that frames are skipped from the recording, leading to choppier video.

    However, the function does not affect the size of recording in a meaningful way.
    The functions which DO affect the size of recording are:
    Everyplay.SetTargetFPS(int fps)
    Everyplay.SetMotionFactor(int motionFactor) //1-4, 4 is best quality and biggest filesize.

    If you want to make your video smaller, consider forcing the TargetFPS to 30 and MotionFactor to 1, please note that this will affect the video quality detrimentally.

    Hope this answers your question.

    Cheers,
    Simo
     
unityunity