Search Unity

Stepping through the frames of a mp4

Discussion in 'Scripting' started by JoakimOlsson, Aug 5, 2019.

  1. JoakimOlsson

    JoakimOlsson

    Joined:
    May 20, 2019
    Posts:
    11
    I need to add overlay data to a mp4 video clip. My first thought was to use Unity's VideoPlayer and step through the video clip one frame at the time. Unfortunately it does not seem like setting the frame does not immediately set the frame and using StepForward() does not update the frame until the next Update() (despite what the documentation say).

    Playing the video and inspecting the frame / time values using a breakpoint the values are never updated, despite the video being played as being observed in the game window.

    Is is bugged or am I missing something? What other options, including plugins, exist?
     
  2. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    It does seem buggy - Im having problems using StepForward on a MP4 and having it being able to loop (when my playback speed is 0). Does anyone know how I can do this? Im basically using a MP4 video as a video 'Powerpoint' while in VR and need it to be able to advance frame by frame...