OBS via IPTSin on the PortsDown

Discussion about this major DATV Project. See also https://wiki.batc.org.uk/The_Portsdown_Transmitter
G7JTT
Posts: 132
Joined: Fri Jun 10, 2016 5:05 pm

OBS via IPTSin on the PortsDown

Post by G7JTT » Wed May 22, 2019 8:02 am

Morning all,

Firstly I'm no expert with this but thought I'd share my success with getting OBS to talk the the Portsdown. I'd also like to thank everyone who has helped me along the way, especially Evariste F5OEO who spent a marathon evening with me helping to the early hours of the following morning getting the system working.


Screenshot 2019-05-22 07.33.05.png
Screen shot of my setup
Screenshot 2019-05-22 07.33.05.png (1.1 MiB) Viewed 1654 times


You will need to setup the Portsdown to talk to your PC via a network cable, WiFi wont work reliably. I also set the Portsdown up with a fixed IP of 10.0.0.1 by adding the text ip=10.0.0.1 to the cmdline.txt file found in the root of your SD card. Once you have set the Portsdown up and can confirm the network is working, you need to set up OBS. What I have done is to create several profiles and named them to reflect the SR/FEC settings so for 250Ks @ 3/4 FEC I named it 250Ks@3/4FEC I then went on to create another 4 profiles for the most common combinations of SR/FEC I use. The following is a copy of my 250Ks@3/4FEC ini file.

[General]
Name=250KS@3/4FEC

[Video]
BaseCX=1280
BaseCY=720
OutputCX=1280
OutputCY=720
FPSType=1
FPSInt=25

[Panels]
CookieId=36EA87EF08C0DFF0

[Output]
Mode=Advanced

[AdvOut]
TrackIndex=1
RecType=FFmpeg
RecEncoder=obs_x264
RecTracks=1
FFOutputToFile=false
FFURL=udp://230.0.0.11:20000?pkt_size=1316
FFFormat=mpegts
FFFormatMimeType=video/MP2T
FFExtension=ts
FFVBitrate=222
FFIgnoreCompat=true
FFVEncoderId=28
FFVEncoder=libx264
FFAEncoderId=86018
FFAEncoder=aac
FFAudioMixes=1
FFMCustom=muxrate=372100 mpegts_original_network_id =1 mpegts_transport_stream_id=2 mpegts_service_id=1 mpegts_start_pid=300 mpegts_pmt_start_pid=4096 pcr_period=40
FFVCustom=preset=superfast x264-params=nal-hrd=cbr:force-cfr=1:vbv-bufsize=1000
FFVGOPSize=100
FFABitrate=32
FFRescale=true
FFRescaleRes=768x576
RescaleRes=620x465
RecRescaleRes=1920x1080
Rescale=false

[Stats]
geometry=AdnQywACAAAAAAIoAAABXQAABVcAAAKbAAACMAAAAXwAAAVPAAACkwAAAAAAAAAAB4A=

[Audio]
SampleRate=44100
ChannelSetup=Mono

With OBS running click on the profile tab and then rename the default profile to 250Ks@3/4FEC. Now click on the file tab and go to show the profile folder. Within that window you will see a file basic.ini, right click edit then you should be able to copy and paste the above text into this file. You can set the preview screens up to what ever takes your fancy but the FFRescaleRes should be appropriate for the SR in use so 768x576 or 352x288 are better suited to SR333/250 where as 1280x720 is better left to SR's of 500Ks and above. You can now duplicate this profile and rename them to suit your own choice of SR/FEC combination, I have 250Ks@3/4FEC, 333Ks@3/4FEC,500Ks@1/2FEC,500Ks@3/4FEC and 1Ms@1/2. For each profile you will need to change the muxrate and FFVBitrate (video bitrate) values for your given choice of SR/FEC. Use this site http://www.satbroadcasts.com/DVB-S_Bitr ... lator.html to work out your own choice of SR/FEC combinations. The Netto TS bitrate is what you need but in Kmps so multiply by 1000000 then enter this as your new muxrate, to work out the FFVBitrate multiply muxrate by 0.0006 and round up to just 3 digits. Once OBS is set up you can test it's all working with VLC set to receive an network connection on udp://230.0.0.11:20000 and hitting the start recording button on OBS.

Next is the script that you need to run along side OBS to add user details, the following should be copied into batch file and run.

@echo off
rem edited By G7JTT May 2019
rem Feb 2019 by Evariste F5OEO - QO-100 Release 0.9 (Completely rewritten)
rem Started from original tool
rem Idea from Portsdown vmix ffmpeg script

rem ================= SETUP ONCE ===========

set callsign=YOURCALL
rem Set appropriately
rem set raspi_ip=230.0.0.10
set raspi_ip=10.0.0.1
set ip=%raspi_ip%:10000

rem ================= INTERACTIVE =======================
rem --- SR asked only once ----
set SR=250
cls
:promptme
echo ==== Enter SR 250@3/4,333@3/4,500@1/2,500HD,1000@1/2 =====
set /p SR="SymbolRate(Ks) (%SR%)"

IF "%SR%"=="250" (SET TSBITRATE=372100)
IF "%SR%"=="333" (SET TSBITRATE=495700)
IF "%SR%"=="500" (SET TSBITRATE=494900)
IF "%SR%"=="500HD" (SET TSBITRATE=661100)
IF "%SR%"=="1000" (SET TSBITRATE=989800)
IF "%TSBITRATE%"=="" (GOTO :promptme)
echo SR=%SR%
echo Muxrate=%TSBITRATE%
pause
rem ======================== Launch ffmpeg OBS =========================

echo launch ffmpeg OBS
start "OBS to udp/ts" /high ^
C:\ffmpeg\bin\ffmpeg ^
-i udp://230.0.0.11:20000 -c:v copy -muxrate %TSBITRATE% -c:a copy ^
-f mpegts -mpegts_original_network_id 1 -mpegts_transport_stream_id 1 -mpegts_service_id 1 -mpegts_pmt_start_pid 4096 -streamid 0:256 -streamid 1:257 ^
-metadata service_provider="QO-100" -metadata service_name=%callsign% ^
-flush_packets 0 -f mpegts "udp://%ip%:10000?pkt_size=1316"

You need to setup your call sign and IP address of the Portsdown if you did not use 10.0.0.1, the options are self explanatory with the exception of 500HD this is just 500Ks @ 3/4FEC and I use this to send HD video from my Logitech C920 webcam.

So to work with the Portsdown you need to select IPTSin via the touch screen or via the console from an SSH connection. You must select the same combination of SR/FEC as the script and the OBS profile. Both the script and OBS must be running then press start recording button in OBS, wait a while untill the FFMpeg widow settles down then hit TX on the portsdown. The first few seconds of the video will be a little funky but it will settle down and should work well for the length of the over. There are some sources/transitions within OBS that don't seem to work well with my set up, but just play around and find what works best for you.

Hope this will help and that I've explained it in a way that makes sense?

All the Best John G7JTT

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

Re: OBS via IPTSin on the PortsDown

Post by G7JTT » Wed May 22, 2019 10:56 am

Sorry forgot to say you also need FFmpeg install on your PC at C:/ffmpeg

roland_F8CHK
Posts: 3
Joined: Fri Nov 17, 2017 3:05 pm

Re: OBS via IPTSin on the PortsDown

Post by roland_F8CHK » Wed May 22, 2019 9:02 pm

Hi John,

Thanks for sharing these very useful informations!
See you on QO-100,
73 Roland F8CHK

2i0jmt
Posts: 65
Joined: Tue Apr 16, 2019 2:48 pm

Re: OBS via IPTSin on the PortsDown

Post by 2i0jmt » Sat May 25, 2019 4:30 pm

Thanks John, these ffmepg settings were really useful! They really helped me get going.

Unfortunately, I'm having quite bad carrier stability issues on anything about 250ks. Basically, on higher rates, the stream will work for a few seconds (sometimes minutes), and then all of a sudden, the signal will go crazy and Minitiouner looses lock.

Reading around on this forums, it seems like something is wrong with the the latest Portsdown software (or the supporting Lime drivers).

Does anyone have any insight into what's going on or if there is a way for this to be fixed?

Thanks

Jonny

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

Re: OBS via IPTSin on the PortsDown

Post by G8GKQ » Sun May 26, 2019 10:05 am

Hi Jonny

The IPTS in setting on the basic Portsdown with the Filter-modulator board (Portsdown 2018) works perfectly. The issue you describe is with the module used to convert the IPTS into I and Q signals to feed into the LimeSDR in "Portsdown 2019".

Evariste and I have been trying to improve this module and the parameters that it is called with for some time, but it is like playing whack-a-mole. We fix one bit and another bit stops working.

The IPTS function is part of the LimeSDR integration that I have not released as being fit for use. John has managed to make it work acceptably in certain circumstances - all credit to him. But please do not consider it as part of the "released" software.

We would welcome any help with improving the software - it's all on GitHub: https://github.com/BritishAmateurTelevi ... /portsdown

Dave, G8GKQ

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

Re: OBS via IPTSin on the PortsDown

Post by G7JTT » Sun May 26, 2019 2:48 pm

Hi Jonny, whilst I'm getting good results mostly with the settings above I do still have issues with stability on occasions. One thing I'm finding is that my i5 laptop isn't really man enough for the job. Running OBS, ffmpeg and Minitioune all at the same time can cause my power to fluctuate or shut down altogether, so maybe this could be a cause of your problems ? Try running Minitioune on another device, another thing to try is reduce overall video size on the input and output appropriately, And as Dave has said though this is just my way I've managed to get OBS to talk to the Portsdown and it's most likely on the limits of what can be expected at the moment. Don't give up trying it's all part of the learning curve and I'm learning more about how this magic works every day 👍

All best John

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

Re: OBS via IPTSin on the PortsDown

Post by G7JTT » Tue May 28, 2019 7:18 pm

Just an update I've discovered that a line in the basic.ini had errors in it

FFVCustom=preset=superfast x264-params=nal-hrd=cbr:force-cfr=1:vbv-bufsize=1000

Should be

FFVCustom=preset=superfast x264 params=nal hrd=cbr:force cfr=1:vbv bufsize744200

This has helped but still don't think my Laptop is really up to running all this at the same time, but when it works it does so quite well.

All best John

2i0jmt
Posts: 65
Joined: Tue Apr 16, 2019 2:48 pm

Re: OBS via IPTSin on the PortsDown

Post by 2i0jmt » Wed May 29, 2019 3:29 am

Hey John

Should that be bufsize=744200

Thanks

Jonny

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

Re: OBS via IPTSin on the PortsDown

Post by G7JTT » Wed May 29, 2019 5:37 am

Well spotted 🙄

2i0jmt
Posts: 65
Joined: Tue Apr 16, 2019 2:48 pm

Re: OBS via IPTSin on the PortsDown

Post by 2i0jmt » Wed May 29, 2019 8:32 am

So just for completeness..

FFVCustom=preset=superfast x264 params=nal hrd=cbr:force cfr=1:vbv bufsize=744200

(noting the new bufsize, and replacing some hyphens with spaces)

Is that correct? :)

Thanks

Post Reply

Return to “The Portsdown Digital ATV System”