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

Question VideoPlayer and UnityRecorder

Discussion in 'Audio & Video' started by sykubosykubo, Jun 26, 2020.

  1. sykubosykubo

    sykubosykubo

    Joined:
    May 16, 2020
    Posts:
    1
    Hello
    I want to record a video sequence with UnityRecorder with VideoPlayer.
    When I press the record button, the video sequence of the Video Player does not play and does not work well.
    If I reduce the recording size of Unity Recorder, the video sequence can be played and recorded awkwardly.
    But antialiasing is useless because it is dirty and the video sequence is not smooth. ..

    Is VideoPlayer and UnityRecorder compatible?

    Or is there a valid plugin?


    Please help if anyone has a solution.
    Thank you!
     
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    The VideoPlayer and the Unity Recorder are not generally compatible because the VideoPlayer does not support the use of Time.captureFramerate and this is how the recorder changes the execution speed to perform non-realtime rendering.

    However, there is one limited workaround that may work for you if you don't need the audio from the VideoPlayer. The workaround consists of advancing the VideoPlayer using its StepForward method. This allows you to gain relatively precise control of how fast the frames are advancing in the VideoPlayer. So, assuming you are advancing at the speed at which the clip is intended to play, you will get the correct result in the recorder output.

    Hope this helps,

    Dominique Leroux
    A/V developer at Unity
     
  3. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
  4. cp-

    cp-

    Joined:
    Mar 29, 2018
    Posts:
    78
    For future reference: I don't know about exact frame accuracy but I was able to get rid of jerky video playback in my recordings by just disabling skipOnDrop.