Search Unity

Question Is video player inertia possible?

Discussion in 'Audio & Video' started by Funkyspectrum, Oct 4, 2021.

  1. Funkyspectrum

    Funkyspectrum

    Joined:
    Feb 1, 2021
    Posts:
    3
    we are trying to work on a game where the entire game view is made up of FMV. However, we want to be able to control the speed of the video playback in game, so players can go faster and slower obviously, or stop fully. we've found that you can jump the speed of the player in increments but the video will jump immediately to that speed, so you can jump from 0.1x playback speed to 1x and it'll just immediately start to play quicker.

    it's a vehicle that's being controlled so jumping instantly to a faster speed is not workable. we would like to gradually increase or decrease the video speed when jumping from one default speed to another. Basically like a kind of inertia effect, I suppose.

    for example, when going from 20% to 40% speed the speed change is recognised by unity and the player will gradually start to speed up in x amount of time until it reaches 40% speed, instead of just instantly being at 40% speed. Same with a full stop, currently you can go from 100% speed to 0% speed. full stop. what SHOULD happen is that the movement would continue with inertia until it comes to a stop. we have looked a lot at the documentation relating to the video player and we cannot find anything about this or anyone who seems to have attempted to do this but the thing we are wanting to create basically hinges on this.

    we would be really thankful for any help with this as we've completely hit a brick wall.

    also as an aside is h264 still the preferred rendering codec for videos to import into unity ? we want and need the video playback to be as optimised as possible.

    thanks a lot in advance to anyone who can help and hello unity forums !
     
  2. Funkyspectrum

    Funkyspectrum

    Joined:
    Feb 1, 2021
    Posts:
    3
    no-one can answer this ?
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438