GB3NQ & H264/H265 Encoder Boxes and other stuff!

Ideas, technical topics, help and discussion for ATV repeater builders
Post Reply
G6MNJ
Posts: 38
Joined: Mon Jun 09, 2014 6:25 pm

GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by G6MNJ » Mon Jan 16, 2023 7:41 pm

I have seen a lot of concerns about the usability of these low cost boxes from eBay/Amazon and I hope to put some of these fears to rest below.

Let me start by announcing our repeater here in St Austell Cornwall GB3NQ uses one of the encoders and produces a stream which is fed directly to a Pluto for transmission. We did initially use a Portsdown between them but soon discovered it was unnecessary and it got re-purposed to producing 15-minute ident test cards.

Additionally despite rumours to the contrary the repeater Pluto also can run at 2msyms/s continuously for 12 hours day. It must be noted however the Adalm Pluto website clearly states its temperature operating range is 10C – 40C so ensure the covers are removed and the PCB is placed under a good fan to keep it cool.

Before I get into the Encoder one final point on the Pluto is despite the manufacturers specifications the best operating voltage from our experience at GB3NQ was to run it just under 5v and certainly not at a voltage level a Raspberry Pi needs.

So I have set the groundwork we have a Pluto configured via its LAN interface by a web browser on a Raspberry Pi waiting for a suitably encoded IP stream into it’s LAN port.

It was decided NQ was to be digital in and out, so we have an automatic HDMI switch selecting from 3 Ryde Receivers, Ident Test Cards and a 30 minute video running on the hour to help new users get tuned in and setup.

First lesson learnt is to set all these devices to the proposed output resolution. For the hardware video player that was done in it’s on screen menu. The Raspberry Pi’s needed the following lines in their boot up configuration file that can be found in the \boot folder. Enter the line below to start the editor to make the changes required.

pi@raspberrypi:~ $ sudo nano /boot/config.txt

These lines must be present to ensure the Pi outputs 1080p and is not upset if the HDMI lead is not connected to anything at boot time.
If the lines below already are in the file then change them to match below.

hdmi_force_hotplug=1
hdmi_drive=2
hdmi_group=1
hdmi_mode=16

If you want to run other resolutions a quick Google search will provide up to date Tables of these commands and which to select.

The HDMI signal from each device is now fed through a HDMI switch (cheap Chinese units are not up to the job!) use good quality HDMI leads throughout. The output of the HDMI switch then is fed to a HDMI EDID Emulator. This keeps the encoder in sync with the HDMI switch output. Without this device when the input changes on the HDMI switch the encoder looses sync and the transmission stops. It then takes some time before transmission restarts.

So finally we have an encoder with a valid HDMI signal on its input.

Apart from configuring the LAN interface of your encoder that it is presumed you have done correctly, there are now three items to setup. Audio, Video and network stream.

It has taken some months to perfect this in terms of robustness and to provide the best picture quality from this low cost Encoder.

In order to provide the inclusion of DVBS-2 set top boxes it was decided we would use H264 encoding. Maybe when these set top boxes can decode H265 that may change.

Audio configuration was set to 64k Stereo and due to lip sync issues we opted to use the analogue audio inputs and use another HDMI device to strip the audio from the HDMI lead. This device is readily available from eBay at a low cost and sits just before the EDID unit plugged into the encoder. It is understood this is a hardware issue within the Encoder that at the time of writing has no fix available. So it’s not strictly all digital but nobody will ever know!

Video setup is not what you would expect to configure, and this is where a lot of trial and error and help was needed.

The software running in a Pluto, and for that matter a Lime that deals with the incoming IP stream was written by Evariste Courjaud F5OEO. Whatever is sent into the transmitter if it is under the data rate expected by the transmit specifications (Symbol Rate FEC modulation Type etc) his software will pad the data with nulls to ensure it is sent at a constant bit rate.

So the encoder Main Stream is set to H264 Codec 1920x1280 resolution and Audio on. The group of Pictures is set to 10, Bit Rate mode to VBR with a bit rate of 2100 and quality of 5 and finally a frame rate of 25 fps.

These are not random numbers but build on experience and a desire to get the best out of the Encoder. The transmitter at GB3NQ runs at 2Msyms/s with a FEC of 4/5 using DVBS-2, using the calculator at :-https://www.satbroadcasts.com/DVB-S_Bit ... lator.html

This informs us a nett transport bit rate of 3.1 Mbps for these settings.

It is generally accepted 70% of this bandwidth can be used for video which is 2.17Mbps. This figure is shown above as 2100Kbps the remaining space in the stream will be occupied by audio and other overheads plus some headroom to expand into for noisy or fast moving pictures.

The group of pictures (or GOP structure) value of 10 means every 10th frame a full picture is sent and in-between these are inter frame and predicted frames. At this rate and 25 frames per second fast movement such as waving looks fairly smooth on the receiver.

A setting of 3 for quality was selected as it was the value to produce smooth video with least blocking.

Last but not least the Encoder has to be told where to send its output for the Pluto it is required that this be a multicast stream - option under the Network Tab. In here select the Main Stream (as before) select True for the option to Enable enter the IP address of your Pluto and port 8282.

A lot of the testing to get the best out of the Encoder was done, by changing the output IP address from the Pluto to a local PC on the network. Then using VLC (Video LAN) on that PC to play the incoming stream on the corresponding port and observing the picture and bitrate in Tools option helps find the sweet spot.

Take a look at our HD stream at https://batc.org.uk/live/gb3nq to see the results.

73 Paul G6MNJ

G4HTZ
Posts: 217
Joined: Sat Aug 02, 2014 4:21 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by G4HTZ » Mon Jan 23, 2023 4:12 pm

Hi Paul

Thanks for the information re the PLUTO being able to do 2msyms.

I was under the impression according to the WIKI for portsdown it would only do 1msyms ….a friend pointed me to your posting .

I had asked him why most repeaters only received at 2ms when the portsdown with Pluto could only do 1ms .

Regards
Steve G4HTZ
Steve G4HTZ

ASHEN nr Sudbury JO02GB52 90m ASL

70cms DATV portsdown 4 + RYDE rx …14 or 18 ele yagi …LNA …hopefully 100w amp at some point

g0mjw
Posts: 2352
Joined: Sat Sep 20, 2014 9:15 am

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by g0mjw » Mon Jan 23, 2023 6:08 pm

G4HTZ wrote:
Mon Jan 23, 2023 4:12 pm
Hi Paul

Thanks for the information re the PLUTO being able to do 2msyms.

I was under the impression according to the WIKI for portsdown it would only do 1msyms ….a friend pointed me to your posting .

I had asked him why most repeaters only received at 2ms when the portsdown with Pluto could only do 1ms .

Regards
Steve G4HTZ
It is a bit hit and miss. If you go down to 1/4 rate FEC that will reduce the TS speed requirement and gain a few dB too. That assumes the repeater is DVB-S2. If it is an older one, that only allows MPEG-2 and DVB-S it might be more tricky.

G4HTZ
Posts: 217
Joined: Sat Aug 02, 2014 4:21 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by G4HTZ » Tue Jan 24, 2023 9:22 am

Thanks for additional information
Guess it would be good if repeater groups changed to 1ms or less …may encourage more people with 70cms to try and access them
Regards
Steve G4HTZ
Steve G4HTZ

ASHEN nr Sudbury JO02GB52 90m ASL

70cms DATV portsdown 4 + RYDE rx …14 or 18 ele yagi …LNA …hopefully 100w amp at some point

G8XZD-TV
Posts: 109
Joined: Fri Feb 22, 2013 6:41 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by G8XZD-TV » Fri Jan 27, 2023 12:00 am

Yes. I think at the time of the dtx 1 drop in replacement 1Ms seemed the right way to go but given how much things have improved, especially with the qo100 dividend maybe we should look at 500 or 333. It would be nice to have a uk-wide standard so you can compare apples with apples rather than apples against pears.

It’s nice to have all these options available for generating/receiving datv.

Maybe we will be forced down this path in the future but would be good to investigate all the options ahead of this.

I’d certainly welcome the “it must work with a satellite receiver out of the skip” mentality disappearing. Compared with 30 years ago you can get a newish sat rx which will work at a lower symbol rate on eBay or Amazon for a reasonable price which should help those with an “aversion to computers”

And of course there is always minitioune, long mynd/Portsdown/Ryde as the gold standard for the more discerning:-)

Or if you’re after the cheapest possible option you can’t go wrong with the 5.6GHz analogue kit and have a lot of fun at the same time.

73, Ian.

Pa3fbx
Posts: 187
Joined: Fri Oct 16, 2020 1:08 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by Pa3fbx » Fri Jan 27, 2023 4:51 am

Nice Job,

I did setup this similar hardware in our local repeater PI6MEP.
I used a link-Pi streamer and using its H265 capabilities to a pluto running 24/7 sinds jun 2021.
I piggybacked the 2344MHz dvbs2 signal with analog FMATV signal at 2352MHZ.
For this i have chosen for an 500Ks 3/4 DVBS2 so it looks pretty small and shows like an 8 Mhz sound/data carrier on the spectrum.
The power is about 10db lower but the signal is visible (Mer 4/D 0) when the analog signal is B2...
I added 4 2 channel HDMI switches before the 9 port seamless hdmi quad. This gives me the possibility to add a testcard on the non used channels when more than 1 channel is active...
also the 5 minutes testcard for station recognition is now easy.
I use 9 port HDMI quad for 2 4 quad images to give me up to 8 selectable inputs. But i use 3 additional 2 port HDMI switches to select between 2 inputs on 1 quad position.. It was not understood if some inputs move around the 4 pip quad positions... so now 23cm in is always up left and 70cm DVB is up right etc...

I use the multi stream option to stream to 2 internet pages... BATC 1 Ms and Twitch 1Ms.. Twitch is about 3 seconds faster than batc and even faster than the pluto. Youtube was canceled because they change the adres everyday... I create the pluto stream direct from the stream tab...

I use an RPI3 for testcard and repeater control. The control is done via node-red and lots of hardware and I2C i/o..
The nice thing of nodered is programming on the fly making everything changeable from home preventing me to climb the 450 stairs.
The idea of a instruction video might be a good idea. For me it seems easy to use but i know some need more info.. We have a internet page in dutch.
I have a emergency internet relay witch can power down the everything if disaster strikes...

For RX i have 2 analog inputs but still have the supporting analog switching not in place.. This means no sync and no squelch.
Further i have 2 Ryde systems running dvbs2 on 70cm and 23cm and a ryde running dvbt on 70cm..
They are reasonable stable but need a reboot every now and than... I never found a watchdog witch could solve some issues...

If you like more info maybe we can compare our notes :)...

Benno PA3FBX
PI6MEP ad BATC streamer and twitch.tv/pi6mep
Last edited by Pa3fbx on Fri Jan 27, 2023 5:17 am, edited 1 time in total.

Pa3fbx
Posts: 187
Joined: Fri Oct 16, 2020 1:08 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by Pa3fbx » Fri Jan 27, 2023 5:06 am

...

G8GKQ
Site Admin
Posts: 2814
Joined: Sun Mar 22, 2009 1:21 pm

Re: GB3NQ & H264/H265 Encoder Boxes and other stuff!

Post by G8GKQ » Fri Jan 27, 2023 10:21 am

In reply to Ian G8XZD who asks for a new UK-Wide Standard for DATV Repeaters.

There was an article in CQ-TV 266 (Winter 2019 https://batc.org.uk/wp-content/uploads/cq-tv266.pdf) entitled "A New Repeater Transmission Standard for the 2020s" written by G8GTZ that proposed the following standard:

1MS DVB-S2 QPSK FEC 2/3 modulation with H264 encoding and stereo audio

There has been lots of technical progress since then, but few repeaters have even achieved that standard yet.

Maybe the next step is 333 kS (or perhaps 500 kS) DVB-S2 QPSK FEC 2/3 with H265 encoding. However, we would need to see a reliable and affordable prototype before making the recommendation. Benno's approach is probably the way to go; given our current experiences with GB3HV it certainly looks promising.

Dave, G8GKQ

Post Reply

Return to “ATV Repeater Technical Topics”