IPTS Input to Portsdown with the LimeSDR

From BATC Wiki
Jump to navigation Jump to search

You can feed pictures to your Portsdown 2020 or Portsdown 4 from a PC-based video application such as vMix or OBS, or you can use a "batch file" to encode the video directly on the PC.

When the Portsdown 4 is used with a LimeSDR, it has the capability to accept a transport stream from a LinkPi encoder, enabling the use of H265 video encoding.

Encoding using vMix

For vMix the workflow is:

  1. Start vMix and enable the external output. The settings are described in detail here Feeding_Video_to_Portsdown_from_vMix.
  2. Use ffmpeg running on the PC (started by a batch file) to capture the "DirectShow" output from vMix and encode it into a transport stream to be sent to the Portsdown
  3. Set IPTS input (from the "Encoding" menu) on the Portsdown and select transmit.

The complex part of this process is the encoding on the PC. Note that as all the software and hardware elements of this are outside the control of the Portsdown team, this capability is only supported on a best-efforts basis.

Use of a Batch File For Video Encoding on a PC

First, make sure that you have ffmpeg installed on your PC as detailed here: Feeding_Video_to_Portsdown_from_vMix#ffmpeg

The notes here are based on this batch file File:vMix2PortsdownH264DVB-S2.zip, which you should download, unzip and store in a sensible place on your PC. You will need to run it every time you set up transmissions from vMix or OBS. You will also need to edit it before using it for the first time.

One-time Editing

Before first use, you need to edit the batch file and enter your Portsdown's IP address and your callsign. So right-click the file and select Edit.

  • Change the line "set ip=192.168.2.214" to the IP address of your Portsdown. You can look this up on Menu 2, Info on the touchscreen.
  • Change the line "set callsign=G8GKQ" with your callsign.
  • Near the end of the script, make sure that the line "C:\ffmpeg\bin\ffmpeg ^" actually points to where the ffmpeg program is on your PC. Don't forget to leave the ^ at the end of the line.

Save your changes

Running the Batch File

Before running the batch file, start the External Output on vMix. It should turn red.

Double-click the batch file and a Command Prompt window should open, giving details of your Portsdown's IP address and callsign.

  • Select the desired modulation type. 1 for DVB-S, 2 for DVB-S2. Press Enter.
  • Enter the symbol rate in kS and press enter.
  • Enter the FEC in the format shown, and press enter. The script will only cope with the FECs listed.
  • Enter the coding headroom in percent. The default 35 is about right, but if you have a low speed PC and fast-moving picture content, you may need to increase the figure to prevent break-up when the picture moves.

In all cases, just pressing enter will use the figure displayed in brackets. The script will then tell you what it is going to do, and you should start it by pressing any key. Once started, you can stop it by pressing Q.

You should see the ffmpeg status screen with the relevant parameters displayed at the bottom.

Portsdown Settings

You need to tell the Portsdown to use the incoming IP Transport Stream, so first select Encoder, "IPTS in". Make sure that you have Lime DVB selected as the output device (and that you have programmed the Lime with the custom firmware).

Select the same modulation, symbol rate and FEC that you entered into the Batch script.

From Portsdown Buster software 202002290 onwards, you can check the incoming (H264, not H265) transport stream by selecting Menu 2, IPTS Viewer, and the Portsdown will display the images that it is being sent. It takes 15 seconds or so to start, so be patient. Touch the screen to exit.

Now you can select transmit and hopefully, after the Lime has started up, you will see a valid signal. You only need to deselect or reselect transmit on the Portsdown, you can leave vMix and the batch file running all day.

Using a LinkPi encoder with the Portsdown 4 and a LimeSDR

The LinkPi encoders accept an HDMI input and can encode it using H264 or H265. However they do not have the ability to add service information (such as callsign) and MPEGTS Service Type (indicating H264 or H265). Two buttons on the Portsdown 4 Encoding Menu can select "Raw IPTS in H264" or "Raw IPTS in H265" to add this information. As with the other IPTS input modes, the transmit frequency, SR and FEC need to be set correctly on the Portsdown. As a guide, the video bitrate on the encoder needs to be set to about 60% of the "TS bitrate required" as displayed on the Portsdown "Info" menu accessed through Menu 2.

For best results the LinkPi Enc2 encoder should be used, although the Enc1 and Tiny versions should also work.

LinkPi Settings

The LinkPi should be set up to stream to the IP address of the Portsdown. The settings shown below, for the Encoder, Stream - Stream Config and Stream - Push Config pages worked for an H265 1MS, FEC2/3 transmission.

1 Encode.JPG

2 Stream Config.JPG

3 Stream Push Config.JPG