Search Unity

Question Play Live Videos in Unity

Discussion in 'Virtual Production' started by c_martinz, Feb 28, 2023.

  1. c_martinz

    c_martinz

    Joined:
    Feb 28, 2023
    Posts:
    5
    Hi everyone!

    For a bit of context; I am developing a VR app in Unity in which I want to display a 360 video that will be playing live from a website.

    The setup of the scene is pretty straightforward, but for the playback of the content it is taking me quite a bit longer than I thought it would. Unity's Video Player (and some other players I've tried from the Asset Store) play content from web pages as long as what is in the URL is the video file itself. A link to a youtube video, therefore, would not work. And, if what I want to show is a live video, which in principle is a content that is being produced at the moment so there is no reference file (I might be completely wrong here)... is it even possible?

    I've been wandering around different forums and haven't found the solution, so I apologize if it's already been solved somewhere.

    Thanks!
     
  2. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    What we support today in the VideoPlayer is progressive download. This means you have a prerecorded file and can stream it over the internet. This should work, but as you mention, we need the direct link to the video, so you can't just put Youtube URL.
    From what I understand, you are looking for either HLS, Dash or RTMP, which we don't support right now, but we have a WebRTC package. The former is better for streaming films, movies and games with higher image quality, while the latter is better for communication where adding delay is pretty bad. So maybe not what you are looking but I thought I should mention it.

    While we don't support it right now, it is definitely something we want to support in the future. You can check what we are thinking to work on here https://unity.com/roadmap/unity-platform/audio-video. Be sure to vote on any idea you want to see and share any other ideas. It really helps us prioritize future features. I hope it was helpful!
     
    Last edited: Feb 28, 2023
  3. c_martinz

    c_martinz

    Joined:
    Feb 28, 2023
    Posts:
    5
    Thank you very much @The_Island ! Understood it perfectly.

    Yes, we're looking for HLS. As you suggested, I left my vote on Live Streaming in Audio-Video roadmap section.

    As we need a solution for now, I kept searching and found a player for Unity called "NEXPLAYER", which is listed as a Unity Verified Solution. It looks like it supports HLS and could work for what we want.

    Once I have tested it, I will update the thread for anyone who might be interested.

    Thanks again!
     
  4. HamidMac

    HamidMac

    Joined:
    Sep 18, 2019
    Posts:
    15
    sorry to bother, have you tested it or found any other solutions? @c_martinez