Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

[Released] AVPro Movie Capture

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

  1. TyI3orG

    TyI3orG

    Joined:
    Mar 22, 2021
    Posts:
    6
    Hi, I'm using PostProcessingBehavior.cs(the Unity built in) on my camera, but when I go to capture through movie capture the output is just a black screen. This happens with the Profile_BasicAdjustment, Profile_Cinematic, and Profile_retro, but works with Profile_VR. Is there a way to fix this or is post processing not supported on normal camera capture(non VR 360)?
     
  2. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hey @ProyectoUnity333

    I think we responded over email but just in case it might be useful for someone else - if you wanted to overlay text you'd need to either blit to a RenderTexture and then capture that, or alternatively you could use the CaptureFromCamera compnent and render the text to the camera.

    Does that help?
     
  3. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    There's no explicit way to capture a screenshot - but you could do this by setting the output to be a png/jpeg/tif and then setting the stop mode to stop after 1 frame. This would result in a single image.
     
  4. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hey @Tyl3orG

    Are you using CaptureFromScreen or CaptureFromCamera? It's possible that CaptureFromCamera doesn't work with postfx but the CaptureFromScreen component should definitely capture the final image. Which render pipeline are you using and which version of postfx module? You could also send a reproducible case to unitysupport@renderheads.com

    Thanks!
     
  5. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @eddersook

    Sorry for the slow response.

    1) The texture that AVPro Video produces can require flipping (and all sorts of other transforms, which vary per-platform) so generally that texture has to be resolved by one of our shaders. A quick solution would be to use the 'flip vertical' option in the CaptureFrom component. Otherwise, you'd need to resolve the texture from AVPro Video. If you're using 1.x this can be difficult, but if 2.x we could send you a code snippet.

    2) It's possible that the AR implementation is causing this - we've had some issues in the past using Vuforia with Metal and we don't support OpenGLES on iOS. It's also possible that this is caused by a bug in iOS that has been resolved and will be fixed in the upcoming Move Capture version we are releasing shortly. So your best bet would be to try with the new version and if it still doesn't work, log an issue about this on our Github so we can look into it further: https://github.com/RenderHeads/Unit...e/issues?q=is:issue+is:open+sort:updated-desc

    Does this help?
     
  6. AndrewRH

    AndrewRH

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

    AVPro Movie Capture version 4.6.3 has just been released!

    You can find the updated version on the Asset Store here:
    The trial version can be downloaded here:
    Changes include:

    Bug fixes
    • General
      • Fixed several issues related to cancelling captures, including an error message about the file not existing, correctly deleting image sequences and correctly deleting files during an asynchronous file close
    • macOS / iOS
      • #100 Fixed issue with captures failing when no frame limit has been set

    Thanks to everyone that reported bugs that were fixed in this release :)

    Please report any issues here on the forum, or to our Github Issues
     
  7. kylebjaynes

    kylebjaynes

    Joined:
    Dec 8, 2014
    Posts:
    6
    Hi there,

    Been using AVPro movie capture and it's been outputting videos great, but I can't hear any audio with the rendered videos. I'm outputting it for macOS, I have it checked off to search by name for the audio codec (have also tried it with each of the codec options selected) and added the CaptureFromAudioListener to my camera and added it to the Unity Audio capture section in the inspector. The video codec is H264 in case it matters. I do get the following message in the console at the start. Please help and apologies if this seems obvious. Thank you.

    Code (CSharp):
    1. [AVProMovieCapture] Audio buffer overflow, may cause sync issues.  Disable this component if not recording Unity audio.
    2. UnityEngine.Debug:LogWarning(Object)
    3. RenderHeads.Media.AVProMovieCapture.CaptureAudioFromAudioListener:OnAudioFilterRead(Single[], Int32) (at Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs:128)
    4.  
     
  8. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @kylebjaynes

    Could you please let us know the following:
    1. Can you confirm in the Audio section of the Capture component you've changed the Audio Source from 'none' to 'Unity'?
    2. Unity version
    3. Movie Capture version
    4. Are you doing an offline render or a realtime capture?
    Thanks
     
  9. kylebjaynes

    kylebjaynes

    Joined:
    Dec 8, 2014
    Posts:
    6
    Hi Thank you for the quick response- yes I've changed the Audio source to Unity and added my camera with the Capture from listener component attached (I do have a couple cameras in the scene- I deactivated the audio listeners for all except the one with the capture from Listener component attached). I'm using Unity 2019.417f1. I'm using Movie Capture Version 4.6.3 and I'm doing a realtime capture.
     
  10. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Thanks for the feedback. Any chance you could send a sample/reproducible project to unitysupport@renderheads.com? Alternatively/in addition could you check if you have the same issue with sending up audio output in one of the demo scenes?
     
  11. kylebjaynes

    kylebjaynes

    Joined:
    Dec 8, 2014
    Posts:
    6
    Alright, I attempted to output a video with the Demo00- ScreenCapture scene. Setup as is, the scene works in capturing real time video with audio. However, it seems that this is more because this scene has the "demo" gameObject with the Screen Capture Demo script attached which appears to be forcing the audio. If I add the Capture From Audio Listener component to the camera in this scene and add the camera to the Unity Audio capture section in Inspector, the same Audio buffer overflow error occurs.
     
  12. AndrewRH

    AndrewRH

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

    AVPro Movie Capture version 4.6.4 has just been released!

    You can find the updated version on the Asset Store here:
    The trial version can be downloaded here:
    Changes include:

    Improvements
    • General
      • Added support for the injection of stereo and 360 spherical metadata into MP4 captures, compatible with YouTube and other players
      • MP4 post processor refactored
      • Cosmetic UI improvements
    Bug fixes
    • General
      • Corrected settings in transparency demo scene
      • Fixed CaptureAudioFromAudioListener from logging warnings about buffer overflows on startup
    • Windows
      • Fixed issue where destroying an active capture component would result in correct MP4 file

    Thanks to everyone that reported bugs that were fixed in this release :)

    Please report any issues here on the forum, or to our Github Issues
     
  13. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,716
    Please upgrade to 4.6.4 - this issue should be resolved in this version.

    Thanks,
     
  14. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    311
    Hi Andrew,

    Please delete this post. My problem is solved and was my mistake.

    Thanks!
     
    Last edited: May 10, 2021
    NathanRH likes this.
  15. alexis_unity251

    alexis_unity251

    Joined:
    Jul 27, 2020
    Posts:
    1
    Hello @AndrewRH ,

    Is it possible to render webm videos with transparency in this?
     
  16. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @alexis_unity251

    We unfortunately don't support transparency with WebM. Sorry about that.
     
  17. Hamnett

    Hamnett

    Joined:
    Dec 15, 2017
    Posts:
    1
    Hi TerryRH , I have a question about offline rendering (screen record mode).

    I need to record 8 differences scene in one time (using don't destroy on load to keep the AVPro script)

    The scene is just playing Animation on the camera, when I loaded to the 5th~7th scene.
    (using Application.loadlevel , sceneManager.loadlevel , AsyncLoadlevel)

    It suddenly speedup the animation speed like playing the 12s animation in 3s.
    (The exported media)

    I tried to record in differences fps , format and resolution but it seem same result.

    Any Idea to fix it?
     
  18. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @Hamnett

    It's hard to say what is causing this without more details. Would you be able to send a sample reproducible project to unitysupport@renderheads.com please? Could you please also log this issue on our Github, so when we've had a chance to look at your project our technical team can reply to you there.

    Thanks
     
  19. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    458
    Hi. I'm evaluating the free trial version. My game runs at 60 fps inside Unity Editor on Windows 10. When I click on Start Capture, frame rate decreases to under 1 fps. Any suggestions?
     
  20. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    That's odd. Could you give us some more information to go on?

    1) Which platform are you running on?
    2) What capture settings are you using? (screenshot is fine)
    3) Is it running on modern hardware?
    4) Are you using one of the CaptureFrom components in your scene, or the Capture Window?
    5) Does the same thing happen in our demo Scenes?

    Usually when the FPS becomes that low it is because the capture is expecting audio, but no audio is being received. If you disable audio capture does it run better?

    Thanks,
     
  21. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    458
    Thank you Nathan for the quick response. Yes, it was the audio. After setting the source to None, the frame rate got back to 60.

    I'm using Unity on Windows 10 (AMD Ryzen 7 2700, RTX 2080 Ti, 32GB RAM)

    My goal is to capture a pretty simple 2D game at 60fps with no frames dropped and no compression artifacts. I can record it either in the Editor or from a Windows build. After playing with AVPro Movie Capture for a couple of hours I came up with the following settings:
    Capture 3.PNG Capture 2.PNG Capture 1.PNG Capture 4.PNG



    Questions:
    1) Is this what you would recommend for my situation?
    2) Is it possible to have audio playing while recording? Currently I hear audio on the recording, but not while capturing it.
    3) Is there any advantage to recording inside a Windows build vs. Unity Editor?
     
  22. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    1) Great! Those settings look good. You're using offline rendering, so I guess you aren't capturing in realtime with any realtime input? If you're really after zero compression artifacts then export to PNG sequence might be better - you can then convert that to a video using another tool

    2) Because you're capturing in offline mode, the audio will become muted while it is capturing. This is just how it works unfortunately. If you switch to real-time capture then you will be able to hear the audio while it is capturing - but you lose the ability to guarantee that every frame is captured - but it still might be possible

    3) If you're doing an offline render, then there's no advantage. If you'r doing a real-time capture then usually a standalone build performs better as it doesn't have the Editor overhead.

    Thanks,
     
    username132323232 likes this.
  23. eddersook

    eddersook

    Joined:
    Apr 9, 2020
    Posts:
    6
    Hi!

    I am using AVPro Movie Capture for my IOS application in which we allow users to record multiple clips that are then pushed onto a main recorder that combines them by pausing/unpausing the recording.

    Everything works great so long as the user does not unfocus the application/sleep their device. In order to circumvent the issues that occur with the timing of recordings with respect to our application setup and with successfully completing a recording post unfocusing, We opted to pause the recordings if they are in progress OnApplicationPause, when the unfocusing is detected.

    This works fine in editor, but on device when the application is unfocused, when the recording is paused it still commits the last frame that was committed when it was last active for the x amount of seconds you are away from the application.

    This is undesirable for us as we just want the recording to pick up from where it left off.

    Do you guys have any advice on how to properly continue recording or start/stop recorders without having them stall/fail when the user leaves the application or sleeps their devices? So it can pick up where they left of when they come back

    Any help would be appreciated!

    Best,

    Edwin
     
  24. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    60
    Hello, I am using version 1.0.

    I want to immediately delete a file that has been recorded and saved.

    I'd appreciate it if you could write an example code to delete it.
     
  25. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi,

    We have this function:

    Code (CSharp):
    1. public static void DeleteCapture(OutputTarget outputTarget, string path)
    Which you could use like this:

    Code (CSharp):
    1. CaptureBase.DeleteCapture(OutputTaget.VideoFile, "c:/captures/myvideo.mp4");
    Or, if you wanted to delete the last captured video:

    Code (CSharp):
    1. CaptureBase.DeleteCapture(OutputTaget.VideoFile, _captureFromScreen.LastFilePath);
    Hope that helps.
     
  26. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi Edwin,

    We're struggling to reproduce this. Could you please log this as an issue on our Github here so that we can keep track, and potentially also send a reproducible project over to unitysupport@renderheads.com? Thanks
     
  27. GeorgeUamTec

    GeorgeUamTec

    Joined:
    Jul 30, 2019
    Posts:
    5
    Hey AndrewRH,

    I have a purchase of AVProMovieCapture. Just a question regarding the Microphone.
    It is fine when the devices are plugged in, and gathers all mic's that are detected.

    However I would like to initialise the update of devices when I plug the mic after the scene is loaded.
    I thought I can achieve this with re-initializing the scene load. Which works with your other product AVProLiveweb. But does not initialise the mic dynamically when it is in runtime when I try plugging in after.

    I have checked your documentation however I can not find such a feature to turn. Is there such a feature?


    Unity: Version 2020.3.12f1
    AVProMoveCapture: Version 4.6.4


    Thanks in advanced:)
     
  28. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @GeorgeUamTec

    Which platform is this for?
     
  29. GeorgeUamTec

    GeorgeUamTec

    Joined:
    Jul 30, 2019
    Posts:
    5
    Oh Sorry

    Windows 10
     
  30. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    57
    Hi, is the latest version compatible with M1 based Macs? We are currently running Version 4.0.1 (late 2019 - so before the M1 age) on Unity 2021.1 which gives "DllNotFoundException: AVMovieCapture" errors when run on an M1 Mac. The plugin is set to support "Any CPU".

    If the latest version should work, are there any breaking changes to be aware of between 4.0.1 and current?

    Thanks!
     
  31. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi there,

    Would strongly recommend upgrading to the latest version 4.6.4 which runs fine on an M1 chip. There have been a ton of improvements to MacOS/iOS since 4.0.1.
     
    Huacanacha likes this.
  32. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @GeorgeUamTec

    There is currently no way to refresh devices but this is probably something we could add. I've created a feature request on our Github. Please follow progress here.
     
  33. AndrewRH

    AndrewRH

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

    AVPro Movie Capture version 4.6.5 has just been released!

    DOWNLOAD HERE

    Changes include:

    Improvements
    • General
      • Completely new and improved documentation PDF and website
    • macOS
      • When using the Relative To Project folder option, captures will now be saved outside of the application bundle
    • iOS
      • Added pre-process build script to check if an unsupported renderer has been selected
      • Improved log output for when the plugin cannot be initialised due to the renderer type being unsupported
    Bug fixes
    • macOS / iOS
      • #111 Fixed crash when capturing to image sequence
      • #112 Fixed issue with high CPU usage when capture is paused

    Thanks to everyone that reported bugs that were fixed in this release :)

    Please report any issues here on the forum, or to our Github Issues
     
  34. TSummers92

    TSummers92

    Joined:
    Jul 22, 2021
    Posts:
    3
    It seems like the Named Pipe capture type does not work in current versions (at least in version 4.6.4) on Windows builds. The application seems to crash as soon as the CreateRecorderPipe() is called on the NativePlugin script. I'm running on Unity 2021.1.0f1 and have also tried on Unity 2021.1.15f1.
     
  35. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Hi @TSummers92

    What do you mean by crash? How are you reading the named pipe? FFMpeg?
     
  36. TSummers92

    TSummers92

    Joined:
    Jul 22, 2021
    Posts:
    3
    By crash, I mean the application freezes and Windows brings up the non-responsive application window.

    FFmpeg is being used to read the pipe, however according to the log the application crashes before FFmpeg has a chance to start. When I revert the application back to using AVPro Movie Capture 4.0.1, everything works. When the application crashes, the last thing in the log file is AVPro logging that it is starting the pipe capture. I tried adding debug immediately after the pipe capture starts, but it never gets logged.
     
  37. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    That's odd, it seems to be working fine on the latest 4.6.5. Tried in 2021 as well and no crashes. Could you provide more details about your setup? Perhaps it'd be good to try with one of the demo scenes as well?
     
  38. TSummers92

    TSummers92

    Joined:
    Jul 22, 2021
    Posts:
    3
    I tried making a build using the latest release (4.6.5) that only included Demo00-ScreenCapture and had the same results, as soon as I select named pipe and hit start recording, the application crashes. We've tried the builds on a few different Windows machines such as a Surface Pro (I can try to get more specifics on the systems used from our QA team if you need it), although the build itself is being made on a Mac. Most of our target machines do not have the Windows media features installed, which is why we are using FFmpeg to get compressed videos. The only non-standard thing in the test build I've been using is Unity's UI Toolkit.

    As I mentioned before, the named pipe feature is working when using an older version of AVPro. At the moment we have Windows builds using an old version of AVPro and Mac builds using a newer version for our release client, but we really want to remove the old version and use the latest for all platforms.
     
  39. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    20
    Hi, Im having problems pausing and resuming capture in a coroutine. It seems like my code after pausecapture is blocked until i resume the capture:

    A portion of my code is as follows:

    ` videoCapture.StartCapture();
    //fade in artist video 1 and play for 5 seconds
    ArtistVideos[0].TweenGraphicAlpha(1, 1f);
    ArtistVideos[0].GetComponent().Play();
    yield return new WaitForSeconds(5.0f);
    videoCapture.PauseCapture();

    Debug.Log(GOT HERE);

    ArtistVideos[0].TweenGraphicAlpha(0, 0.01f);
    currentCamIdx = 0;
    yield return new WaitForSeconds(38.00f);
    `

    I have realized that after the PauseCapture() line, even though the immediate Debug Log function is ran without problems, everything else after that does not get executed. However, when I resume the capture from the editor, the codes after gets immediately executed.
     
  40. Dan_G

    Dan_G

    Joined:
    Dec 4, 2017
    Posts:
    24
    Hi,
    I have a couple of questions:

    1) Is there a way to force a buffer flush of the recording? I sometimes record long videos (>15min) and i don´t see the data being dumped into the disk frequently. Sometimes when i record, it flush the buffer a few times at the beginning (i can see the size of the .mp4 incrementing) but then it stays the same until i stop the recording. For example, the .mp4 file stays at 10MB for 10 minutes, then when I stop recording it suddenly increases to 300MB. This can cause notorious issues on low specs machines, especially those with not much RAM. Furthermore, this is somewhat inconsistent between machines. One of my users left the recording for 1h and AVProMovieCapture was using 8GB of his RAM to store the recorded bugger. His system stalled when he stopped recording because of all the RAM consumed.

    2) Do you have any settings to reduce the file size of the videos recorded? 12 minutes of recording is normally 1.2GB... that´s huge! Do you have any compression to make the file size smaller without altering the quality?

    I am using AVProMovieCapture v4.6.4 in Unity 2020.3.4 on Windows 10. I have looked for answers on your documentation but i could not find anything related to any of these problems. I just found the
    Code (CSharp):
    1. forceGpuFlush
    but it doesn´t flush the data to disc.

    EDIT 1: I realised that it does update every so often the first time i record, but not the following, which is strange...

    Thanks in advance!
    D
     
    Last edited: Sep 6, 2021
  41. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Have responded on the GIthub issue you created here.
     
  42. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Could you please log an issue on our Github with the following details so we can investigate this further:
    1. Which windows version are you using?
    2. Which FFmpeg version are you using?
    3. How are you calling the named pipe?
     
  43. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    140
    Could you please log an issue on our Github and include the following additional info:
    1. What specs of machines are your users using (the one that was using 8GB of RAM in particfular)
    2. What are the specs of the video you are recording?
    We don't really have any explicit ways to add more compression beyond things like reducing the framerate, resolution etc. There is minimal compression added to the realtime render, whereas the offline render is more compressed by default.
     
    Last edited: Sep 10, 2021
  44. unity_409DD21B7E964D54D62A

    unity_409DD21B7E964D54D62A

    Joined:
    Jul 2, 2021
    Posts:
    1
    Hi,

    I have full version and problem that need to fix.

    I am capturing mp4 with CaptureFromScreen from builded application. Short captures are OK but the longer ones are typically corrupted or just black screen (20 min videos OK, 1Hr broken).

    Recording on laptop connected to 4K monitor. Resolution is set to 3840x2160 and the application is running in windowed mode on 1920x1080.

    CaptureFromScreen settings:
    Realtime
    StartTriggerMode.Manual
    StopMode.None
    OutputTarget.VideoFile
    CaptureBase.DownScale.Original
    FrameRate = 30
    VideoCodec = H264
    average bitrate = 20
    max bitrate = 25
    keyframe interval = 150

    After every capturing I am waiting on file processing finish with the file writing handler.

    Is anybody able to help me?
    Thanks.
     
    Last edited: Sep 15, 2021 at 2:45 PM
  45. ImmotionMorris

    ImmotionMorris

    Joined:
    Jul 24, 2018
    Posts:
    3
    Hi there,

    Am trying to capture a 360 but am getting problems with the cubemap lining up correctly (see attached). Traditionally with other projects, these settings have worked perfectly fine so am unsure as to why this is happening. Any direction is greatly appreciated.

    Unity 2017.4.3f1
    AVPro Movie Capture 3.6.8
     

    Attached Files:

  46. ImmotionMorris

    ImmotionMorris

    Joined:
    Jul 24, 2018
    Posts:
    3
    Disregard - updated the asset and turned off some of the post-pro effects - no longer seeing the cube map
     
unityunity