Search Unity

[Released] AVPro Movie Capture

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

  1. TyI3orG

    TyI3orG

    Joined:
    Mar 22, 2021
    Posts:
    15
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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,806
    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. kjayStudios

    kjayStudios

    Joined:
    Dec 8, 2014
    Posts:
    8
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. kjayStudios

    kjayStudios

    Joined:
    Dec 8, 2014
    Posts:
    8
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. kjayStudios

    kjayStudios

    Joined:
    Dec 8, 2014
    Posts:
    8
    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,806
    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,806
    Please upgrade to 4.6.4 - this issue should be resolved in this version.

    Thanks,
     
  14. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    477
    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:
    447
    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:
    477
    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:
    447
    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:
    11
    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:
    62
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. GUMTEC1

    GUMTEC1

    Joined:
    Jul 30, 2019
    Posts:
    7
    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. seabits

    seabits

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

    Which platform is this for?
     
  29. GUMTEC1

    GUMTEC1

    Joined:
    Jul 30, 2019
    Posts:
    7
    Oh Sorry

    Windows 10
     
  30. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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,806
    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. TSummers_SMT

    TSummers_SMT

    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. seabits

    seabits

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

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

    TSummers_SMT

    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. TSummers_SMT

    TSummers_SMT

    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:
    69
    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:
    31
    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. seabits

    seabits

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

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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
  45. ImmotionMorris

    ImmotionMorris

    Joined:
    Jul 24, 2018
    Posts:
    5
    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:
    5
    Disregard - updated the asset and turned off some of the post-pro effects - no longer seeing the cube map
     
    seabits likes this.
  47. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    379
    Have been using AVPro for many years. Is it now possible with this later version to capture audio using your "offline Render" choice?
    And if it is...does it require further downloads and adjustments?
    Before this later version we got the notice " Audio Capture only available in Realtime capture mode."
    I'd like to know before trying this newer version. Thanks. Windows10, 32 gigs. GTX1070ti, HD.. massive!
    Unity 2019 LTS.
     
  48. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Yeah, you can capture video in an offline render - you won't be able to hear it during the capture, but it'll be present in the recording. Are you using the latest version, 4.6.5?
     
  49. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Difficult to say without more information. Could you please create an issue on our Github so our technical team can look into this? Please fill out all info in the bug template.
     
  50. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    379
    Version 3.7.0 !! And with your updated Audio script you kindly sent me ..Oh.some time ago now !!
    Thanks for reply. Must try demo!!
    Great product.
     
    seabits likes this.