Skip to main content

Capture a video using the virtual screen in Google Colab & broadcast the live stream to youtube/twitch.

Project description

Video Streamer

Live stream the training process of ML-Agents (toolkit for Reinforcement Learning with Unity Engine) using the virtual screen from Google Colab to Twitch.


Try Google Colab Notebook

colab link


Installation

!pip install mlagents-video-streamer
  • Configure the video streamer.

    import videostreamer
    videostreamer.config()
    
  • Activate the twitch streamer.

    xorg, ffmpeg = videostreamer.twitchStreamer('<your-twitch-secret-key>')
    
  • To capture the running process, use the subprocess library.

    The below example shows how to capture the training process in the case of ML-Agents:

    import subprocess
    from random import randrange
    
    train = subprocess.run(["mlagents-learn", "config.yaml", "--run-id=train-1", "--env=3DBall_example/3DBall.x86_64", "--base-port=" + str(randrange(9000, 9999))], cwd="/content/", stdout=subprocess.PIPE)
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlagents-video-streamer-1.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

mlagents_video_streamer-1.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page