Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

NatCorder - Video Recording API

Discussion in 'Assets and Asset Store' started by Lanre, Nov 18, 2017.

  1. Phoera

    Phoera

    Joined:
    Mar 10, 2015
    Posts:
    9
    @Lanre hi, I'm trying to use NatCorder&NatShare in my ArCore/ArKit project, but by so far I've gotten to situation where I'm getting black screen instead of AR camera view
    I've seen you said you could provide libs which don't use multithreading, I suspect this might be the issue. Could you please send me libs for app with disabled multithreading?
    ps. this happens on samsung A7, but on S8 everything is ok =\
     
    Last edited: Aug 7, 2018
  2. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you email me the full logs from logcat? I've heard of an issue where suspending the app causes the camera preview to go black, but this is a Unity issue (not NatCorder).
     
  3. Phoera

    Phoera

    Joined:
    Mar 10, 2015
    Posts:
    9
    I've sent you logs, but I think it was false alarm, sorry. We've tested other app on that device without NatCorder and it also has issues with camera, so it must be the device problem.
    Sorry again! Thanks for your time =)
     
  4. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    No worries!
     
  5. unity147074106

    unity147074106

    Joined:
    Jul 9, 2015
    Posts:
    1
    Hi Lanre,
    I am thankful for the out-box plugin. But i met a problem that AudioSource sounding off and on when recording audio in iOS
    How to produce:
    1) add a AudioSource with a AudioClip in the "ReplayCam" Scene.
    2) run it in iOS platform.
    3) it sounding off and on when recording with audio.
    The output video file is good, I guess that NatCorderBridge.EncodeSamples is too slow to stuck the runtime audio thread. Could you give some advice how to solve it? Thanks a lot.
     
    Last edited: Aug 9, 2018
  6. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    I'm not sure that the problem is EncodeSamples taking too long but I will look into it. Did you modify ReplayCam to not override your AudioClip with the microphone clip? Can you email me a repro? Thanks!
     
  7. Kirhieyes

    Kirhieyes

    Joined:
    Apr 24, 2013
    Posts:
    1
    I want to intercept a video with a resolution of 200*300 from the lower right corner of the screen.What should I do?
     
  8. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    You'll have to create a custom shader to do this. Your shader should apply a UV offset corresponding to the pixel offset you want. Then you can use the shader to record by creating a material and setting it on a camera recorder (CameraRecorder.recordingMaterial).
     
  9. 3dprasad

    3dprasad

    Joined:
    Aug 12, 2010
    Posts:
    6
    Hi Lanre,

    I am using NatCorder to record video with audio (just microphone audio).

    On some devices, the audio volume is too low. Do you know any scenarios or conditions that lead to recorded audio being low in intensity?

    Keeping the distance between device and my mouth the same, If a record using NatCorder and do another recoding with plain camera app, the later one has more louder and clearer audio than the audio recorded with NatCorder.

    This not happening for every devices but few of them. The issue is happening every time on Samsung Galaxy S8 - Android 8.0 (Oreo),
     
  10. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    I just responded to your email. But to rehash, this is most probably a Unity Microphone API bug. NatCorder sends any audio data it receives directly to the hardware encoder. No transformations are performed, so the volume of the audio cannot be changed. We are working on a realtime microphone API because we're frustrated at microphone issues devs are facing, like this.
     
    Archviz3d likes this.
  11. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,014
    Hi, our team recently purchased this plugin, and it's awesome.
    It works great on PC/Mac/Android, but for some reason crashes the app on IOS, when the video recording starts (This happens on iPad 4). Without outputing anything useful to the console.

    This is on NatCorder v.1.3 & Unity 2017.3f1

    Do XCode build settings require anything additional for plugin to work properly?
     
    Last edited: Aug 10, 2018
  12. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you share a screenshot of the Xcode window when it crashes? I need more information to tell what's going on.
     
  13. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,014
    Here's complete log from start to crash:
    Code (csharp):
    1.  
    2. 2018-08-10 18:22:18.544449+0300 kazoopsworld[1763:1353965] [DYMTLInitPlatform] platform initialization successful
    3.  
    4. 2018-08-10 18:22:18.852218+0300 kazoopsworld[1763:1353797] -> registered mono modules 0x1590f70
    5.  
    6. -> applicationDidFinishLaunching()
    7.  
    8. PlayerConnection initialized from /var/containers/Bundle/Application/A5197FED-12EF-4C88-B8E0-53DDB74FC1A8/kazoopsworld.app/Data (debug = 0)
    9.  
    10. PlayerConnection initialized network socket : 0.0.0.0 55000
    11.  
    12. Multi-casting "[IP] 192.168.0.167 [Port] 55000 [Flags] 3 [Guid] 2161778355 [EditorId] 4277588418 [Version] 1048832 [Id] iPhonePlayer(iPad):56000 [Debug] 1" to [225.0.0.222:54997]...
    13.  
    14. Waiting for connection from host on [0.0.0.0:55000]...
    15.  
    16. Timed out. Continuing without host connection.
    17.  
    18. Started listening to [0.0.0.0:55000]
    19.  
    20. 2018-08-10 18:22:24.471943+0300 kazoopsworld[1763:1353797] Metal GPU Frame Capture Enabled
    21.  
    22. 2018-08-10 18:22:24.473483+0300 kazoopsworld[1763:1353797] Metal API Validation Disabled
    23.  
    24. -> applicationDidBecomeActive()
    25.  
    26. Renderer: PowerVR SGX 554
    27.  
    28. Vendor:   Imagination Technologies
    29.  
    30. Version:  OpenGL ES 2.0 IMGSGX554-129
    31.  
    32. GLES:     2
    33.  
    34. GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_comp
    35.  
    36. ression_pvrtc
    37.  
    38. OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level  <OpenGL ES 2.0> ; Context handle 349253520
    39.  
    40. Initialize engine version: 2017.3.1f1 (fc1d3344e6ea)
    41.  
    42. -------- Shader compilation failed
    43.  
    44. #version 100
    45.  
    46. #extension GL_EXT_frag_depth : enable
    47.  
    48. precision highp float;
    49.  
    50. uniform highp vec4 _ProjectionParams;
    51.  
    52. uniform highp vec4 _ZBufferParams;
    53.  
    54. uniform highp mat4 unity_CameraToWorld;
    55.  
    56. uniform highp mat4 _NonJitteredVP;
    57.  
    58. uniform highp mat4 _PreviousVP;
    59.  
    60. uniform highp sampler2D _CameraDepthTexture;
    61.  
    62. varying highp vec2 xlv_TEXCOORD0;
    63.  
    64. varying highp vec3 xlv_TEXCOORD1;
    65.  
    66. void main ()
    67.  
    68. {
    69.  
    70.   highp vec4 tmpvar_1;
    71.  
    72.   tmpvar_1 = texture2D (_CameraDepthTexture, xlv_TEXCOORD0);
    73.  
    74.   mediump vec2 tmpvar_2;
    75.  
    76.   highp vec4 tmpvar_3;
    77.  
    78.   tmpvar_3.w = 1.0;
    79.  
    80.   tmpvar_3.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((
    81.  
    82.     (_ZBufferParams.x * tmpvar_1.x)
    83.  
    84.    + _ZBufferParams.y))));
    85.  
    86.   highp vec4 tmpvar_4;
    87.  
    88.   tmpvar_4 = (unity_CameraToWorld * tmpvar_3);
    89.  
    90.   highp vec4 tmpvar_5;
    91.  
    92.   tmpvar_5 = (_PreviousVP * tmpvar_4);
    93.  
    94.   highp vec4 tmpvar_6;
    95.  
    96.   tmpvar_6 = (_NonJitteredVP * tmpvar_4);
    97.  
    98.   highp vec2 tmpvar_7;
    99.  
    100.   tmpvar_7 = (((tmpvar_5.xy / tmpvar_5.w) + 1.0) / 2.0);
    101.  
    102.   highp vec2 tmpvar_8;
    103.  
    104.   tmpvar_8 = (((tmpvar_6.xy / tmpvar_6.w) + 1.0) / 2.0);
    105.  
    106.   tmpvar_2 = (tmpvar_8 - tmpvar_7);
    107.  
    108.   mediump vec4 tmpvar_9;
    109.  
    110.   tmpvar_9.zw = vec2(0.0, 1.0);
    111.  
    112.   tmpvar_9.xy = tmpvar_2;
    113.  
    114.   gl_FragDepthEXT = tmpvar_1.x;
    115.  
    116.   gl_FragData[0] = tmpvar_9;
    117.  
    118. }
    119.  
    120. -------- failed compiling:
    121.  
    122. fragment evaluation shader
    123.  
    124. WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    125.  
    126. ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'
    127.  
    128.  
    129.  
    130. Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
    131.  
    132. WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
    133.  
    134. WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
    135.  
    136. WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
    137.  
    138. WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
    139.  
    140. WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
    141.  
    142. WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
    143.  
    144. -------- Shader compilation failed
    145.  
    146. #version 100
    147.  
    148. #extension GL_EXT_frag_depth : enable
    149.  
    150. precision highp float;
    151.  
    152. uniform sampler2D _MainTex;
    153.  
    154. uniform highp sampler2D _DepthTex;
    155.  
    156. uniform highp vec4 _Color;
    157.  
    158. varying highp vec2 xlv_TEXCOORD0;
    159.  
    160. void main ()
    161.  
    162. {
    163.  
    164.   lowp vec4 tmpvar_1;
    165.  
    166.   tmpvar_1 = (texture2D (_MainTex, xlv_TEXCOORD0) * _Color);
    167.  
    168.   gl_FragDepthEXT = texture2D (_DepthTex, xlv_TEXCOORD0).x;
    169.  
    170.   gl_FragData[0] = tmpvar_1;
    171.  
    172. }
    173.  
    174. -------- failed compiling:
    175.  
    176. fragment evaluation shader
    177.  
    178. WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    179.  
    180. ERROR: 0:14: Use of undeclared identifier 'gl_FragDepthEXT'
    181.  
    182.  
    183.  
    184. Note: Creation of internal variant of shader 'Hidden/BlitCopyWithDepth' failed.
    185.  
    186. WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Pass '' has no vertex shader
    187.  
    188. WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Setting to default shader.
    189.  
    190. Setting up 1 worker threads for Enlighten.
    191.  
    192.   Thread -> id: 41db9000 -> priority: 1
    193.  
    194. UnloadTime: 12.516041 ms
    195.  
    196. 2018-08-10 18:22:30.096356+0300 kazoopsworld[1763:1354018] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    197.  
    198. Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    199.  
    200. UnloadTime: 12.695125 ms
    201.  
    202. System memory in use before: 11.3 MB.
    203.  
    204. System memory in use after: 11.5 MB.
    205.  
    206.  
    207.  
    208. Unloading 24 unused Assets to reduce memory usage. Loaded Objects now: 3483.
    209.  
    210. Total: 19.211666 ms (FindLiveObjects: 4.240000 ms CreateObjectMapping: 0.813000 ms MarkObjects: 10.504291 ms  DeleteObjects: 3.648375 ms)
    211.  
    212.  
    213.  
    214. Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
    215.  
    216. UnloadTime: 10.685625 ms
    217.  
    218. System memory in use before: 11.7 MB.
    219.  
    220. System memory in use after: 11.9 MB.
    221.  
    222.  
    223.  
    224. Unloading 18 unused Assets to reduce memory usage. Loaded Objects now: 4181.
    225.  
    226. Total: 36.544958 ms (FindLiveObjects: 5.098916 ms CreateObjectMapping: 0.773541 ms MarkObjects: 26.778375 ms  DeleteObjects: 3.889250 ms)
    227.  
    228.  
    229.  
    230. 2018-08-10 18:22:33.441103+0300 kazoopsworld[1763:1354024] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    231.  
    232. 2018-08-10 18:22:33.448337+0300 kazoopsworld[1763:1354024] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    233.  
    234. 2018-08-10 18:22:33.492773+0300 kazoopsworld[1763:1354026] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    235.  
    236. 2018-08-10 18:22:33.495874+0300 kazoopsworld[1763:1354029] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    237.  
    238. Loaded new - testChr2
    239.  
    240. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    241.  
    242. UnityEngine.Logger:Log(LogType, Object)
    243.  
    244. UnityEngine.Debug:Log(Object)
    245.  
    246. AssetBundleSystem.AssetBundleCache:Convert(Object, IDictionary`2, Signal`1)
    247.  
    248. AssetBundleSystem.AssetBundleCache:performConversion(Object, AssetBundle)
    249.  
    250. AssetBundleSystem.<ProcessBundleCore>c__Iterator0:MoveNext()
    251.  
    252. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    253.  
    254.  
    255.  
    256. (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    257.  
    258.  
    259.  
    260. Loaded new - testChr1
    261.  
    262. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    263.  
    264. UnityEngine.Logger:Log(LogType, Object)
    265.  
    266. UnityEngine.Debug:Log(Object)
    267.  
    268. AssetBundleSystem.AssetBundleCache:Convert(Object, IDictionary`2, Signal`1)
    269.  
    270. AssetBundleSystem.AssetBundleCache:performConversion(Object, AssetBundle)
    271.  
    272. AssetBundleSystem.<ProcessBundleCore>c__Iterator0:MoveNext()
    273.  
    274. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    275.  
    276.  
    277.  
    278. (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    279.  
    280.  
    281.  
    282. NatCorder: Initialized NatCorder 1.3 iOS backend
    283.  
    284. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    285.  
    286. UnityEngine.Logger:Log(LogType, Object)
    287.  
    288. UnityEngine.Debug:Log(Object)
    289.  
    290. NatCorderU.Core.NatCorder:.cctor()
    291.  
    292. VideoCapturing.CaptureVideo:StartRecording()
    293.  
    294. UnityEngine.Events.UnityEvent:Invoke()
    295.  
    296. UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
    297.  
    298. UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)
    299.  
    300. UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()
    301.  
    302. UnityEngine.EventSystems.StandaloneInputModule:process()
    303.  
    304.  
    305.  
    306. (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    307.  
    308.  
    309.  
    310. 2018-08-10 18:22:34.717991+0300 kazoopsworld[1763:1353797] NatCorder: Prepared MP4 video encoder at resolution 2048x1536@60Hz with average bitrate 5909759 and keyframe interval 3s
    311.  
    312. 2018-08-10 18:22:34.746514+0300 kazoopsworld[1763:1353797] NatCorder: Prepared MP4 audio encoder for 2 channels at 24000Hz
    313.  
    314. 2018-08-10 18:22:34.746827+0300 kazoopsworld[1763:1353797] NatCorder: MP4 recorder started recording
    315.  
    316. WARNING -> applicationDidReceiveMemoryWarning()
    317.  
     

    Attached Files:

    Last edited: Aug 10, 2018
  14. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,014
    For video capturing width and height is used as Screen.width / Screen.height.
    Could it cause out of memory if used on big screens such as iPads one?
     
  15. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    I meant to see the full Xcode window, as if there's a crash, the left pane will have the call stack of the crash. I did notice that your recording resolution is 2048x1536. The H.264 encoder struggles with resolutions above 1920x1080, and you are recording at 60FPS using OpenGL ES2. The result is going to be a backlog of frames to be encoded that eat up memory, hence the crash. I recommend reducing your recording resolution and perhaps your recording framerate. Also, if the device supports it, switch to Metal API for a graphics backend because it far outperforms OpenGL ES.
     
    xVergilx likes this.
  16. halilkayim

    halilkayim

    Joined:
    Feb 27, 2018
    Posts:
    21
    Did this get resolved somehow? I started getting this error after I upgraded my scripting runtime to .NET 4.x.
     
  17. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Are you using NatCam or WebCamTexture? Upgrading to .NET 4.x should in no way affect this.
     
  18. halilkayim

    halilkayim

    Joined:
    Feb 27, 2018
    Posts:
    21
    I'm using NatCam. It might also be because I switched from Unity version 2017.3 to 2018.2, I will check if it works fine when I revert these changes.
     
  19. halilkayim

    halilkayim

    Joined:
    Feb 27, 2018
    Posts:
    21
    It does work when I revert the Unity version back to 2017.3. Any ideas what's causing the error, or how I can resolve it?
     
  20. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you email me the full logs from logcat in a .txt file? I'm not sure why it works in 2017.3 but not 2018.2.
     
  21. infinity135

    infinity135

    Joined:
    Feb 5, 2018
    Posts:
    17
    I recorded videos using NatCorder's ReplayCam Class but on playing it in the game the quality of the video decreases drastically
     
  22. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,014
    Forgot to say thank you.

    Yeah, lowering the resolution did worked out pretty well.
    XCode didn't even showed that application has crashed, it simply showed "Finished" without any errors. That's why I got confused and posted in the first place.
     
    Lanre likes this.
  23. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you share a screenshot or the video itself? What device are you recording on? And what video format are you recording with?
     
  24. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    This sounds good! Thanks for letting me know.
     
  25. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    103
    Hi @Lanre , when videos save on our Android device (using default camera capture and settings) the file size is 0 bytes. Any idea what we should look into to fix this?
     
  26. BenVlodgi

    BenVlodgi

    Joined:
    Nov 20, 2014
    Posts:
    3
    Is there a way we can force each frame to get encoded on its frame, to try to prevent the memory buildup?
     
  27. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you share your recording code? Also, attach the full logs from logcat as a .txt file.
     
  28. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Nope. NatCorder must be threaded, if not your app's framerate would grind to a halt. Queueing is the only way we can keep the app's framerate from drastically reducing, and the tradeoff is using more memory. For most applications, this is a reasonable tradeoff.
     
  29. infinity135

    infinity135

    Joined:
    Feb 5, 2018
    Posts:
    17
    Hey , I am trying to record the ingame footage. But when i play the video on a raw image using render texture then the quality of the video decreases very badly
    VideoFormat _videoFormat = new VideoFormat(cam.scaledPixelWidth, cam.scaledPixelHeight, frameRate);
    NatCorder.StartRecording(_container, _videoFormat, _audioFormat, recordingCallback);
    This is the code I am using
     
  30. dpond

    dpond

    Joined:
    Feb 27, 2017
    Posts:
    2
    Is there a technical reason why multiple simultaneous recordings aren't supported? Or is there a chance it might be supported in a future release?
     
  31. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Can you share one such videos? What device are you recording on?
     
  32. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    On mobile platforms, hardware encoders are exclusive-use devices. They can only decode or encode one stream at any given time. Hence this is a technical restriction.
     
  33. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    Hi
    Are there any devs willng to help (paid) with developing a small app based using NATCorder, NATShare ?
    Whilst they look like good assets the amount of demo examples are NIL .. for the price of they assets they appear very limited on how to implement. Thats OK if your a seasoned code dev but Im a creative dev with limited coding skills. Not a single working demo in sight leaves me bereft. For £40 each that is quite a high price margin with little to no working examples.

    Overall Requirement – A talking avatar (3D rigged model) that is animated from a user’s voice recording (not real time) that can then be audio/vid recorded, saved and shared (optional) as an audible video to social media

    I have a cartoon character fully rigged model known as Pit Mouse www.pitmouse.com

    The idea is to let users install the Android App – (APK file) – Users can then record a short audio message and have pit mouse repeat the message in his pitch with a talking animation all within a selected scene/environment. ( I can do the animation parts and possibly the pitch shift but I just need to have a demo scene based on my design concept).

    Steps:

    1. Tap Here to “RECORD NEW MESSAGE”

    Message Records (to max limit variable) (required by you)

    Audio is then pitch shifted higher to create squeaky voice (I can possibly do this portion but if possible done by you. A public float configurable for pitch shift amount)

    Once Message recorded it then activates PIT MOUSE Model (set active in scene) and Pit Mouse Repeats the previously recorded message (pitch shifted) (required by you)whilst animating a talking motion at the same time (this is scripted already using audio detection)

    Video and Audio are Automatically recorded at the same time as the replay (required by you) – if possible without impacting performance

    Replay the Video (required by you)

    At End of Video - Prompt Screen Options (required by you)

    2. Screen Options then are:

    a. Save Video (required by you)

    b. Start again

    c. Share Video (required by you)

    d. Other (??)

    3. Exit Screens / Other (I will code these areas)


    Is it possible that you can help with my requirement? I would be happy to purchase the products but as you can see I do not have sufficient skills to understand the working concepts of your API’s.

    A Demo based on my app idea would be a great use and a learning tool.

    Willing to pay a dev to assist with basics of such.

    Thanks
    A
     
    Lanre likes this.
  34. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    Why not provide a demo
    Started to get most of this working now. Steep learning curve for a limited coder like me. Good product but your documentation and very limited examples make it suck for the price!! Still it is a useful product once I understand bits. Lets get some more tutorials going please not everyone is a high level coder like yourself.
     
    Lanre likes this.
  35. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    CAN YOU SOMEONE PLEASE SHOW ME HOW TO GET MY SAVED VIDEO TO SAVE IN THE ANDROID CAMERA FOLDER.?? I have tried using Natshare etc but I have no idea what the syntax is. Your product support documents are absoloutely poor and limited. Hardly any working examples!!
    REPEAT: Please provide code such that I can save video to the Android Camera Folder !!
    Currently this code below saves videos to the path of the application after recording. (see screenshot). I WANT IT TO SAVE TO MY CAMERA FOLDER.

    Appreciate some useful support here! A written example woudl help instead of basic hints.Thank you.

    Code (CSharp):
    1.  public void StopRecording()
    2.         {
    3.          
    4.             // Stop the recording
    5.             videoRecorder.Dispose();
    6.             audioRecorder.Dispose();
    7.             NatCorder.StopRecording();
    8.          
    9.         }
    10.  
    11.         void OnReplay(string photo)
    12.         {
    13.        
    14.  
    15.  
    16. #if UNITY_IOS
    17.             Handheld.PlayFullScreenMovie("file://" + path);
    18. #elif UNITY_ANDROID
    19.                Handheld.PlayFullScreenMovie(photo);
    20.               #endif
    21.         }
     
  36. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    Got this working by using
    File.Move(photo, SaveVideoPath); // SaveVideoPath = /storage/emulated/0/DCIM/Camera/

    However the file does not appear straight away .. have to reset the phone for it to appear in the gallery .. how does one refresh the gallery view ?
     
  37. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,014
    You need to use native plugin to do that.
     
    artofmining and Lanre like this.
  38. Archviz3d

    Archviz3d

    Joined:
    Apr 4, 2016
    Posts:
    92
    Hi!!

    Great to see that de asset as been greatly developed :)

    I know that this is suppose to work on unity 2017.3.1, but do you think it would also work on unity 5.6.1?

    Thanks
     
  39. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    NatCorder works with Unity versions as old as 5.3. The only reason the Asset Store says 2017.3 is because that was the editor version used to submit the package.
     
    Archviz3d likes this.
  40. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    Thanks are you referring to Natshare or some other? I've not found a lot on google search that addresses this issue
     
  41. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    I think they mean you'd have to write a native plugin. I expect to push a NatShare update tomorrow or the day after, but if you can't wait then you're likely going to have to write a plugin.
     
    artofmining likes this.
  42. Archviz3d

    Archviz3d

    Joined:
    Apr 4, 2016
    Posts:
    92
    Thats AWESOME!!!!!!! Thanks :)
     
    Lanre likes this.
  43. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Hi all. I have exciting news:

    We are creating a native Microphone API.

    If you've ever wanted to record the microphone with NatCorder, and if you have faced the bugginess of Unity's Microphone API, then you will definitely want to check out our new NatMic API. It is currently in open beta, so post on the NatMic thread if you'd like access to it.
     
    artofmining and Archviz3d like this.
  44. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    29
    Thanks Lanre
     
    Lanre likes this.
  45. a6ram4uk

    a6ram4uk

    Joined:
    Feb 1, 2018
    Posts:
    1
    Hi guys. Sorry for my broken English. Can anyone give a short guide how to record audio from the AudioListener? Thank!
     
  46. rachidDev

    rachidDev

    Joined:
    May 19, 2017
    Posts:
    10
    I recieve from console google play those crash error , please can you fix it
     

    Attached Files:

  47. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    Hi. NatCorder comes with helper classes for recording parts of your Unity app. For recording a game camera, you can use the `CameraRecorder` component. Similarly, for recording audio from an `AudioSource` or `AudioListener`, you can use the `AudioRecorder` component:
    Code (CSharp):
    1. NatCorder.StartRecording(...); // Start recording
    2. // Create an AudioRecorder to record the scene's audio listener
    3. AudioRecorder audioRecorder = AudioRecorder.Create(audioListener);
    4. // Record for a while...
    5. ...
    6. // Now stop recording
    7. audioRecorder.Dispose();
    8. NatCorder.StopRecording();
    Remember to add the `NatCorderU.Core.Recorders` namespace to your script.
     
  48. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    The second error is not from NatCorder. I have taken note of the first and third ones.
     
  49. Privateer

    Privateer

    Joined:
    Jun 5, 2016
    Posts:
    16
    I have a very specific Android quality question which I know is probably not NatCorder's fault but I hope to get some help on it.
    I use NatCorder to record a Camera Space UI that projects the device camera on a texture and some other graphic overlays. Everything seems to be working fine when I'm recording but when I load the video back up, the Android saved file seems very compressed and/or low quality while the video I record on an iPhone seems of decent quality and plays back fine.
    Is there something I can do with NatRecorder or in Unity to fix this or is there something I can set in Android?
    I would appreciate any help.
     
  50. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    2,626
    When constructing the VideoFormat to pass in to StartRecording, set a high bitrate and reduce the keyframe interval to ~2-3 seconds.