Skip to content

This project provides scripts to setup a Raspberry Pi to send video and audio inputs (HDMI, camera, microphone) wirelessly using gstreamer to e.g. OBS

Notifications You must be signed in to change notification settings

eventstrive/wireless-pi-streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wireless Pi Streamer (WIP)

This project provides scripts and all instructions to stream HDMI inputs, USB webcams and audio inputs over the network for use in OBS.

TODO

  • Automated + interactive setup script for Pi
  • Setup scripts for Windows and macOS
  • Ability to stream HDMI and camera audio
  • Sync video and audio streams by timestamp

Setup

Streaming PC

  1. The streaming PC has to have a unique IP address in the same network as the raspberry pi so that all Pis can stream directly to this IP.
  2. Install gstreamer including all necessary plugins

OBS

For OBS you will need the obs-gstreamer plugin to receive all media streams.

Raspberry Pi

  1. Enable SSH
  2. Set up password and wifi for Raspberry Pi
  3. Install gstreamer including all necessary plugins
  4. Setup environment variables for the Exact host and port, Cam ID (which generates hostname and the IP address range 50{CAM_ID}x)
  5. Configure streaming scripts for autostart

Stream Instructions

HDMI Input (Screen or Professional Camera)

To stream an HDMI input we are usign a USB HDMI Capture Stick which make the HDMI input available via a new video and audio input.

The stream already has a low latency (I read about 200ms) but for an even lower latency it might work to use a HDMI to CSI-2 bridge with the instruction for the Pi Camera or to use another and more expensive streaming card which has lower latency.

The latency for the mentioned streaming stick can be reduced by changing the resolution to 720p instead 1080p.

Raspberry Pi:

./stream-mjpeg.sh

OBS GStreamer Source

udpsrc port=5010 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! video.

USB Webcam

A USB webcam like the Logitech C922 makes the video input available using an x-raw video stream. For this you need another script than for the HDMI input.

Raspberry Pi:

./stream-raw.sh

OBS GStreamer Source

udpsrc port=5010 ! gdpdepay  ! rtpvrawdepay ! videoconvert ! video.

Pi Camera

For the Pi Camera there already is another project which provides a script including instructions for OBS.

Audio Input (WIP)

To stream an audio input we are usign a USB audio card which is natively supported by Raspberry Pi OS.

Raspberry Pi:

./stream-audio.sh

OBS GStreamer Source

udpsrc port=5011 caps="application/x-rtp" ! rtppcmadepay ! alawdec ! audio.

or

udpsrc port=5011 ! "application/x-rtp,media=(string)audio, clock-rate=(int)48000, channels=1, payload=(int)96" ! rtpjitterbuffer latency=35 ! rtpL24depay ! audioconvert ! jackaudiosink  buffer-time=35000

Port overview

The x in the port stands for the specific Raspberry Pi. Each Pi should get an unique ID to avoid port collisions.

  • 50x0 - video
  • 50x1 - audio

About

This project provides scripts to setup a Raspberry Pi to send video and audio inputs (HDMI, camera, microphone) wirelessly using gstreamer to e.g. OBS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages