Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

VideoPlayer URL mode cannot play with the correct format with http:// protocol

Discussion in '5.6 Beta' started by kdu_timeplay, Dec 15, 2016.

  1. kdu_timeplay

    kdu_timeplay

    Joined:
    Sep 1, 2015
    Posts:
    2
    The source if I download to local, the video will play fine with file:// protocol.
    But if you play via http://, you wont get the correct image, seems like the target frame size and color is wrong.
     

    Attached Files:

    Yode_group and Play_Edu like this.
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    We are aware of this problem, which is filed as bug #86119. This will addressed it in an upcoming beta. Sorry for the inconvenience!

    Thanks for testing out the VideoPlayer. If you're in a position to test with the OSX version of the editor, the bug doesn't appear on this platform.

    Dominique
     
  3. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    I have same issue.
    using window 10 pro;
    Unity Version 5.6.0b1; and build not working .
     
  4. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
  5. uryokesh

    uryokesh

    Joined:
    Oct 6, 2014
    Posts:
    6
    I am having the same issue reported above even with the http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4 . Issue happens only when playing videos in URL mode that too specifically when from a webhost. I tried pointing to a network folder //network-shared-Folder/big_buck_bunny.mp4 video works fine.

    Unity Version Tested: 5.6.0b3
    Video Cards Tested: AMD FirePro W5100 and NVDIA Quadro K2100M
    OS: Window 7

    I have few questions regarding this new Video Player

    1. Is GPU accelerated video decoding is enabled by default for this or do we have to turn on any setting to get hardware acceleration for video decoding?

    2. We want to stream live videos from local camera, does this support such streaming with hardware accelerated decoding?

    3. Is there a specific video types of video card we should be using to get GPU accelerated video decoding?
     
  6. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hey everyone!

    I had time today to look at the http:// streaming situation on Windows and found a couple of issues that explain what you are observing. I've fixed them and I'm in the process of integrating this into out mainline. Not sure yet what beta this will end up going into, but you can stop wasting time on this. The bug id is 861191.

    Sorry for the trouble and thanks for the reports.

    Dominique
     
  7. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hardware acceleration is always enabled when available. It isn't always possible for us to know exactly how much hardware acceleration is happening because the native APIs in use don't reveal it. For instance, we use the Android native API to decode videos, but it may very well provide a software implementation without telling anyone if for some reason the decoded video doesn't fit the definition of what is supported for the given hardware/OS combination at hand.

    One place where we consistently get hardware acceleration is for the YUV to RGB conversion. Movie files typically have their video tracks stored using YUV color space, and we systematically perform this conversion on the graphics hardware.

    At this point, you can stream from http:// and https:// URLs, provided the full URL ends with the container name (e.g.: http://some/path/to/stream.mp4). We use the extension to decide what decoding back-end gets used. Right now, the URL cannot have a query-string (e.g.: http://some/path/to/stream.mp4?quality=medium) but this will get fixed in an upcoming beta. The one scenario we don't yet have a solution for is for URLs that don't reveal the container type at all (e.g.: http://path/to/stream). Not sure yet how/if we'll address this for 5.6.

    Other types of URLs may be supported on certain backends (e.g. rtsp:// or rtmp://); we may have time to run some tests and enable these if they do work.

    I'm assuming you are asking for Windows, using H.264 video (let me know if I'm wrong). On this platform, the most important variable is the Windows version. The native API is the same regardless of version, but has different limits depending on the Windows version. So the closer you are to Windows 10, the higher the resolution that can be accommodated by the hardware acceleration.

    Note that the VP8 codec (done in software everywhere except on WebGL and Android) is not subject to these limitations, so for this one only the CPU speed is the limiting factor.

    We'll provide adequate guidelines with the user documentation, but feel free to ask for details in the mean time; it'll help tuning the doc.

    Hope this helps!

    Dominique
     
  8. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Thank . i Wait till next release and can This player also Work in Linux?
     
  9. uryokesh

    uryokesh

    Joined:
    Oct 6, 2014
    Posts:
    6
    Thanks Dominique for the detailed reply. Yes we are trying to get live stream (camera) video decoding work with hardware acceleration in Windows 7 embeded with AMD E8870. Its going to be a H.264 video. while running initial test in the new Video Player both with the video as part of the build as well as from a network shared folder I am able to witness more CPU usage in Unity 5.6.0b3 VideoPlayer compared to the Unity5.3.6f1 MoviePlayer.

    Thats the reason if we have to enable any special setting to force hardware accelerate decoding. This test was conducted with 8 videos simultaneously being decoded at the same time in both Unity 5.6 and Unity 5.3.6
     
  10. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Seems if i set the URL of the video to be played from code, it doesnt play it, only if i set the SAME URL in the inspector it plays (Browser WebGL version).

    Anybody knows why? Im using Unity 5.6.0b4
     
  11. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    I haven't actually checked the video player in 5.6 but is it possible to seek to a certain time on a url video stream?

    can it retrieve the full length of a url video stream?

    and buffering is it possible to find out if the player is having trouble buffering in a certain high quality video stream url and if so switch it to using a low quality url?