Search Unity

Video Video on Ui-panel starts from frame -1

Discussion in 'Audio & Video' started by kanoute13, Sep 26, 2019.

  1. kanoute13

    kanoute13

    Joined:
    Apr 10, 2019
    Posts:
    5
    Hi guys,

    I attached a video in a panel and i display it through render texture.

    The problem is that when the video starts saws the last frame and after starts properly from the beginning.

    When i Debug.Log the frames OnUpdate i receive when the video is stuck that this frame is the "-1".
    Even if I do videoPlayer.frame = 2 i.e. again it plays -1 and after starts from 2.

    Does someone knows about it?

    Thank you in advance!
     
  2. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    186
    We have the same issue on some devices (windows, android) and some videos. We assume that it has something todo with the codec of the video, because if transcoding the clip inside unity and using it, it will work. Some Videos do not have the starting index allowed to be set to 0, instead 1,2,3,4 or even 5.

    We have filled in a bug report, let's see. As a ugly workaround we are currently forcing to use always frame index 5 as starting index (instead of 0)...