Search Unity

Video Videos loaded via URL on android are always cropped

Discussion in 'Audio & Video' started by Desoxi, Feb 14, 2018.

  1. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    195
    Hey all,

    we currently are using the videoplayer to playback some videos inside the unity ui. The videos are inside the StreamingAssets folder and are added to the player via the URl and it works like a charm inside the editor.
    The problem is, that we are using this on android as well and thats where the problem starts.
    The video is played, but no matter what i try it is always croppped (mostly the bottom side).

    I tried the following things with no resolution of the issue:

    1. Every single aspect ratio setting you can choose in the videoplayer component (it changes the scaling yes, but its cropped in all of them)
    2. Using a separate rendertexture with all kinds of resolutions (full hd, the exact video resolution, the ui objects resolution and all of them combined with the things from #1)
    3. Not using a separate rendertexture but assigning the temporary texture, which the videoplayer created while preparing, to the raw image component like rawImage.texture = videoplayer.texture (it has to happen before you play but after the preparation is complete, else there wont be a texture in the videoplayer). This way the temporary texture which is created has always the exact size of the video its provided with (at least inside the editor)
    None of these steps showed me the video how it really is. It was always cropped.

    But i also tried (just to be sure) to use a videoclip from the assets folder instead. And that worked. But that is no option for us as we have a S***ton of videos in our project, which we are going to load as zip packages and unpack them as a workaround for the missing assetbundle funcitonality regarding videoclips.

    Hope someone has a good idea or maybe knows whats happening!

    P.S.: We are using Unity v2017.3.1f1
     
  2. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    195
    Alright guys, after all it seems to be a problem related to the videofile export.
    Our artist exported the files using adobe encoder but one setting caused this issue.
    Somewhere in the settings she set the option to progressive and now it works like it should.
    I added a screenshot of the settings page:
    screenshot.png

    Hope it helps someone else with the same problem (although its german :D ).

    Greetings,
    Desoxi