Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASE] RockVR - VR Capture (Efficient and Convenient Recording Video)

Discussion in 'Assets and Asset Store' started by rockvr, Sep 6, 2017.

  1. shreypareek1991

    shreypareek1991

    Joined:
    Jun 12, 2016
    Posts:
    1
    Hello
    Great asset. Just one question though. How can I change the destination folder and file name via script.
    I have settings menu wherein the user types a new destination folder and filename at run time using Unity GUI.
    How can I save to this folder?
     
  2. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    Hello! Looking good from here. A few questions if I may:

    1. Which hardware encoders does the Pro version support - is it just nvenc or do you also support AMD's vce and the intel one? If I ship this will my users be able to encode video on GPU regardless of their hardware vendor?

    2. Does the Pro version fallback to ffmpeg if it can't get a GPU encoder? Is that kind of failure even possible?

    3. Have you thought about implementing or have you implemented the new asynchronous gpu readback in 2018?

    Thanks!
     
  3. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    One more question, do you support or are you intending to support grabbing from RenderTextures instead of the frame buffer?
     
  4. vertexxx

    vertexxx

    Joined:
    May 11, 2016
    Posts:
    4
    Thanks for this asset!

    I've got the pro version and it runs without problems on Windows 10.

    1. You said before that in the pro version FFmpeg is not used for recording. But the pro asset is shipped with a ffmpeg.exe and doesn't start, if the path to ffmpeg.exe is not set correctly. I'am confused.
    2. Due to legal affairs it is not possible to distribute my Unity App with your FFmpeg. You ffmpeg.exe is configured with --enable-gpl. That means FFmpeg can't use in a LGPL manner. See the first point in https://www.ffmpeg.org/legal.html

    So I recompiled FFmpeg to fulfill the conditions of LGPL, in special I configured it with --disable-gpl --disable-nonfree and use Cisco's OpenH264 codec with binary distribution (BSD license) instead of x264 (GPL).

    But I can't get it run with my replaced ffmpeg.exe. The logs doesn't show anything.

    This is because the asset call
    Code (csharp):
    1.  
    2. ffmpeg.exe -f rawvideo -pix_fmt rgb24 -r 60 -s 1920x1080 -i - -y -preset ultrafast -pix_fmt yuv420p -vcodec libx264 -crf 18 -vf vflip -framerate 60 -tune zerolatency foo.mp4
    3.  
    and some parameters aren't supported by OpenH264, namely -preset, -crf, -tune. I think I can do a workaround by providing a bridge ffmpeg.exe which passes command line args and stdin to the new real ffmpeg.exe.

    Do you have any suggestions to do this in a more clean way? Thanks!

    Edit: I'am sorry, actual there is a log file VideoCaptureLib_Log.txt which tells exactly how ffmpeg.exe was called and that the process can't started. Hehe, I've done this by writing a little c project, which outputs the args to a txt for my own :)

    Edit2: Uff, now I'am got it. The big problem was to call ffmpeg.exe without absolute path.
    If someone is interested in it, this is the workaround to get your own ffmpeg.exe work with the asset.
    1. Replace ffmpeg.exe and copy all dependent DLLs (avcodec.dll, libopenh264.dll, ...) into Assets\StreamingAssets\RockVR\FFmpeg\Windows
    2. Open Assets\RockVR\Video\Scripts\Config.cs and edit the getter of ffmpegPath to
      return streamingAssetsPath + "/RockVR/FFmpeg/Windows/ffmpeg-bridge.bat";
    3. Put the ffmpeg-bridge.bat into Assets\StreamingAssets\RockVR\FFmpeg\Windows
    ffmpeg-bridge.bat:
    Code (csharp):
    1.  
    2. for %%a in (%*) do set last_argument=%%a
    3. %~dp0.\ffmpeg.exe -f rawvideo -pix_fmt rgb24 -r 60 -s 1920x1080 -i - -y -pix_fmt yuv420p -vcodec libopenh264 -vf vflip -framerate 60 %last_argument%
    4.  
    The first line is to get the last argument (see https://stackoverflow.com/questions...argument-in-windows-batch-file#answer-5805880). This is the path to output video.
    %~dp0 is to get the absolute path of the batch script's directory, not the working directory (see https://stackoverflow.com/questions...ent-directory-in-a-batch-file/4420078#4420078)
    The batch script redirects automatically stdin, stdout (I guess also stderr) to ffmpeg.exe. The exit code could be a problem.

    Maybe I can write a how to build FFmpeg with OpenH264 on Windows if someone is interested in it.
     
    Last edited: Jun 1, 2018
    Alex_May likes this.
  5. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    @rockvr any chance of some responses here? You haven't been in the thread since February... is support for this asset discontinued?
     
  6. CompediaDev

    CompediaDev

    Joined:
    Nov 18, 2014
    Posts:
    4
    Hello,

    We would like to purchase the plugin but we are reluctant due to couple issues.

    1.I would like to know: can it record 360 with sound?

    2. 360 recording performance issue:

    When we record in 360 our character model body passed through any other mesh attached to it (hair,cloth,accessories, etc)

    We tested it with and without shaders - problem remains.

    This does not happen when recording a regular video (not 360).

    Is this a known issue?

    We tried changing the resolution,frame rate,projection mode,camera field of view,depth, and camera location - to no avail.

    We are currently using the free version of the plugin in unity 2017.

    The problem shows when playing the video in vr player as well as in a non designated program.
     
  7. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    I'd also like to report a bug: The Pro version crashes in builds if "Start on Awake" is selected. Unity version 2017.3.1f1.

    The crash is a segfault in UnityPlayer.dll in RegisterPlugin.
     
  8. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    Another bug: In VideoCaptureCtrlBase.cs, deltaFrameTime is set in Awake(). This breaks capture frame rates if the frame rate is set at run time. Moving the assignment to StartCapture fixes the issue.
     
  9. jhavenite

    jhavenite

    Joined:
    Jun 11, 2018
    Posts:
    1
    Just wondering if this question was ever answered? I am having a similar issue where the canvas is not appearing in the recordings, making this product pretty much useless. I wish I would have checked these forums before I committed to the paid version since the developer looks non-existent over the past few months.
     
  10. ChangLei

    ChangLei

    Joined:
    Mar 19, 2018
    Posts:
    1
    Hello, I would like to ask, what should the address of the real-time video stream be filled in? Where will the video stream exist
     
  11. kodagames

    kodagames

    Joined:
    Jul 8, 2009
    Posts:
    542
    @rockvr
    Its nice to find something that may actually work for my situation.. but I have a quick question about your video capture asset.

    Would I be able to let the end user record during gameplay/runtime and output the video file?

    In other words Ive created a webGL game, in the game the user is playing, I would like automatically record a certain scene the user enters, when the scene is complete and the end user clicks a finish button I would like to output the capture video to my server, so they can watch it again at their leisure.

    Im looking for something that can record in game while the end user is playing the game and its a webGL game, does your system support doing this?
     
    Last edited: Jun 25, 2018
  12. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    Video Capture Pro is now marked as deprecated, meaning you can no longer purchase it and it is not supported. Oh well :(

    VR Capture Pro is still available for purchase, but I wouldn't buy it until you can be sure it will continue to be supported.
     
  13. Deleted User

    Deleted User

    Guest

    Where is the pro version of Video Capture? All I can find is VR Capture Pro, is that it? If so, does it allow for multicamera recording like Video Capture does?
     
  14. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    170
    It's been discontinued.
     
  15. MohsenneChaverdie

    MohsenneChaverdie

    Joined:
    Nov 23, 2016
    Posts:
    39
    One question, why camera real time position and rotation have not taken into account? E.g. VR camera cannot be recorded! It is always in the same position and rotation. Or did I do something wrong?
     
  16. MohsenneChaverdie

    MohsenneChaverdie

    Joined:
    Nov 23, 2016
    Posts:
    39
    Problem solved. I did it myself.
     
  17. unity_mWMzbW1igi9HTw

    unity_mWMzbW1igi9HTw

    Joined:
    Jun 12, 2018
    Posts:
    2
    Hello, I need to capture video and save object annotations(coordinates etc) for each frame. Thus first of all I need to save video to, say, a set of png files(one per frame). I don't see this option in RockVR, but maybe I just missed it? Please advice. Many TIA
     
  18. nikosurfing

    nikosurfing

    Joined:
    Mar 11, 2014
    Posts:
    45
    Hi, i bought your asset video capture for android. It works perfectly but feedback messages for begining of video is are really screwing the recording, how to disable feedback messages so the video is capturing without feedback text.

    Thank you for your help
     
  19. sfranzyshen

    sfranzyshen

    Joined:
    Oct 15, 2018
    Posts:
    1
    I was getting an error (something about ambiguous blah blah) when trying to import the video capture asset into my project.. I modified the Utils.cs file as such ...

    Windows 10 64bit
    Unity 2017.3.1f1

    D:\Develop\Unity\Projects\starship 1\Assets\RockVR\Video\Scripts\Utils\Utils.cs

    Code (CSharp):
    1.         /*
    2.         public static string GetRandomString(int length)
    3.         {
    4.             System.Random random = new System.Random();
    5.             const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    6.             return new string(Enumerable.Repeat(chars, length)
    7.               .Select(s => s[random.Next(s.Length)]).ToArray());
    8.         }
    9.         */
    10.  
    11.         public static string GetRandomString(int length)
    12.         {
    13.             System.Random random = new System.Random();
    14.             const string allowedChars = "ABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";
    15.             char[] chars = new char[length];
    16.  
    17.             for (int i = 0; i < length; i++)
    18.             {
    19.                 chars[i] = allowedChars[random.Next(0, allowedChars.Length)];
    20.             }
    21.  
    22.             return new string(chars);
    23.         }
     
  20. NicosPavlou

    NicosPavlou

    Joined:
    Mar 14, 2018
    Posts:
    2
    Hey guys,

    This plugin works perfectly for me. Very customisable for my own needs. However there is one thing that blocks me to be able to use it in my game.

    I have an installer for my unity project, thus the exe and Data folder is installed in ProgramFiles. The issue is that I have to grant Admin rights to the user to be able to use the Record plugin, since files are created in the root folder, and it cannot be done without permissions. More specifically: "VideoCaptureLib_Log.txt" is auto generated when you try to start recording.

    Does anybody know how to disable generating this log file? It seems that the DLL is responsible for doing that. Any advice how to progress with this issue ? :S

    Thanks for any help.
     
    Engino likes this.
  21. phil_unity464

    phil_unity464

    Joined:
    Nov 28, 2018
    Posts:
    14
    Using:

    Version 2018.2.7f1 (dad990bf2728) Personal Mon, 10 Sep 2018 10:49:10 GMT
    Branch: 2018.2/linux/editor

    I have installed VR Capture OK but when I click on the "Start Capture" button, I get:

    "FFmpeg not found, please add ffmpeg executable before start capture!"

    - even though ffmpeg is installed OK and working from the command line happily.

    I can't see anywhere to add it or paths for external applications.

    Thanks,
    Phil.
     
  22. mab73

    mab73

    Joined:
    Aug 9, 2018
    Posts:
    1
    Hi,
    I am new to coding, and I dont know much about C#.
    I would like the VR to record as soon as I hit play in Unity and stop recording when I hit stop.
    Where should I add the VideoCaptureCtrl.instance.StartCapture; and the VideoCaptureCtrl.instance.StopCapture in the VideoCaptureCtrl.cs script. What line?
    I would appreciate your help
     
  23. daeyoungkim

    daeyoungkim

    Joined:
    Jan 14, 2019
    Posts:
    1
    Hello,
    I've been using your video capture plugin in my project.
    We have successfully created a video using GPU encoding(nvidia).
    The encoded video is in h264 (native).
    Is there an option to change it to h264 (libx264)?
    Because it is stored in h264 (native) format, there is a problem that the video skip function does not work.
    Thank you and best regards.
     
  24. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    Using Unity 2017 4.21f1 personal. When I push start capture, I get this error: "StartCapture called but no attached VideoRecorder or AudioRecorder were found!"

    Where should I start?

    Thanks
     
  25. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    63
    Are there any plans to update the vive demo to use SteamVR 2.0?
     
  26. cewolfen

    cewolfen

    Joined:
    Apr 16, 2019
    Posts:
    1
    Greetings all
    i am having an issue with the Stereo format recording , i keep getting a black render ..!!
    any one managed to record Stereo videos ?!
    thanks
     
  27. RedWhaleStudios

    RedWhaleStudios

    Joined:
    Mar 12, 2019
    Posts:
    4
    Hi, I cant figure out how to get the video capture in my scene to work without freezing the game display, It all comes out fine, but I'm recording blind. I set up the video and audio capture components in the Camera (eye) and I get a still frame, as far as I can tell there isn't a difference in how the camera setup is compared to demo 1.
     
  28. RedWhaleStudios

    RedWhaleStudios

    Joined:
    Mar 12, 2019
    Posts:
    4
    Nevermind I figured it out
     
  29. cchameyr

    cchameyr

    Joined:
    Oct 4, 2018
    Posts:
    1
    Hello, I would like to report a bug behaviour on VideoCapture.cs
    I'm using the free version.
    In my case the thread
     FrameEncodeThreadFunction
    was always stopping for no reasons.
    It's not any time but in my case it happened a lot of time and I couldn't commit my work like it.

    Sometimes, coming in the first while condition of FrameEncodeThreadFunction, happens before the set of the status which is set just after the thread start. So the while is not run through.

    Fix is easy
    VideoCapture.cs line 387
    Change

    Code (CSharp):
    1.             // Start encoding thread.
    2.             encodeThread = new Thread(FrameEncodeThreadFunction);
    3.             encodeThread.Priority = System.Threading.ThreadPriority.Lowest;
    4.             encodeThread.IsBackground = true;
    5.             encodeThread.Start();
    6.  
    7.             // Update current status.
    8.             status = VideoCaptureCtrl.StatusType.STARTED;
    Into


    Code (CSharp):
    1.             // Update current status.
    2.             status = VideoCaptureCtrl.StatusType.STARTED;
    3.  
    4.             // Start encoding thread.
    5.             encodeThread = new Thread(FrameEncodeThreadFunction);
    6.             encodeThread.Priority = System.Threading.ThreadPriority.Lowest;
    7.             encodeThread.IsBackground = true;
    8.             encodeThread.Start();
    Hope i helped.
     
  30. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    415
    Hi there and thank you for this amazing asset !

    I wanted to create a portable cam to record myself in my VR scene and it has been very easy, thanks to VR Capture.

    I'm using the free version, and I have a strange issue. My camera won't record anything until I have opened the component in the inspector during playmode. As if the component editor was doing something mandatory.

    Let me add details:
    - I have a parent object with a VideoCaptureCtrl and a child with a Camera and a VideoCapture. A script of my own is executing StartCapture and StopCapture methods on the controller.
    - If I enter playmode and start the capture, the status of the controlleur seems to be correct: started, stoped, then finish (finish is kind of immediate, though), but nothing is written on the disk. I can repeat the process infinitly, it won't work.
    - If I open the game object with the VideoCapture script on it (I only open it to show it in the inspector), everything works fine from that point. I noticed that the finish status become more lazzy, as it takes some time to write the file on the disk, i suppose.

    If I enter in play mode with the VideoCapture component currently open in the inspector, the problem never occurs. It the component is collapsed in the inspector, the problem will occur until I expand it.

    Any idea of what I'm doing wrong? It is so odd I don't really know where to start.

    Thanks in advance for your support

    upload_2019-6-7_0-27-57.png
     
    Last edited: Jun 6, 2019
  31. Narendraprasath

    Narendraprasath

    Joined:
    Aug 26, 2018
    Posts:
    2
    Hi,
    I am using video capture in unity for android while I took a build its not running on the android mobile.
     
  32. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    720
    pro not available on assets store where to purchases pro version I need to remove the logo. also please provide more information is this plugin work on android?

    Best regards,
    Play_edu
     
  33. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    720
    Hi,
    Wene I try to capture screen second-time plugin not work in Window 10. if I restart app then it works but first time only. is a way to implement this type of functionality.

    I need this type of functionality If user stope capturing then the user has 3 options
    1: capture again
    2: play video
    3: go back to home page.

    Best regards,
    Play Edu
     
  34. Sebastian_Trick3d

    Sebastian_Trick3d

    Joined:
    Dec 6, 2018
    Posts:
    3
    Hello!
    So we are running into problems over here with your Video Capture asset.

    We can usually record with it on the first time, but subsequent recordings sometimes fail; what we think is going on is that the ffmpeg.exe is not running when we call VideoCaptureCtrl.StartCapture(), and so without the process running, we get a corrupted file and our recording is lost.

    We are running this on windows 10 machine, RTX 2080, Intel i9, and also are using SteamVR in the app.

    Thank you!
     
    Narendraprasath likes this.
  35. matbassi

    matbassi

    Joined:
    Sep 10, 2019
    Posts:
    3
    Hi, I have a problem with ffmpeg on OSx. when I build the app it doesn't find the path. In unity play mode it works perfect.
     
  36. matbassi

    matbassi

    Joined:
    Sep 10, 2019
    Posts:
    3
    Hi, in my Player log file i see: Fallback handler could not load library libvideocapturelib, libvideocapturelib.dylib, libvideocapturelib.so. libvideocapturelib.bundle
    In my plugins folder i see the file: VideoCaptureLib
    Someone had a similar problem and could solve it?
    Thanks in advance.
     
  37. wonderlandtech

    wonderlandtech

    Joined:
    Jan 29, 2018
    Posts:
    5
    Thanks for the great work, i managed to record the video and the audio from (Audio source, the audio clip file) how ever it's is not recording the audio from my other components. any idea? i added audio listener but it didn't seem to do any good
     
  38. mstarr

    mstarr

    Joined:
    Jun 20, 2018
    Posts:
    63
    Hi! I am developing on Ubuntu Linux (Bionic). Will this asset work for me?
     
  39. varan941

    varan941

    Joined:
    Jul 10, 2019
    Posts:
    3
    Hello, such garbage is strange. I use VideoCapture to record video in the application. In a separate canvas, there is a Raw Image for loading pictures. As a result, I record the video in the editor, everything is ok the picture is visible in the video. I write it in the build - no picture. What could be the problem? (in editor, in build)
    upload_2020-2-20_16-48-31.png upload_2020-2-20_16-49-6.png
     
  40. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    128
    Hi, I'm trying to record a 360 stereo video and I like this asset because it can handle all kinds of postprocessing I can throw at it (e.g. enviro sky volumetric effects). But I have some problems:
    - Can I do anything to improve the bad stereo up close (and on the trees)? There's a 1-2 meter range close to the camera in which the stereo is very wrong. (see attachment)
    - Can I just record a 360 screenshot!? Why is it only ffmpeg video and not just frames as .pngs?
    - I followed the PDF and I can't get it to record audio. Does it do anything weird with fetching references from audiosources at runtime?
    2020-03-02-11-33-06-F5QNG.jpg
     
  41. ktshazzer94

    ktshazzer94

    Joined:
    Jun 16, 2020
    Posts:
    1
    Hi, I'm using the free version of Video Capture and I am struggling to get both the video recorder and the audio recorder working at the same time? I've got video working fine, but when I click 'record' with the save folder open I see the .wav file appear but as soon as I click 'stop recording' the .wav file disappears from the folder? Would you please be able to help me? Thanks.
     
  42. Zeesy

    Zeesy

    Joined:
    Feb 16, 2017
    Posts:
    5
    I'm trying your free version on v 2020.1.0f1. When I press play, no capture button comes up and no video files are saved to the specified folder. There are no errors logged to the console. Here's the folder tree in my project panel:
    upload_2020-7-28_20-49-25.png

    This is the VideoCaptureCtrl object in my Hierarchy. Is is not the child of any other object:
    upload_2020-7-28_20-56-34.png

    This is the set up for VideoCaptureCtrl:
    upload_2020-7-28_20-55-28.png

    Here is the set up for DedicatedCapture in the inspector:
    upload_2020-7-28_20-51-12.png
    upload_2020-7-28_20-51-54.png

    Please advise if I have any incorrect settings, or if there is a conflict with the new version of Unity.
     
  43. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    151
    Windows 10 I9 RTX 2080. No record button in my scene play but demo shows play button. If one reads this whole blog one can see there are no answers forth coming. Many have requested refunds after waiting weeks for no answers. A blog is a terrible way find answers but I am glad I read this. Uninstall and Buhbye! On the uninstall there are obsolete api hooks. Devs are not keeping up.
     
    Last edited: Aug 21, 2020
  44. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Hi,

    @rockvr Is there any plan to support fmod listeners instead of audio listeners?

    Cheers,
    Sébastien
     
  45. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    By the way, if someone if having problems with recording videos when the time scale is different from 1, here's how I fixed it:

    upload_2020-9-6_20-28-31.png
     
  46. JMCamacho

    JMCamacho

    Joined:
    Oct 3, 2018
    Posts:
    3
    SteamVR 2.0 not supported. And looks like the developer is not working in any more releases... what a pity, I thought it would be a very useful plugin.
     
unityunity