Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[RELEASED] VLC Player for Unity (New: Youtube Streaming!)

Discussion in 'Assets and Asset Store' started by chassets, Feb 21, 2016.

  1. ulrose

    ulrose

    Joined:
    Sep 13, 2017
    Posts:
    1
    Hi!When I enter a RTMP URL on the demo's video path, I can play videos on my PC, but not completely match the interface, and when I use it in Gear VR, I see no response to the black screen. I wonder if I can use VLC in Gear VR? And can be expanded or developed on a VLC basis?
    Thanks!
     
  2. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hi! This wont work on the gear VR, since it is android.
     
  3. sltyslopes

    sltyslopes

    Joined:
    Jun 29, 2017
    Posts:
    1
    Would it be possible to add support for layering items over the panel that is playing the video?
     
  4. Olivw

    Olivw

    Joined:
    Jul 26, 2017
    Posts:
    1
    Hey Holzay,

    I read about implementing videos with the VLC Addon for Unity in your forum thread.

    I downloaded and installed the Addon in Unity, but don't know how to access or rather include it into a project.

    I cannot even find the VLC addon within the 'Asset Search'.

    My task is to implement a RTPS Stream from an IP camera and I am getting frustrated and feeling forlorn because of not finding any solutions for this :D

    Maybe you have some tips for me,

    best regards, Franz
     
  5. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hey Franz,

    after importing the plugin (open the asset store window in unity and navigate to it), simply read through the documentation / readme for the required project settings etc., then open one of the demoscenes, put in the rtsp url from your cam and you should be good to go.

    Best regards
     
  6. TheRobWatling

    TheRobWatling

    Joined:
    Feb 18, 2013
    Posts:
    40
    Hi,

    Is it possible to have multiple video streams?
    When I try I get the same stream played across the three I've setup even with different URLS.

    EDIT: Resolved this. Changing the Ports to be unique worked.
     
    Last edited: Mar 15, 2018
  7. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hey!
    Glad to see that you found the solution.

    In case anyone else encounters this, these steps are required for playback of multiple videos at the same time:
    • Multiple instances of PlayVLC.cs script
    • Multiple UI Panels connected to the scripts to render on
    • Each PlayVLC.cs should have a unique port, so that each instance can deliver the commands to the right vi
     
  8. TerraSafe

    TerraSafe

    Joined:
    Jan 15, 2017
    Posts:
    5
    Hi chassets !

    I'm working on a project with VLC for Unity and all the videos there are playing in 360p (360 degree videos for VR) is there a way to control the resolution maybe? Or to set a default resolution for the videos to be played?

    Thanks
     
  9. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hi. For playback, the video resolution is used. I havent seen that VLC would use a lower res for playback, yet. What exactly are you playing?
     
  10. TerraSafe

    TerraSafe

    Joined:
    Jan 15, 2017
    Posts:
    5
    For example a video like this:
     
  11. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Ok, when playing youtube, everything is handled by VLC internally, just as if you'd play it in an installed one. Have you tried replacing the VLC version with a newer VLC3? Can't test at the moment, since I'm not at home.
     
  12. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Seems that VLC only supports 720p streams for youtube. Here's a workaround to get access to the highdef video streams https://www.h3xed.com/blogmedia/youtube-info.php
    Enter the YT url there and try the links, worked for me in an installed VLC, so it should work with the plugin.
     
  13. Jasmin05

    Jasmin05

    Joined:
    Feb 5, 2016
    Posts:
    1
    Hi!
    Is it possible to stream two webcams (Brio 4k) via USB in Full HD and with 60 fps with the plugin? Would be great! I tried it with the Unity-WebcamTexture, but it's pretty laggy...
    Thanks for your help,
    Jasmin
     
  14. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hi,

    Try to open the stream by url in an installed vlc, if it works it'll work with the plugin.

    Best regards
     
  15. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Hello Christian,

    I bought your VLC plugin to use with the Texture2D streaming. I'm having a problem though. Here is the relevant section of the call stack:

    DllNotFoundException: GstUnityBridge
    GStreamer.Ref () (at Assets/VLCTextureStream/VLC for Unity/Scripts/GStreamer.cs:62)
    VLCtoGSTextureStream.Initialize () (at Assets/VLCTextureStream/VLC for Unity/Scripts/VLCtoGSTextureStream.cs:116)
    VLCtoGSTextureStream.TextureStreamPlay () (at Assets/VLCTextureStream/VLC for Unity/Scripts/VLCtoGSTextureStream.cs:232)

    In the readme, you mention that if there is an issue, downloading this and adding it should solve it.

    However, when I go there, I get "file not found" and when I try to get to your website it says "down for maintenance" :(

    Can you help me access this file? Maybe it should go somewhere more reliable?

    Also, the instructions say you need to force unity to run in DirectX 9 mode to use this in the editor, but DX9 is no longer in unity. The -force-d3d9 doesn't work anymore. Is there any way you can give us a solution that will work in-editor?

    -A
     
    Last edited: Apr 30, 2018
  16. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Ok... so I moved the contents of the "Plugins" folder of the VLCTextureStream plugin into the "Plugins" folder at the root of the project and the DllNotFoundException went away, so perhaps it was just a matter of the directory structure.

    Now when I click the "load video" button in the demo scene, VLC opens up the youtube URL (in front of the Unity Editor) and the Quad in the scene remains gray. I assume this is because Unity is running in DX11 mode. So I tried making a build, which the readme advises will always work, but as soon as I press the "load video" button in the build, I get a crash dialog box. VLC also opens the video in front of the game window.

    Is there any workaround for the DX9 issue or if I want to use this, will I have to go back to Unity 2017.2 (the last version that has DX9)?
     
  17. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Also just gave it a show in Unity 2017.1.1 in forced DX9 mode and the quad remained grey :/
     
  18. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Hi!

    If your require support, best use the contact form or support email, I don't check this thread more than once in 1 or 2 days - so this would be much faster.

    Seems there was a old readme in the texture stream zip folder, sorry. In the readme of the asset store package and on the asset store page is the proper readme. Sorry! Already fixed this.


    Please note, as it says in the description, that the extension is seperate, free and not part of the asset store package, and I cannot give any warranties for it. However I have used it myself a couple of times as did others, so let me try to help:


    1) You need to match the existing folder structure of the project, when you copy the extension into it. In assets, there must be 3 folders (Plugins, StreamingAssets, and VLC for Unity) in which the extension integrates, simply copy the plugins folder and VLC for Unity folder from the extension into the assets directory.
    folders.PNG

    2) I only have unity 2017.1 as latest version here, and internet at my current location is super slow. maybe unity changed something neccessary for playback after this version that I am not aware of. Set DX9 in player settings (uncheck Auto Graphics API and move DX9 up) for playback in editor.

    3) Use the standard settings and add a YT url for testing, works for me:
    tex.PNG


    Hope this helps, best regards
    CH

    PS: Could you please remove the link that is not working from your post? Thanks a ton.
     
  19. brorsoftstudio

    brorsoftstudio

    Joined:
    May 8, 2018
    Posts:
    1
    if vlc is equipped with youtube streaming function, i think it will be more powerful than Brorsoft 8k video player. anyway, i still use Brorsoft 8k video player now. useful.
     
  20. Gabrio

    Gabrio

    Joined:
    Jan 31, 2016
    Posts:
    17
    hi, do you know if it's also compatible with Hololens?
     
  21. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    No, sorry. Only win standalone, as it says in the description.

    Best regards
     
  22. vnikopol

    vnikopol

    Joined:
    Jul 16, 2018
    Posts:
    3
    Hi. I have questions. Is there UWP compatibility? Is there streaming HSL or RTSP support?
     
  23. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    As mentioned in the post directly above, only win standalone is supported.
    You can stream what the used vlc version in the plugin can open, you can upgrade the used vlc version easily.

    Best regards
     
  24. uty6910

    uty6910

    Joined:
    Jun 22, 2018
    Posts:
    4
    GetCurrentMonitorDesktopResolution in the PlayVlc script returns a null reference or InvalidCastException error. After running the Unity Editor, playing the video, then stopping and playing the Unity Editor again, the Unity Editor exits
     
  25. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    I already replied to you per mail ;)
     
  26. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi @chassets,

    Do you happen to know the level of latency with your asset? I am looking for something that will be <50ms is your asset capable of doing that?

    Thanks in advance.
     
  27. dallasdim

    dallasdim

    Joined:
    Jun 18, 2019
    Posts:
    3
    Hi @chassets ,

    I want to stream a 360 camera to custom RTMP server.
    I have tried your Demo version and it can normally catch RTMP stream from a normal GoProHero8.
    Can VLC Player for Unity (windows) catch the RTMP stream of the 360 camera and display it in a texture?
    I only ask you because I don't currently have the 360 camera to test it myself.

    Thank you in advance,
    Dimitris
     
  28. Bshsf_9527

    Bshsf_9527

    Joined:
    Sep 6, 2017
    Posts:
    42
    i want play security camera in HoloLens 2 , how can i do that?
    even if i want play through rtsp ,but no uwp compatibility vlc plugin, qwq ~
    so have you solve this problem now ,need you help ,thank you ;)
     
  29. chassets

    chassets

    Joined:
    Nov 27, 2013
    Posts:
    310
    Sorry, this plugin is no longer available.
     
  30. tomihr2

    tomihr2

    Joined:
    Oct 25, 2010
    Posts:
    29
    Hello, I am tring a sample scene but I only get green texture when playing video, am I missing something?
     
  31. xrglobal

    xrglobal

    Joined:
    Jan 29, 2020
    Posts:
    1
    did you every get an answer? I am trying to do the same thing.