Search Unity

[Released] AVPro Movie Capture

Discussion in 'Assets and Asset Store' started by AndrewRH, Jan 24, 2012.

  1. Sir_Everard

    Sir_Everard

    Joined:
    Feb 5, 2015
    Posts:
    5
    Hi, the demo scenes seem to be broken for 2018.1 using deprecated elements and all of the components aren't compiling as monobehaviours because they have the AVProMovieCapture prefix in the file name.
    Is this intentional or am I doing something wrong trying to set this up? upload_2018-7-17_20-0-54.png
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    IT looks like you had a very old version before and then upgraded to the latest version and it didn't upgrade correctly. Please delete the old AVProMovieCapture folder completely and then install the latest version - that should fix it.

    Thanks,
     
  3. Sir_Everard

    Sir_Everard

    Joined:
    Feb 5, 2015
    Posts:
    5
    Ahh I see thanks. Not sure why unity didnt rename the files.
     
  4. jeffsarge

    jeffsarge

    Joined:
    Jan 3, 2014
    Posts:
    32
    Is the free version limited to :10 of total record time and then it becomes disabled, or is it a max :10 per clip?
    Can't seem to capture anything now using any Unity configuration.
    Jeff
     
  5. Sir_Everard

    Sir_Everard

    Joined:
    Feb 5, 2015
    Posts:
    5
    Hello again.
    I'm trying to capture a 4k 60fps video of our game. I've built the game and I'm using fullscreen exclusive.

    I'm using cinemachine with a dolly cart and track to pan around my scene.

    I've tried with multiple codecs to create an offline render for this. When I start the render it will reduce the capture fps to 10fps. the games effects and the cameras Update based movements appears to stop completly. After about 4 seconds of "captured time" occassionaly it will move a few pixels where as the expected movement is much much greater.

    I've tested a realtime render too, althougth very bad quality I see movement i am expecting from the offline render.

    I would upload a short clip but they are practically static images.

    Any advice would be appreciated
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    10 seconds per clip.

    I'm not sure why it would stop working....
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm that's strange. If you capture in the editor does it work as expected? If you reduce the resolution does that help? Does it help if you build for fullscreen windowed?

    Which capture component/mode are you using? (eg CaptureFromCamera etc)

    Feel free to contact us via our Unity Support email (http://www.renderheads.com/contact/) - perhaps you could send us your scene for diagnosis.

    I presume you're using a recent version of the plugin?

    Thanks,
     
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Everyone,

    AVPro Movie Capture version 3.6.6 has just been released!

    You can find the updated version on the Asset Store here:
    more information and demos are available on the website.

    Changes include:

    Improvements
    • Added faster and more accurate stereo 360 rendering via adding support for Unity 2018.1’s stereo cubemap rendering to the CaptureFromCamera360 component
    Bug Fixes
    • None

    Please report any issues here on the forum, or to our customer support email.

    Thanks,
     
  9. Sir_Everard

    Sir_Everard

    Joined:
    Feb 5, 2015
    Posts:
    5
    Hi Andrew,

    Thanks for your reply, I did some investigating today, the problem was on our end and our adapative game speed implementation. After turning that off, the video renders are perfect.
    The previous configuration I mentioned is working as expected.

    Thanks for this software
    Chad
     
    AndrewRH likes this.
  10. g1df

    g1df

    Joined:
    Jul 10, 2018
    Posts:
    4
    Hello,

    I'm using version 3.6.5 with Unity 2017.3.1f1 to record videos with the CaptureFromScreen component and everything is fine when running from the Editor (on a Windows 10 x64 computer) but when I run the build (x64) on a target machine (Windows 8.1 x64), a crash happens after a random amount of captures.

    The error.txt file created after the crash mentions an access violation from AVProMovieCapture.dll but doesn't tell much more of what went wrong...
    I tried to dig a little in the output_log and here is the stack trace :

    ========== OUTPUTING STACK TRACE ==================

    0x00000001800241B1 (AVProMovieCapture) GetFreeResourcesEventFunc
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 0000000180002B4E)
    0x0000000180002B4E (AVProMovieCapture) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00000001800029BE)
    0x00000001800029BE (AVProMovieCapture) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 0000000180002471)
    0x0000000180002471 (AVProMovieCapture) (function-name not available)
    0x000000018000406B (AVProMovieCapture) UnitySetGraphicsDevice
    0x00007FFC510CB442 (UnityPlayer) GfxDevice::InsertCustomMarkerCallback
    0x00007FFC5170E252 (UnityPlayer) GfxDeviceWorker::RunCommand
    0x00007FFC517126AB (UnityPlayer) GfxDeviceWorker::RunExt
    0x00007FFC51708249 (UnityPlayer) GfxDeviceWorker::Run
    0x00007FFC51712719 (UnityPlayer) GfxDeviceWorker::RunGfxDeviceWorker
    0x00007FFC50F5E568 (UnityPlayer) Thread::RunThreadWrapper
    0x00007FFC764C13D2 (KERNEL32) BaseThreadInitThunk
    0x00007FFC766703C4 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========

    Any help would be appreciated!
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting your issue.
    If you take that build and run it on another machine (like a Windows 10 machine) do you still get the crash?
    What codec are you capturing to?

    Thanks,
     
  12. g1df

    g1df

    Joined:
    Jul 10, 2018
    Posts:
    4
    Hello,

    Thanks a lot for your fast reply!

    There's no crash when running the build on my Windows 10 computer so it seems related to the target machine/os.
    The codec used is the Media Foundation H.264 with no audio.

    Could it be a codec version problem ?
     
  13. veve178

    veve178

    Joined:
    Jul 28, 2018
    Posts:
    2
    same problem occurred on my newly installed win 10 pc with v3.6.6.
    'using media foundation'
    The exactly break point is the capturer.stop() function.

    No problem with v3.5.0. Any fixes?
     
  14. patwolf

    patwolf

    Joined:
    Feb 16, 2014
    Posts:
    3
    A couple of questions please:
    1. Is it possible to simultaneously record 5 cameras to 5 named pipes at the same time for streaming?
    2. Is stereo output supported via named pipes (ie two mono images combined into one stereo image output)?
    3. What is your recommended solution for audio streaming (since its not supported with named pipes)?
    Thanks!
     
    Last edited: Aug 1, 2018
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    1) Sounds like it could be related to the Windows 8.1 implementation of the H.264 encoder....Perhaps you could try with another codec (or uncompressed) to see whether that is the cause.

    2) Either that or a graphics driver issue. Please try upgrading your graphics driver.

    3) You could also try disabling multi-threaded rendering (in Player Settings) to see if that is the cause.

    It's process of narrowing the cause down... This isn't something we've come across before.

    Thanks,
     
  16. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm strange...Can you confirm that in the console output window it is logging both script and plugin version numbers are 3.6.6?

    If you disable multi-threaded rendering (in Player Settings), or use a different codec (even uncompressed) does that help?

    Do you have the "Post" option enabled to fix up the MP4 atom? Any help if you disable it?

    How frequent is the crash?

    Thanks,
     
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    1. 5 cameras to named pipes...Yes in theory this should be possible... We've only ever tested with one though. 5 would be very intensive.

    2. Yes. You just set the capture component to stereo and named pipe.

    3. We don't currently have a solution for this. The named pipe feature is a bit of an experimental feature as the plugin is mainly designed for capturing to video files or image sequences.
     
    patwolf likes this.
  18. g1df

    g1df

    Joined:
    Jul 10, 2018
    Posts:
    4
    Hello,

    Thanks for your support.

    I've tried to capture videos as Uncompressed AVI instead of H264 MP4 and there's no crash, so it is clearly related to the H264 codec on Windows 8.1.
    I checked the option to list video codecs to compare the Win8.1 machine with the Win10 one and there's no difference.
    Strange thing (or not ?), the H264 codec is not listed.

    Here are the listed codecs :
    0 : DV Video Encoder
    1 : MJPEG Compressor
    2 : Intel IYUV codec
    3 : Intel IYUV codec
    4 : Microsoft RLE
    5 : Microsoft Video 1

    Even if I install a well-known codec pack containing a version of the h264 I don't see any difference, crash still occurs and the codec list is the same.

    Do you think there's a way to "update" the h264 codec or to install another one ?
    If not, is there another codec you could recommend to capture videos on the fly with little file size and little performance cost?

    I've given a try to each codec in the list to see if another one could fit our needs but the h264 is definitely the most suitable.

    Finally, for the multithreaded rendering I don't see the option in the PlayerSettings.

    Thanks again!
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes H.264 is not listed because that list of only for the DirectShow Codecs. The H.264 codec is a Media Foundation (MF) codec and we don't include that in the enumerated list currently.

    Codec packs are DirectShow based, so they will not work if you select the MF H.264 codec, only instead if you select the codec directly from the list. Most codec packs contain quite buggy codecs so I would be careful about this.

    I think to toggle Multi-threaded rendering in Player Settings you need to right-click on the Inspector and go into "Debug" mode. The option should be there then, perhaps called "MT Rendering".

    I'm away on holiday now but I will continue to look into this when I get back. It sounds like I will have to get hold of a Windows 8.1 machine for testing this.

    Thanks,
     
  20. g1df

    g1df

    Joined:
    Jul 10, 2018
    Posts:
    4
    Ok sorry for the MTRendering option, I didn't check the Debug mode...
    I've rebuilt the application with MTRendering set to false but the crash still occurs the same way.

    Thanks for your advice about codec packs and for the codec list explanation.

    If I get some more information I'll let you know.

    Have a nice holiday!

    Thanks again.
     
  21. patwolf

    patwolf

    Joined:
    Feb 16, 2014
    Posts:
    3
    Have you considered adding streaming ability ie via this library https://github.com/hinaria/rtmpsharp?
    Or adding hooks so developers could easily implement streaming?

    I imagine it would open up a large amount of new use cases!
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    No problem. Please email our support address (www.renderheads.com/contact) if you have more details.

    Thanks,
     
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes :) We have investigated options like this... Internally we have some interesting experiments but nothing ready as a product yet.....
     
  24. DigitalNerds80

    DigitalNerds80

    Joined:
    Sep 1, 2017
    Posts:
    10
    Hello guys.
    We tried the demo version of the AVPro Movie capture plugin and we were thrilled, unfortunately !! we encountered a problem! Probabli our mistake is settings, when we generate a 360 ° image of a scene with applied an occlusion effect what we see are the cubemap junction lines.

    For us it is very important to be able to use avpro with effects in occlusion in realtime and not baked
    I bring you some screenshoots
    You can help us!
     

    Attached Files:

  25. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    Can you not try using the CaptureFromCamera360 component instead? That should not have this issue with seams.

    Thanks,
     
  26. DigitalNerds80

    DigitalNerds80

    Joined:
    Sep 1, 2017
    Posts:
    10
    Hi Andrew !, thanks for the quick reply !, I really appreciate it. Tested with both variants of the scripts, we always get the same result, tell me if I can give you more information or if you can do a simple test with an occlusion inserted and not cooked
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Are you using the latest version of the plugin?
    Did you try with "support camera rotation" and "support world gui" off?

    Thanks,
     
  28. DigitalNerds80

    DigitalNerds80

    Joined:
    Sep 1, 2017
    Posts:
    10
    Hi Andrew !, tried everything! I am attaching the setting of the camera, of the AVPro plugin and the result, finding the same problem both on the images and on the video
     

    Attached Files:

  29. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I see..
    Yes, this appears to be a limitation of the plugin. This post process effect happens in screen-space and is dependant on what is being rendered in the camera view. To make a 360 render we render 6 views and this affects how the screen-space effect works....I don't think we have an easy solution for this...

    Do you have any other filters in there, like auto exposure? These could be amplifying these seams.

    Thanks,
     
  30. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    I have just purchased AVPro Movie Capture and AVPro DeckLink for one of my project. And I need to capture multiple Video from Camera add some AR elements and save the video to disk.
    Capturing multiple videos from DeckLink Duo works okay for me. But whenever I start a second Capture from camera component, the recorded video file gets corrupted, even without DeckLink live video
    It is noted on assets store that AVPro Movie Capture supports "Simultaneous Capture". So how can I record more than one video (about 4 of 1080P H264 videos) to disk simultaneously?
     
  31. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm..This should work. Are you using the latest version of the plugin?
    Which capture component are you using, and which codecs? Are you recording audio at all?
    Thanks,
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Everyone,

    AVPro Movie Capture version 3.6.7 has just been released!

    You can find the updated version on the Asset Store here:
    more information and demos are available on the website.

    Changes include:

    Bug Fixes
    • Fixed a memory leak that would happen at the end of each capture

    Please report any issues here on the forum, or to our customer support email.

    Thanks,
     
  33. taynaTinoco

    taynaTinoco

    Joined:
    Jul 31, 2018
    Posts:
    6
    Hello guys,

    I'm trying to render a 360 video, but the render is kind of drawing the corner of a box and when I try to render later a VR video with previous render it looks like i'm in a box. Do you guys know whats is going on ?
     
  34. NextStepVRtual

    NextStepVRtual

    Joined:
    Jun 22, 2018
    Posts:
    1
    Hello, I Have AVProMovieCapture purchased and I am trying to get it to capture the screen, which is working fine, as well as record from a microphone as well. Basically have it so someone is running the unity exe and can capture what they are see through the VR Vive headset as well as record any comments about the game. It records the VR screen capture fine but the audio is not there. what can I do to get it to work. Here is a screenshot of my current setup for the camera. Thanks for any help you can give me.
    Audioavpro.png
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I think you may have also emailed us about this. This is likely to do with post-process effects. Many of these effects are done in screen space, so they will actually have different values for different views. Since we're rendering 6 separate views these post-process effects will have seams. There isn't much that can be done about this but we're still trying to think of a way to solve it. For now it's best to capture without these effects and then apply the effects when rendering the video. This won't be possible for all effects however (like Ambient Occlusion) as these rely on depth and normals which won't be available in the video render.

    Thanks,
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Our "MF H.264" video codec capture doesn't currently support capturing from Microphone - only from Unity's audio. If you use another codec then this should work. We hope to fix this in the near future.

    Thanks,
     
  37. RazHollander13

    RazHollander13

    Joined:
    Oct 16, 2018
    Posts:
    4
    Help please :)
    Mp4 coder works for me only on half resolution or lower. When i try it at original resolution it say "fails to create recorder"...
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I think the H.264 encoder that we use has a resolution limit of either 3840x2160 or 4096x4096. For higher resolutions you should encode to another format first and then transcode.
    Thanks,
     
  39. ddf

    ddf

    Joined:
    Jul 9, 2011
    Posts:
    54
    Hi, I've just been trying out your plugin in our project. We want to do a 4k offline render at 60fps, but it's also important that we can capture audio because some of the visuals are audio-reactive. I made a (probably naive) attempt at hacking in support for this, which *sounded* like it was working correctly, but then the resulting video was silent.

    I'm curious if y'all have already tried to support offline audio capture and there is some reason why it is not possible?
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    Yes, we would love to be able to add support for capturing audio when doing non-realtime captures. In order to capture at non-realtime speeds, we have to adjust the Time.captureFramerate field to make Unity run at a fixed frame rate. Just doing this actually stops Unity from playing audio (in our experience) and so the ability to capture audio is prevented.

    There is an interesting post here from someone suggesting a fix for this to Unity:
    https://feedback.unity3d.com/suggestions/make-onaudiofilterread-honor-time-dot-captureframerate

    One way to solve it would be if you can reproduce the run exactly the same each time, then use one non-realtime run to capture the video, and another realtime run to capture the audio and then combine them.

    Another option could be to use an external hardware capture solution.

    Thanks,
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I made a mistake in the previous post.. It's not that Unity stops playing the audio, it's that Unity continues to play the audio at the standard rate, ie not slowed down or sped up...so even if we did capture that audio, it wouldn't be in sync with the visuals. If you have any ideas on how to solve this I would love to hear about it.
     
  42. ddf

    ddf

    Joined:
    Jul 9, 2011
    Posts:
    54
    My idea was to have the UnityAudioCapture component pause the AudioListener at the beginning of a capture and then in each frame unpause it for the amount of time that the frame represents by checking AudioSettings.dspTime. This also requires have an additional bool so that the OnAudioFilterRead function only records audio while the AudioListener is unpaused. This is necessary because setting AudioListener.pause to true only pauses playing audio sources, it doesn't totally halt the audio generation thread, so OnAudioFilterRead is called even if the AudioListener is paused.

    Like I said, this *seemed* to work, inasmuch as I could set a breakpoint in the recording portion of OnAudioFilterRead and see that it was only getting hit between unpausing and pausing AudioListener during Update. I could also see that the recorded buffer was being sent out to the plugin in a EncodeAudio call, but the resulting video had no sound, so either it was reading silence or there is some other issue. I'm not entirely sure I caught all of the places where isRealtime is checked to see if audio recording should be enabled or not, but I'm pretty sure I did.

    But, also, the above method is rather inexact and probably would result in choppy audio in the video even if the sound got in there. Like that link you posted describes, what really needs to happen is that it generates exactly the amount of audio required for 1 frame at the chosen framerate. There isn't really a way to tell Unity's audio system to do that, though I am going to try using AudioSettings.Reset to set the dspBufferSize to the number of samples required, but I suspect it will round it to a power of two.

    In our case, it's really only the music that needs to be kept perfectly in sync with the offline rendered visuals because that's what the visuals are responding to, so I may wind up building the audio chunking for offline rendering into our music manager, which would allow us to do an offline render without audio and then add the music in afterwards.
     
  43. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's very interesting! I didn't realise you could pause the AudioListener....We will have to test that and see if it is enough for to get this to work :)
     
  44. ddf

    ddf

    Joined:
    Jul 9, 2011
    Posts:
    54
    Ok, I've definitely got music playing more or less correctly now. However, I finally noticed that the encoded video files do not have an audio track at all, so even though I *was* recording basically silence before, it wasn't even being written to the file.

    I stepped through the PrepareCapture code and it looks like the only difference in setting up the native recorder where CreateRecorderVideo is called is that useRealtimeClock is false. Is it the case that on the native side your plugin simply ignores all EncodeAudio calls if the video recorder was created for non-realtime recording?

    Also, regarding AudioListener.pause, there are a few issues with using that:

    * when AudioListener.pause is set to false, all AudioSources in the game that were is a play state are paused and AudioSource.isPlaying returns false. So if a game is relying on that flag to be accurate in order to take some action, it won't be able to rely on that during an offline render.
    * an AudioSource can have its ignoreListenerPause property set to true, in which case it will continue playing even if AudioListener.pause is set to true, so those sounds will continue to play in realtime

    As far as I can tell, it is not possible to completely halt Unity's audio system, which may even be a limitation of FMOD or whatever audio system they are using under the hood.

    The *other* idea I had, which is also a nasty hack and might not work, was to write a native plugin (https://docs.unity3d.com/Manual/AudioMixerNativeAudioPlugin.html) for their audio system that could be put into an Offline mode and then told to update each offline render frame. It would record exactly the number of samples required for the frame in ProcessCallback and then stall the audio thread with a sleep or something. Not sure how you'd get audio data to the recorder, though. And stalling the audio thread for too long might cause other problems, like maybe crashing it? I suppose you could also try this from OnAudioFilterRead, since it is running in the audio thread already. Like use Monitor to synchronize the main thread and the audio thread.
     
    AndrewRH likes this.
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for your suggestions :) I like the idea you have for the native plugin...hopefully I'll get some time to try that.
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Everyone,

    AVPro Movie Capture version 3.6.8 has just been released!

    You can find the updated version on the Asset Store here:
    more information and demos are available on the website.

    Changes include:

    Bug Fixes
    • Fixed a crash bug that sometimes happened when stopping the capture due to a threading issue

    Please report any issues here on the forum, or to our customer support email.

    Thanks,
     
  47. god123456

    god123456

    Joined:
    Mar 6, 2015
    Posts:
    6
    I find this bug too , on win7 64bit Gefore 750ti ,can anybody help me? Thank U!
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Try updating to the latest version 3.6.8 :)
     
  49. god123456

    god123456

    Joined:
    Mar 6, 2015
    Posts:
    6
    Thank you for fast feedback,I will test now!
     
  50. god123456

    god123456

    Joined:
    Mar 6, 2015
    Posts:
    6
    I am update to 3.6.8 .but also crashed when stop capturing.
    My system memory is 4GB. I try to render a Complex scene at low frame rate。
    I upload the log and the error file,Please help me, Thank U!
     

    Attached Files: