百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

raspberry_ninja

> 开发工具
开源

使用 Python (Raspberry Pi、Linux、Mac、Windows WSL) 发布或捕获 VDO.Ninja 流

198 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

使用 Python (Raspberry Pi、Linux、Mac、Windows WSL) 发布或捕获 VDO.Ninja 流

Raspberry Ninja - not just for Raspberry Pis!

Turn your Raspberry Pi, Nvidia Jetson, Orange Pi, Windows PC, Mac, Linux box, or nearly any Python-compatible system into a ninja-cam with hardware-acceleration enabled! This lets you publish live streaming video and audio directly to your web browser or OBS instance using VDO.Ninja. Achieve very low streaming latency over the Internet or a LAN; all for free.

New to Raspberry Pi? Use the short Quick start. It can set up a camera sender or unattended TV receiver without choosing codecs or writing a service file.

It also has the ability to record remote VDO.Ninja streams to disk (no transcode step), record multiple room participants simultaneously, broadcast a low-latency video stream to multiple viewers (with a built-in SFU), and because it works with VDO.Ninja, you get access to its ecosystem and related features. There are other cool things available, such as AV1 support, NDI output, OpenCV output, WHIP, HLS recording, fdsink output, and V4L2 sink output for virtual cameras.

Table of Contents

  • Preface
  • Install options
    • Quick Install (Universal Installer)
      • Non-Interactive Installation (Basic)
      • Interactive Installation (Full Setup)
    • Setup for a Raspberry Pi
    • Setup for an Nvidia Jetson
    • Setup for Linux Desktops
      • Requirements for linux systems in general:
    • Setup for Windows (WSL)
    • Setup for Mac OS X
    • Generic quick-install method
  • Updating
  • Usage
    • Adding an audio source
  • Documentation
  • How to Run:
    • Auto-starting the script on boot
    • Room Recording (Pull Mode)
      • Basic Room Recording
      • Single Stream Recording
      • Selective Room Recording
      • Publishing vs Recording
      • Room NDI Output
    • HLS Recording
      • Enable HLS Recording
      • HLS Playback via Built-in Web Server
      • HLS Implementation Notes
    • Combining Audio and Video Recordings
    • Recording Features Summary
    • RTMP output
    • SRT support
    • WHIP / Meshcast support
    • Custom Gstreamer audio/video source pipeline
    • NDI support
      • Single Stream to NDI
      • Room to NDI (VDO.Ninja to NDI)
      • NDI Direct Mode (Default)
      • NDI Combiner Mode (Optional)
      • NDI Installation
      • Room Join Alerts (Webhook / Notify Topic / GPIO)
    • OpenCV / Tensorflow / FFMPEG / FDSink / Framebuffer support
    • V4L2 Sink (UVC gadget/virtual camera)
  • Hardware options
    • Camera options
    • 360-degree cameras
    • HDMI Input options
    • MIDI options
  • Audio Recording and Transcription with record.py
    • What it does
    • Installation
      • 1. Install System Dependencies
      • 2. Install Python Dependencies
      • 3. Configure Whisper Model
    • Usage Methods
      • Method 1: Web Interface
      • Method 2: REST API
      • Method 3: Command Line Only
    • File Output
    • Running as a System Service
    • Configuration Options
    • Security Considerations
    • Troubleshooting
    • Example Workflow
    • Note:
    • TODO:
  • Recent Changes
    • January 2025
    • December 2024
  • Contributors of this repo
    • Discord Support

Preface

The core concepts and code used in this project can be reused for other projects; most Linux systems, and a large variety of embedded systems; potentially even smartphones. There's a focus of supporting Raspberry Pis and Nvidia Jetson systems, which includes offering pre-built images and install scripts. Other Linux system users should still be able to use the code, but setup support will be limited.

Youtube video demoing: https://youtu.be/J0qqXxHNU_c

I also have another longer YouTube video here, which focuses on setting up the Raspberry_ninja for IRL-streaming.**** Recent updates to Raspberry Ninja have added improved error correction and video redundency, along with automated dynamic bitrate controls for congestion management. This has greatly improved stream reliabilty, reducing frame loss, and limiting buffer sizes. That said, having more than 5-megabites of upload bandwidth and having a solid connection is recommend if intending to use the default settings.

Install options

Quick Install (Universal Installer)

For the easiest installation experience, use our universal installer that works across all platforms.

Non-Interactive Installation (Basic)

For a quick, basic installation that only installs dependencies:

bash
curl -sSL https://raw.githubusercontent.com/steveseguin/raspberry_ninja/main/install.sh | bash

Note: This method runs in non-interactive mode and will:

  • Clone the repository to ~/raspberry_ninja if not found
  • Install required dependencies only
  • NOT create configuration files
  • NOT set up auto-start on boot
  • NOT configure stream settings

After installation, you'll need to:

bash
cd ~/raspberry_ninja
python3 publish.py --help

Interactive Installation (Full Setup)

For the complete setup experience with configuration and auto-start options:

Option 1: If you haven't cloned the repository yet:

bash
wget https://raw.githubusercontent.com/steveseguin/raspberry_ninja/main/install.sh
chmod +x install.sh
./install.sh

The installer will clone the repository for you if needed.

Option 2: If you've already cloned the repository:

bash
cd raspberry_ninja
./install.sh

The interactive installer will:

  • Auto-detect your platform (Raspberry Pi, Orange Pi, Jetson, WSL, etc.)
  • Install all required dependencies
  • Guide you through configuration with prompts
  • Optionally set up auto-start on boot
  • Create a config file for easy re-use
  • Test your camera setup

Tip: You can also force non-interactive mode with the downloaded script:

bash
./install.sh --non-interactive
# or
./install.sh -y

See below for platform-specific install options if you prefer manual installation.

Setup for a Raspberry Pi

See the raspberry_pi sub-folder for instructions on installing and setting up a Raspberry Pi. Jump there now

Raspberry Pi performance depends on the board, OS, camera stack, GStreamer build, and media device. Pi 3/4 hardware encoding, Pi 5 software encoding, USB capture, and CSI camera paths are not interchangeable. Start with the platform compatibility guide, then test the actual source and encoder at conservative settings before increasing resolution or frame rate.

Setup for an Nvidia Jetson

Please see the installers/nvidia_jetson folder for details on installation. Jump there now

If you are using one of the pre-built Jetson images, you usually only need the lightweight helper script:

cd ~/raspberry_ninja/installers/nvidia_jetson
./quick_update.sh

Only use installer.sh when building a new image from scratch; it performs heavy package clean-up and distro upgrades that are unnecessary on top of the ready-made images.

Nvidia Jetsons work well with USB-connected cameras and have a selection of compatible CSI-cameras well. You may need to buy WiFi adapter if it is not included.

Setup for Linux Desktops

You can deploy Raspberry.Ninja to a desktop pretty quickly in most cases, without compiling anything. An installer is available for recent Ubuntu releases. Jump there now

For other distros, see below for requirements

Requirements for linux systems in general:

You'll want to install Gstreamer 1.16 or newer; emphasis on the newer. You'll need to ensure libnice, srtp, sctp, and webrtcbin are part of that install, along with any media codecs you intend to use.

Python3 is also required, along with websockets. If you have PIP installed, pip3 install websockets can get you going there.

Setup for Windows (WSL)

You can actually run Raspberry Ninja on a Windows PC via the WSL virtual machine interface. It's really quick and simple, except getting camera/hardware support going is tricky.

Still, it might be useful if you want to pull a stream from a remote Raspberry.Ninja system, recording the stream to disk or using it for local machine learning.

See the WSL install guide here: Jump there now

It is possible to install Gstreamer for Windows natively, but due to the difficultly in that all, I'm not supporting it officially at present. The main challenge is cairo fails to compile, so that needs to be fixed first.

Setup for Mac OS X

Raspberry.Ninja can even run on a Mac! Although it's not as streamlined a process as it could be, I'd say the difficulty is 4/10.

See the macOS install notes here: Jump there now

Generic quick-install method

Many modern versions of Linux distributions, such as Ubuntu 22, support Raspberry.Ninja with minimal installation effort.

The basic install script for Ubuntu-like systems is as below:

…

Package managers with old versions of Gstreamers, or with no hardware acceleration or limited codec support, may be limited in what Raspberry.Ninja can offer. For the most up-to-date and comprehensive feature set, compiling Gstreamer from scratch may be still needed.

If wanting to use AV1 streaming, you'll need to install gst-plugins-rs as well (av1parse and av1pay are needed), plus whatever AV1 encoder you wish to use.

Updating

Major updates sometimes will require that the latest Rasbperry Pi or Jetson image be installed on your device, but most updates are minor and only require the publish.py file to be updated. If you've just installed the latest device image, you will still want to update before going further, as the image is not updated with every new code release.

You can normally update by logging into your device, either via SSH, or via mouse/keyboard with the terminal app open.

bash
cd ~
cd raspberry_ninja
git pull

That's it.

If you run into issues due making changes to the code, you can either git stash your changes first, or you can just delete the raspberry_ninja folder and clone it again.

ie:

bash
cd ~
rm raspberry_ninja -r
git clone https://githu

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythongstreamerh264jetsonnumpy

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具