VideoPlayer - reverse footage or negate playrate?

Hey guys,

I’m working on a new project focused on 360 footage for a VR experience. For the project I’m using the newer VideoPlayer from 5.6, which works great aside from one issue I’ve found: there doesn’t seem to be a way to reverse the footage or adjust the playrate (which doesn’t seem to go below 0) to a negative value.

I’ve come up with a glitchy work around for reversing the footage which involves setting each frame manually, but this looks awful and definitely couldn’t be released for use. I’ve also considered creating duplicates of the footage that are reversed, but this isn’t a great solution when the footage is all 4k and 8k.

Is there a way to reverse the footage? Or to negate the playrate? Or any other solution someone has?

This is definitely a priority on this project and any help would be a lifesaver.

Thanks, Z

Hi Z,

I’m not familiar with the new VideoPlayer, but looking at the scripting API (Unity - Scripting API: Video.VideoPlayer.playbackSpeed) you would need the playbackSpeed property. Note that the above page mentions that negative playback speed might not be supported depending on your platform (I can also imagine that it isn’t supported for certain video formats).

If that is the case, then you would either have to manually set the frames (as you also mentioned), or use a plugin from the Asset Store, like AVPro Video.

Hope this was of help!

stopped my player then did framerate subtraction in update. Pseudo script below

void Rewind() {
    _rewind = true;
    videoPlayer.Stop();
}

void Update() {
    if(_rewind == true) {
        videoPlayer.frame--; // can get fancy here if you want, this is super basic
    }

    if(videoPlayer.frame <= 0) {
        _rewind = false;
    }
}