Stream Receiver

From BATC Wiki
Jump to navigation Jump to search

Introduction

The concept of operation is that a special "repeater input" streaming channel can be set up on the BATC Streaming Server for any repeaters who wish to implement the facility.

This stream will not be listed on the normal BATC live stream pages as it will only be viewed by the Rydestream receiver at the repeater site.

A dedicated Ryde Stream Receiver is then installed at the repeater site and set up to listen or monitor the allocated "repeater input" streaming channel only.

The Stream Receiver's video and audio output is fed into the repeater video input matrix, and the "stream active" signal is used to switch the repeater logic to show the incoming stream as if it was a normal RF input channel.

Trusted members of the repeater group are then given access to be able to stream in to the BATC server on this account and will then be able to access and send signals to the repeater using OBS, Vmix or a Portsdown in streaming mode.

Preparation

Update the Ryde receiver (must be later than 202206050).

Four new presets are added by the update; these allow selection of the GB3HV, GB3JV, GB3KM or GB3SQ streams.

Once viewing a stream, the streamname can be changed using the on-screen menu to select a different stream. However, if you regularly want to watch a different stream it is recommended that you manually edit the config file ( /home/pi/ryde/config.yaml ) to add a new preset, and perhaps delete some of the presets that you do not use.

Customisng the Red screen

The words that appear on the red background when no signal is present can, WITH CARE, be customised!

Edit the file playback.py in /home/pi/ryde/rydeplayer/states

GPIO stream active line

When the receiver sees an incoming stream it will put pin 7 on the Raspbery Pi GPIO high to indicate a valid signal - this can be used to trigger a repeater logic - note this is a 3.3v line and easily damaged. See https://wiki.batc.org.uk/PTT_and_band_switching

Video Ouput

The stream receiver will output the received stream on the standard HDMI or composite outputs. This should be routed as just another input on your repeater.

Operation

The stream receiver is designed to be run unattended for long periods. This is how it operates.

With no incoming stream there is a continuous loop that starts the stream player (omxplayer) every 10 seconds. If there is no stream, the player times out after about 6 seconds and sits idle until it is restarted 4 seconds later.

If the player finds a stream and starts, it sends a status message. The status message is checked by the software, and if the first line starts with "Video" this is taken as an indication that the stream is valid, and the GPIO pin to trigger the repeater switching is set high. Sometimes the player does not start properly and only finds the audio part of the stream. In this case the player is stopped and restarted at the beginning of the next 10 second cycle.

When the stream finishes, the player times out and the GPIO pin is set low. The 10 second cycle starts again.

There is an occasional lock-up condition where the player seems to detect a valid stream, but does not display any video. This triggers the GPIO switch, but leaves the system locked up showing the "Valid Stream Detected" message. To overcome this without requiring repeater keeper intervention, the player is stopped (whatever is happening) once an hour, normally within 10 seconds of the top of the hour.

During normal running, the stream receiver does not write to the SD Card, so it is unlikely to get corrupted in the event of a power failure.