Latency improvements ?

Latest News and Discussion about the use of the DATV transponder on Es'hail-2
G4WIM
Posts: 379
Joined: Thu Jan 29, 2015 8:36 pm

Latency improvements ?

Post by G4WIM » Mon Oct 21, 2019 1:12 pm

I've been doing some tests / measurements to reduce round trip latency - ie from local camera and back to local monitor via the satellite.

I've compared Pluto using the new rmtp method alongside Portsdown and Jetson using a lime mini.

The video source is OBS via LKV373A and also tested OBS running ffmpeg script to portsdown.

I've found that the Pluto is by far the slowest with significant >5 secs encode time alone, whereas the Jetson being fed with LKV video is the fastest - just.

Part of my latency is caused by using two LKV373A - one to convert HDMI video to IP to feed OBS and another to convert OBS HDMI back to IP.

I've been trying to get OBS to produce an output stream which will go directly to the Jetson - effectively replicating the output of the LKV without running FFMPEG from a script.

Reading on the OBS forums it looks as though it should be possible but I'm yet to crack it.

Clearly when running a duplex QSO excessive latency can be a nuisance !

Anyone else have thoughts on how to reduce latency ?

73 Tim

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

Re: Latency improvements ?

Post by g0mjw » Mon Oct 21, 2019 1:40 pm

Let us know when you find something. One option might be to use ffmpeg to capture and encode a screen which you project OBS onto. Getting the audio as well, in sync may be tricky but possible with a virtual sound card.

ffmpeg -f gdigrab -framerate 25 -offset_x 10 -offset_y 20 -video_size 640x480 -show_region 1 -i desktop [output]

this is old but useful https://nerdlogger.com/2011/11/03/strea ... ng-ffmpeg/ as it explains the parameters required and gives an example. There is also guidance here https://medium.com/@colten_jackson/simp ... eddbeb161b

The other way to do it - inefficiently is to get OBS to send UDP to the local host and catch it with ffmpeg and encode etc. With ffmpeg running on the PC it should be able to encode better quality and with NVIDIA even more so. The output of ffmpeg as a transport stream can be sent to the Pluto, Jetson Lime, Portsdown Lime or maybe the Lime directly for transmission.

This last bit - the PC to Modulator is the one we don't have yet. It could be a TS over UDP. There needs to be something running on the Pluto or Pi or Jetson that can capture this and do the coding to send as DVBS2.

The LKV is doing this PC to Modulator step, with hardware encoded H264 sent as a multicast. It's not very efficient network-wise and multiple encoding must impact the quality a little.

If I had more time and understood more I would try to get this to work. I had some early success but getting sound and video in sync was a problem. I think that would go away with an OBS plugin.

Mike

G4WIM
Posts: 379
Joined: Thu Jan 29, 2015 8:36 pm

Re: Latency improvements ?

Post by G4WIM » Wed Oct 23, 2019 8:05 pm

Hi Mike,

good video from you at 66k 8PSK !

I'm not making much progress using OBS to encode and send a stream directly to either Jetson or Portsdown - like you my LK373 is flakey and wish to get it out of the system and use my Nvidia card to encode instead.

Ideally retaining the RPI to set freq, symbol rate FEC etc but let the PC do the heavy lifting to send the data either to the Jetson + Lime or to the Lime (and or Jetson) via Portsdown.

So many ways of doing this - not sure which way is best !

73 Tim

G7JTT
Posts: 338
Joined: Fri Jun 10, 2016 5:05 pm

Re: Latency improvements ?

Post by G7JTT » Thu Oct 24, 2019 5:39 am

Has anyone tried one of the hdmi to CSI adapter boards instead of the LK board ?

https://rover.ebay.com/rover/0/0/0?mpre ... 4327387442

John

G4WIM
Posts: 379
Joined: Thu Jan 29, 2015 8:36 pm

Re: Latency improvements ?

Post by G4WIM » Thu Oct 24, 2019 9:02 pm

Hi John

looks like an interesting bit of kit - not sure if I want to take on yet another option with associated problems !

Seems my lkv373 works much better with hdmi direct from my hi def cam corder rather than the hdmi from my PC when running obs !

73 Tim

G4WIM
Posts: 379
Joined: Thu Jan 29, 2015 8:36 pm

Re: Latency improvements ?

Post by G4WIM » Fri Oct 25, 2019 8:37 am

Hi John

I've looked into this hdmi bridge a little deeper and it does look attractive and a means to reduce latency.

There seems to be a number of different models available with varying levels of support / data sheets.

Running the Jetson with the PI cam works very nicely with minimal latency using H265 - with one of these bridges using the same mipi interface there's potential to inject hdmi directly again with minimal delay.

OBS itself only has a small delay and the hdmi could be fed direct to this bridge.

Looking at the Jetson forums (and rpi forums) there does seem to be some support - but before I take the plunge I'll dig a little deeper.

73 Tim

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

Re: Latency improvements ?

Post by g0mjw » Fri Oct 25, 2019 4:52 pm

There is also the Elegato Camlink 4K option. I think this was tried and found to work OK but not so good for higher bandwidths.

I don't think it's the LKV373 having issues - rather the PC graphics cards seem to be negotiating incorrectly. The lag of this setup is minimal - a couple of seconds for H265 333k via a Jetson Nano. If only it would work reliably!

Several of us might have bought PI4s that we discovered don't work with Portsdown. Is there a scope for H265 encoding on these - a second processor on the network to do the video/audio/TS part of the task controlled from the Portsdown?

Mike

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

Re: Latency improvements ?

Post by G8GKQ » Fri Oct 25, 2019 5:44 pm

Mike - the RPi 4 does not have an H265 encoder, only a decoder.

Dave

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

Re: Latency improvements ?

Post by g0mjw » Fri Oct 25, 2019 6:03 pm

I know but it's got quite a capable CPU. Not capable enough?

Mike

G4WIM
Posts: 379
Joined: Thu Jan 29, 2015 8:36 pm

Re: Latency improvements ?

Post by G4WIM » Sat Oct 26, 2019 8:19 pm

There's definitely something odd going on between the OBS HDMI output and the LKV input.

LKV works fine with hi def hdmi cam corder - runs 2MS with little delay and practically no artifacts.

Camcorder runs at 1920x1080 at 60p.

Setting the video card on the PC to same results in the video crashing after a minute or so and lots of PCR DTS errors.

However setting the PC video output and OBS to 25 fps seems to fix the problem and corresponds to comments in the scripts about 25 fps being best for audio.

At 25 fps things seem stable and the latency from movement to being displayed on MT is about 2 seconds - regardless of symbol rates, I've tried 333, 500, 1M and 2M.

All of the above were using H265.

73 Tim

Post Reply

Return to “Es’hail-2 - DATV Transponder”