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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Stream a live video from the game to a web browser

Discussion in 'Scripting' started by Lisi, Jun 3, 2015.

  1. Lisi

    Lisi

    Joined:
    Apr 8, 2014
    Posts:
    22
    Hi!
    What I am doing now is capturing every frame of my game and making a video by using ffmpeg and then link it to a webpage, but I would like to directly stream the video so that I can access it via a Webbrowser via html video tag or something like that. Can anyone help me with this? I searched a little bit, and ffmpeg does not support a video server functionalty in Windows. What else can I use?
    Best,
    Elisabeth
     
  2. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    You can use third-party services like Twitch.tv to help you stream your game.

    Grab a unityproject here https://github.com/mpoon/twitchbins

    The problem is that it's not tested and it's 2 years old. But since it's open source you can update it.
     
  3. Lisi

    Lisi

    Joined:
    Apr 8, 2014
    Posts:
    22
    I would like to to this also when there is no internet connection. So if there are just a few people in the same network that want to connect to the live stream.
    As far as I can see that is not possible with Twitch.tv, is it?
    Best, Elisabeth
     
  4. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    There is a small paradox you're creating: you want to stream your game without internet connection to people who are connected in the same network. In order for them to connect to the same network they would need internet connection.
    I don't understand...
     
  5. Lisi

    Lisi

    Joined:
    Apr 8, 2014
    Posts:
    22
    oh sorry. What I mean is that I want to have a server directly on the computer, where Unity is also running, so that I do not have to register somewhere. I save a image to a video stream every 1/24 sec and want to stream this video. I looked into ffmpeg and icecast, but I don't get it to run. So I am searching for an alternative.
     
  6. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    I am afraid I can't help you. As far as I know you need to get someone to write server side scripts in order for Unity to communicate with your server properly.

    That sounds quite interesting though.