Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] AVPro Movie Capture

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

  1. b14de1

    b14de1

    Joined:
    Jul 25, 2012
    Posts:
    12
    Could this be used to capture footage at a fixed framerate even when the realtime framerate is expected to be lower than that required (24fps), so frames are forced to render no matter what (like that of CryEngine's capture command)? This is needed for use in offline visualisation renders where no realtime input is required.

    thanks
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Good question b14de1, This isn't supported yet but it's something we plan to add in the next release. It would be very useful!
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Looks very interesting, I'm thinking about getting this. I'll want to add this to my game so the player can record their game play. My game is very physics / graphics intensive so I'm concerned about how big a performance hit this might have on gameplay.

    How big a performance hit is there while recording? When paused?

    When stopped is all memory / processing freed up so the game can run at full speed?

    I'm not familiar with the "Lagarith" codec, how big are the movie files compared to other codecs?

    Could a "time code" be added to the recording (not seen in the game, just the video recording)?
     
    Last edited: Oct 4, 2012
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    When it's paused there's zero performance hit. Same as removing the asset.

    Lagarith is a lossless codec so the resulting files are very very large. The amount of processing power it uses depends on a combination of which codec you use (all of your users will have to have the required codec installed on their machines) and the resolution and frame-rate of the video you're producting. I'd probably go with something like DIVX/XVID and a user configurable resolution/frame-rate depending on their machine spec.

    Currently it only grabs what is visible on the screen and there's no way to add rendering to the output without it appearing on screen so it won't be able to do the 'time code' idea right now. Perhaps in the future we'll add ability to composite another texture over the top.
     
  5. kaushik-hobb

    kaushik-hobb

    Joined:
    Oct 24, 2012
    Posts:
    9
    Hey this is exactly what i wanted for my interactive application. One thing I wanted to know was that is there anyway to record In-game audio with the Mic input and also varying the levels of audio. For example , I want the in game audio to be 30% and mic to be more amplified.. Cheers.. Anyways going to buy this asset today!
     
  6. kaushik-hobb

    kaushik-hobb

    Joined:
    Oct 24, 2012
    Posts:
    9
    Hi again. Just bought the package and trying to get it to work.. One problem is that all my video outputs seems to be flipped / inverted . Any idea why this is happening? btw the demo application from your website seemed to be working perfectly. p.s im using unity 3.4.3 .. is that gonna be a problem?
    cheers
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Flipped? Hmm that's odd. Try toggling anti-aliasing and see if that helps. Unfortunately the recorder only records audio from a single source, so it'll have to be either the game OR the microphone.. Unless you have some sort of mixer. It might be best to record your in-game audio and then do another pass later where you record the voice audio and mix it over the top.
     
  8. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Yessss I bought it! It looks like a great asset. I hope in the near future you will add support for the mac and fixed framerates :)

    cheers
     
  9. AndrewRH

    AndrewRH

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

    I have a new demo ready for you to try. You can download it here (6MB):
    http://www.renderheads.com/downloads/UnityPlugin-AVProMovieCapture-1.7a-Demo.zip

    This demo includes the fixed-framerate recording (or non-realtime). This means for non-interactive graphics you can just let it run as fast as it can render and it'll generate the AVI recording as quickly as possible. So if you have an animatic sequence that plays in Unity at 120fps, and you want to make a 30fps video, it'll be able to encode the AVI at a maximum of 4x real-time (depending on which codec you use). This is also helpful if your HEAVY Unity scene runs at 1fps with full features enabled - you'll now be able to still capture at 30/60 FPS!

    The demo also includes 4 sub-demos that show recording full screen, from a camera, from a texture and from webcam.

    The new features will be coming in the next update - please let me know your comments/feedback :)
     
  10. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Works like a charm! I've got an issue though, but thats not related to this demo. The pause/resume function in the caption without GUI doesn't work. In the caption with GUI it works perfect!
    Do you know whats wrong?
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Ahh yes that's a bug! We'll fix it in the release. So currently the pause/resume doesn't work in CameraMovieCapture which is the mode that doesn't capture GUI.
     
  12. Joyrider

    Joyrider

    Joined:
    Aug 31, 2012
    Posts:
    27
    Hi,

    Video compression works like a charm with the x264 codec,
    the audio on the other hand causes me some worries.

    Is there a way to configure the audio compression? Cause at this point I don't have the impression it get compressed at all.
    Video compression is doing great, I get about 1 Mb for a minute,
    but when I add sound recording it jumps up to 12Mb...
    which is kind of a dealbreaker for a file that is meant to be sent by mail just after recording is done.

    If you have any ideas or suggestions?
     
  13. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
    i might be missing a trick here, but i'm trying to record just a section of my screen, i can see i can change width and height of recording....but start position...it's always 0,0. anyway to make it custom.

    Ta.
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Kyle, I see you're based with us in Manchester :) Currently SceneMovieCapture only captures the entire screen. Setting width and height sets the output size of the video file. We hope to add section of screen capture in the next release though. If you need it now then you could try using CameraMovieCapture and entering that portion of the screen to a separate camera.

    Hope that helps
    -Andrew
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Joyrider! There currently isn't a way to configure the audio codec. We've completed the code for this though and it'll be released in the next update. If you would like an early preview I can arrange that. PM or email me.

    -Andrew
     
  16. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
    my client needs to record a webcam feed that i've placed with unity's Webcam Texture, i was displaying it using GUI.Texture. Thus the reason for using SceneMovieCapture as it does GUI.

    I've working on a work around to display the webcam as a RenderTexture (or GUITexture) not got that far yet, but i'm having the 64kb problem that joyrider had earlier. Was there any news on why that happened?
     
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Kyle, Which codec are you using? Some codecs do give problems with the encoder. X264 in particular I know works best with the 'virtualdub hack' option ticked and 'zero latency mode' ticked. XVid needs to have the 'display encoding progress' option disabled. Let me know which codec you're using :)
     
  18. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
    Unfortunately i got pulled onto something else last week. Back on this today. My current setup is a camera and a plane on their own layer. Plane Scaled to 16:9 aspect and the camera rect to the same format. (my webcam is a 1080p) then using the renderer i render the webcam texture onto the plane. I have the CameraMovieCapture script attached to my camera.

    I'm using the x264cfw codec, i've gone into it's settings and ticked the virtualdub hack and zero latency boxes. Still 64kb. Will keep at it this afternoon, report back any findings.

    I will need to playback the video within unity, using AVPro Windows Media asset.
     
  19. thetnswe

    thetnswe

    Joined:
    Aug 23, 2010
    Posts:
    46
    Is that possible to record the audio coming out from Unity it self (InGame Audio) and not using external mic or something? I need to record the audio from Unity game and currently I have to select my mic device which could be something like my webcam microphone to record the audio and the quality is really bad.
     
    Last edited: Dec 4, 2012
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Kyle, do the demos included with the asset work? Perhaps work from the demos as I'm not sure why your recording isn't working. We also have a demo that records directly from the webcam in the upcoming release which may help you.
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Currently we only support recording from audio input devices on your system and not directly from Unity. Most audio hardware however has a special type of audio input which contains the audio from the speakers. This can be configured in your audio settings and will allow you to record audio directly from the game. We write a bout this in the FAQ section of the plugin documentation. We're working on direct Unity recording though and hope to have the feature in the near future.
     
  22. thetnswe

    thetnswe

    Joined:
    Aug 23, 2010
    Posts:
    46
    Thanks for the reply... Does this plugin works inside Unity 4.0? I made a build on Unity 4.0 and the video wasn't rendered correctly.
    Cheers
     
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We will be releasing Unity 4.0 support shortly.
     
  24. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Version 1.8 with Unity 4.0 support has been released :) Find it here.
     
  25. AndrewRH

    AndrewRH

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

    We have a new version of AVPro Movie Capture that will be released soon which supports: direct audio capture from Unity!

    This means you no longer need to have a sound card that supports 'loop-back' mode to record audio from your game into AVI videos.

    I hope that is good news for people :)
     
  26. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Thats great!! Keep on doing the good job :D
     
  27. norbykov

    norbykov

    Joined:
    Jul 27, 2010
    Posts:
    23
    Hi Andrew,

    There's something weird happening when using the movie capture along with your live camera and quicktime plugin, but maybe not even related with them, I don't know. What happens is that when I press a button to record the movie, the screen goes blank, flickers, goes blank, flickers, goes blank again, then returns to the scene, and starts the capture normally. The flicker is very much noticeable, it lasts a couple of seconds, and it really is annoying. Do you have any idea whatG this might be? The video card is an nVidia GeForce GT 525M. On another PC, (ATI Radeon Mobility HD5470 I think) there is only one small "blink", and the capture starts. It's not as noticeable, but if it's possible to get rid of it, I wouldn't mind. :)

    Thanks for your support!

    N
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    The good news is that I do know what the problem is :) Basically there's a conflict if you try to use multiple plugins as they all use the samee GL.IssugPluginEvent() message. We're working on a fix for this and should have it out by today or tomorrow. I'll post an update when it's out!
     
  29. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Version 2.0 is has been released!!

    Changes in this version:

    + Added audio recording directly from Unity
    + Fixed GL.IssuePluginEvent() conflict bug with other AVPro plugins
    + Fixed DX11 recording in Unity 4.0
    + Fixed bug in audio codec listing
    + Renamed and restructured code

    Hope you enjoy the new version :)
     
  30. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    This has been fixed in the latest release. You'll need to get the latest versions of the AVPro assets you're using.

    Thanks,
     
  31. norbykov

    norbykov

    Joined:
    Jul 27, 2010
    Posts:
    23
    Excellent, thanks Andrew!
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Unity 4.1 was released today and the current release of our plugin doesn't work with it yet. We are working on the issue and should have a new version out in a few hours. Thanks for your patience :)
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Pleased to say that the plugin has now been updated on the Asset Store to support Unity 4.1 and we also fixed a few other issues with other versions of Unity!
     
  34. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Price now reduced to $50 :)
     
  35. Cripplette

    Cripplette

    Joined:
    Sep 18, 2012
    Posts:
    66
    Hi,

    My company bought this asset because we needed to capture and encode video. And this nice asset did it very nicely.
    Otherwise we needed to capture a video at an higher resolution that the one displayed, so we had to render the camera in a bigger texture at the target resolution, and this is this texture that the plugin captured. You might add this feature in the plugin.

    Codec configuration was a bit tricky, but now it works nicely.

    We bought the asset like 1 month ago when it was still 100$ but it was already worth the price.

    Thanks.
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for the kind words Cripplette :) I'm glad you're so happy with the plugin! It's an interesting idea to render the scene to an extra large RenderTexture and then capture from that! It would certainly help with anti-aliasing but i'm not sure whether peoples machines in general would be able to cope with it. We'll mull it over for implementation :) If you have any other comments/suggestions do let us know.
     
  37. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Hi,
    A while ago I checked out the version where a preset FPS could be set. I noticed that functions different from what I tought it would do. On a slow pc I can render at 25fps. But the result is a the same slow rocking view with 25fps.
    I'm looking for a solution, where slow pc's (lets say 5 fps realtime) have the same output as fast pc's. So a preset path where the the slow pc (5fps) renders 5 times longer for the same movie as a fast (25+ fps) pc. So both an fluid movie as output like any 3D render engine.
    I hope I'm discribing it well enough. Is this already possible, or will it be possible?
     
  38. markjp

    markjp

    Joined:
    Jan 15, 2013
    Posts:
    3
    Hi,

    I have a problem.
    I need my game to run close to 60fps, but the video to be recorded at only 15fps.

    My settings are:
    Codec: "Lagarith Lossless codec"
    Framerate: Fifteen
    Realtime: false

    I have a spinning cube in front of the camera (using Time.deltaTime).
    When AVpro is recording, the cube rotates faster. When recording ends, the rotating speed go back to Normal.
    The video generated by AVPro shows the cube spinning at normal speed.

    In short, AVpro is accelerating the game during recording.

    How do I fix that?
     
  39. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    Hi,
    I'm trying to record video and audio from webcam (video being post processed first). Recording works fine (Xvid + mp3), but audio is out of sync (video is a bit delayed). Is there a way to fix it? Is it possible to delay audio somehow?
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Proso, sorry I took longer to reply than usual - have just been a bit busy.

    I believe the feature you're describing already exists. You can set the recording mode to non-realtime (untick realtime option) and then it will record each frame as soon as you give it and you'll end up with a smooth 25/30fps recording. You have to control the rate at which you update your scene, so when using this mode you may want to set the Time.captureFramerate value.

    I hope that helps. We will try to make a more out-of-the-box demo/preset for this scenario in the next release.
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi mruce. There isn't currently a way to delay the audio - this is something we'll look at fixing in a future release.

    Thanks,
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    It accelerates because you have the realtime option set to false. With realtime disabled it will encode as quickly as it is fed frames.
     
  43. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    AndrewRH, I need this feature rather soon - how do you plan to do it? I may try to do it my myself, just don't have an idea.
    Actually, I was thinking about playing mic audio in unity - and then 'buffer the audio buffer'; however I've found out that if done that way, audio - not video - becomes delayed. I could buffer video then - but I'm not sure, if it's a way to go, so - again - do you have a plan on how to achieve that?

    Thanks,
     
    Last edited: May 23, 2013
  44. ChadAsbj

    ChadAsbj

    Joined:
    Jun 7, 2013
    Posts:
    1
    I'm having very similar issues to KyleHatch85. I can get the camera to record if it is the main camera, but anything else ends up with the 64kb blank video file. Also attempting to do an embedded webcam feed, but for some reason when the recording is working I can't seem to get my FPS above 15-18. Tried a variety of codecs (Logarith, x264, etc) with no discernible improvement. You guys mentioned option check boxes for some of the codecs, I believe it was x264 specifically, but I'm not sure where those configuration settings are located.

    I tried to work from the demo scenes, but the webcam one specifically is throwing an error at me:
    Code (csharp):
    1.  
    2. NullReferenceException
    3. UnityEngine.Texture.get_width () (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/Graphics.cs:682)
    4. AVProMovieCaptureFromTexture.PrepareCapture () (at Assets/AVProMovieCapture/Scripts/AVProMovieCaptureFromTexture.cs:120)
    5. AVProMovieCaptureBase.StartCapture () (at Assets/AVProMovieCapture/Scripts/AVProMovieCaptureBase.cs:424)
    6. AVProMovieCaptureGUI.MyWindow (Int32 id) (at Assets/AVProMovieCapture/Scripts/AVProMovieCaptureGUI.cs:387)
    7. UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:411)
    8. UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUI.cs:1283)
    9.  
    Any help would be greatly appreciated.
     
  45. Cazual

    Cazual

    Joined:
    Dec 27, 2012
    Posts:
    21
    Hi, Great Component, we have 1 question though(looked through all the previous question and answers and did not find a similar one!)

    Hi,

    Great looking component, we want to know if can we can capture from multiple camera(I assume we can as you can add the component to a camera).
    If it can have you a sample scene for this included or only what is in the demo?

    Thanks

    Mario
     
  46. norbykov

    norbykov

    Joined:
    Jul 27, 2010
    Posts:
    23
    Quick question again. Is there a way to get rid of the 3-4 frame pause when we start and stop recording? Is that related to the codec we're using? I guess moving it to a new thread is out of question, since Unity can only work in the main thread (?) Cheers!
     
  47. citizen_12

    citizen_12

    Joined:
    Jun 21, 2013
    Posts:
    33
    Any news on OSX, iOS, or Android support?
     
  48. shanemarks

    shanemarks

    Joined:
    Nov 8, 2012
    Posts:
    52
    Hi Mario,

    You can definitely capture from multiple cameras but simultaneous capturing is not supported. You can either attach scripts to multiple camera and capture the main active camera or alternatively create a gameobject with the AVProMovieCaptureFromTexture and pass a renderTexture to it generated from any camera in the scene and write that to disk. There is no specific demo showing this technique , but I would be happy to walk you through it should you need assistance.

    If you have any further enquires please don't hesitate to contact us.

    Shane Marks
    Support
    contact@renderheads.com
     
  49. shanemarks

    shanemarks

    Joined:
    Nov 8, 2012
    Posts:
    52
    Hi Citizen_12,

    Unfortunately there are no plans for these platforms at this time.

    Regards,

    Shane Marks
    Support
    contact@renderheads.com
     
  50. shanemarks

    shanemarks

    Joined:
    Nov 8, 2012
    Posts:
    52

    Hi Norbykov,

    Thank you for your enquiry. There are quite a few variables that could be causing the situation you are describing, so it is hard to diagnose what could be causing it. The codec would be the likely culprit. If possible, could you send some more details (scene setup, hardware, codec information etc) regarding your setup to contact@renderheads.com and I will see if I can replicate the problem.

    Regards,
    Shane Marks

    Support
    contact@renderheads,com