Difference between revisions of "Stream Receiver"

From BATC Wiki
Jump to navigation Jump to search
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
===Introduction===
 
===Introduction===
  
Software Version 201807290 introduced the capability to receive an incoming stream and trigger a repeater to relay it when the stream is active.  The concept of operation is that an unlisted "repeater input" stream account is set up on the BATC Streaming Server.  Trusted BATC members living near the repeater in question are given access to stream to this account. The Portsdown Stream Receiver is installed at the repeater site and connected to the internet.  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 to show the incoming stream.
+
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===
 
===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 [[PTT and band switching|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.
  
You will need a Raspberry Pi 3B or Raspberry Pi 3B+ and a good power supplyThis should be connected to the internet at the repeater site, and the video and audio outputs from the 3.5mm jack connected to your repeater input matrix.  GPIO pin 7 on the Raspberry Pi should be connected to a suitable interface to switch the input into use when it goes high (3.3v)A suitable memory card with Raspbian Stretch software and Portsdown Software Version 201807290 or later should be fittedNo touchscreen, video dongle or audio dongle is required.
+
If the player finds a stream and starts, it sends a status messageThe 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 streamIn this case the player is stopped and restarted at the beginning of the next 10 second cycle.
  
The next requirement is to have a "Repeater Input" stream account set up on the BATC Streaming Server; send a request to admin@batc.tv.  Once the account is set up, you will be sent the account details, which will include the input access code and the output stream address.  The input access code should be passed to your trusted users, and the output stream address should be used to set up the Stream Receiver as described below.  You will not see the stream listed on the BATC Website.
+
When the stream finishes, the player times out and the GPIO pin is set low.  The 10 second cycle starts again.
  
===Setting up the Raspberry Pi===
+
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.
  
Connect to the Raspberry Pi through the console as described here [].  The first step is to change the default Raspberry Pi password.
+
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.

Latest revision as of 14:36, 18 December 2023

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.