Portsdown 4 IPTS

Discussion about this major DATV Project. See https://wiki.batc.org.uk/The_Portsdown_Transmitter
Post Reply
G8DGN
Posts: 12
Joined: Fri Aug 09, 2024 1:34 pm

Portsdown 4 IPTS

Post by G8DGN » Wed Dec 18, 2024 1:49 pm

I have created a 720/24p MPEG4 stream and sent it to the Portsdown, which displays in IPTS monitor.
Am I correct in thinking that if I select the TX source as HDMI, the stream should be selected and TX'd? It is not.
I'm using a Pluto. Have tried 30p and lower resolutions but nothing changes
What am I doing wrong?

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

Re: Portsdown 4 IPTS

Post by G8GKQ » Wed Dec 18, 2024 3:01 pm

Hi John

It might be possible, but you have to trick the software into thinking that it is receiving a stream from an LKV373A.

First of all, your MPEG4 stream needs to be sent as UDP. Then you need to put the stream source IP address and port into the Portsdown settings for the LKV373A (Menu 3, Jetson/LKV Config, LKV373 UDP Port and LKV373 UDP IP.

Then you need to make sure that the stream that you are sending is the correct bitrate. If you select the desired SR and FEC on your Portsdown, then M2, Info, it shows the required bitrate at the bottom of the screen.

The UDP stream must have 1 or 2 audio channels and can only be H264/MPEG4.

So, not easy to set up, and I make no guarantees, but worth trying.

Dave

G8DGN
Posts: 12
Joined: Fri Aug 09, 2024 1:34 pm

Re: Portsdown 4 IPTS

Post by G8DGN » Wed Dec 18, 2024 3:19 pm

Hi Dave,

Fantastic, by following your instructions, it works! Have only checked video so far.
Thank you very much.

73 John

G8DGN
Posts: 12
Joined: Fri Aug 09, 2024 1:34 pm

Re: Portsdown 4 IPTS

Post by G8DGN » Fri May 23, 2025 5:22 pm

This configuration has been working using -vcodec mpeg4 but the quality was disappointing.
When I attempt using -vcodec libx264, the Portsdown no longer accepts my stream, indeed it only briefly shows on IPTS Monitor before freezing or going black.

The command I'm trying from my Mac for a 333K stream:

ffmpeg -f avfoundation -i "3:0" \
-vcodec libx264 -x264-params "nal-hrd=cbr" -preset ultrafast -pix_fmt yuv420p -r 25 -s 720x480 -aspect 16:9 -qmin 2 -qmax 35 \
-b:v 440310 -c:a aac -b:a 24000 -ar 48000 -ac 1 \
-f mpegts 'udp://192.168.0.55:10000?pkt_size=1316'

It seems to stream to other destinations fine.

Any suggestions would be welcome.
Thanks,
John

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

Re: Portsdown 4 IPTS

Post by g0mjw » Fri May 23, 2025 5:37 pm

Why such a high frame rate? Especially with H264 instead of H265.

You are making it harder for yourself with a Mac as fewer people use them but this is a Windows command line to do the same thing with 333ks 3/4 FEC.

ffmpeg -f dshow -i video="OBS-Camera" -thread_queue_size 512 -f dshow -i audio="OBS-Audio" -vcodec hevc_nvenc -s 1920x1080 -bf 0 -pix_fmt yuv420p -b:v 380k -r 15 -preset slow -profile:v main -rc cbr_hq -rc-lookahead 5 -acodec aac -aac_coder twoloop -ar 48000 -ac 1 -b:a 32k -f mpegts -muxrate 495k -streamid 0:256 -streamid 1:257 -metadata service_provider="G0MJW" -metadata service_name="Mike" -max_delay 2500000 -pcr_period 40 -pat_period 0.4 "udp://192.168.1.46:8282?pkt_size=1316"

Obviously differences in the IP address and port to suit the PD4 rather than the Pluto. Also h265 but ignoring that for now and looking at yours I see you have set a fairly high video bandwidth, you might want to try reducing it as I suspect you are running out of bandwidth. I am also using the muxrate parameter which you are not. I don't know if that matters, but I would have thought so.

G8DGN
Posts: 12
Joined: Fri Aug 09, 2024 1:34 pm

Re: Portsdown 4 IPTS

Post by G8DGN » Fri May 23, 2025 8:02 pm

Hi Michael,

I have used only Linux and Mac since 2000, so am most familiar with them. Of course I could buy a Windows PC and just drop a preconfigured application and it might just work, but for me, part of the pleasure (and pain) is making work, even though it takes me a little outside my comfort zone.

In answer to your suggestions, the frame rate was arbitrary, I've tried 15fps. I've tried the suggested video data rate of 440310 (for 333K) from the M2 - Info page on the Portsdown, it was my mistake that I posted an earlier version with 1M rate.

Thank you for your command line, I'll study that. If I can't make the Portsdown route work I'll try directly to the Pluto.

It was nice meeting you at the DDRC rally.

73 John

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

Re: Portsdown 4 IPTS

Post by g0mjw » Sat May 24, 2025 7:27 am

Hi John

It will work with the Pluto, we know that already. That script is mostly going to be the same, minus the tweaks for the Nvidia graphics and H265. As I use a PC I can't help with any testing, for example the video source "3:0" looks very strange but is presumably correct and I assume is also the audio as I don't see an audio input, but I do think it is the rate you are sending data exceeding the capacity of the pipe it is trying to go through. A lower frame rate will help enormously, start well below the limit and work up to it. H264 is not as well behaved at constant bit rate as MPEG2 and H265 worse.

You might want to post the codec output, I assume there are no error messages as you would have said so and I am sure you know that the transport rate will depend on the FEC. My script is for 3/4. That will allow a mux rate of 495kbps. Actually 496kbps but stay below the limit. Were you to choose 2/3 that reduces to 440kb/s and 1/2 330kbps. All assuming DVB-S2.

I am not familiar with the M2 info page on the Portsdown, but 440kbps seems very high and suspiciously close to the overall rate for the multiplex for 2/3 FEC. Could it be you have miss-understood the overall rate to be the video rate? Try setting it to 330kb/s.

Mike

Edit - I turned on my PD4 and indeed, it states a transport rate of 440kbps, not a video bit rate of 440kbps - I think that is your error.

G8DGN
Posts: 12
Joined: Fri Aug 09, 2024 1:34 pm

Re: Portsdown 4 IPTS

Post by G8DGN » Thu May 29, 2025 6:21 am

Hi Michael,

You are right that I had misunderstood the required input bit-rate to the Portsdown. After some tweaking i seems happy with this:
ffmpeg \
-f avfoundation -framerate 15 -i "4:2" \
-vcodec h264_videotoolbox -b:v 333k -maxrate 333k -bufsize 666k \
-pix_fmt yuv420p \
-g 50 -keyint_min 15 \
-acodec aac -b:a 128k -ar 48000 \
-f mpegts "udp://192.168.0.240:10000?pkt_size=1316&buffer_size=65535"

NB the "4:2" refer to video and audio device designations under MacOS.

Thank you for the tips.
John

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

Re: Portsdown 4 IPTS

Post by g0mjw » Thu May 29, 2025 7:51 am

Hi john

Glad it is working. Looking at your ffmpeg script, you appear to be devoting 128k to audio. Unless you are into HiFi it seems a little too much, especially with H264. If you reduce the audio bandwidth, you can increase the video. Also, 128+333 exceeds the 440k available so it might not work properly. I would try 64k or even 32k for the audio and say 300k for video to leave a little headroom.


I found this old script from 2021 which I must have been using with the Portsdown.

c:\ffmpeg\bin\ffmpeg -f dshow -i video="OBS-Camera" -thread_queue_size 512 -f dshow -i audio="OBS-Audio" -vcodec h264_nvenc -s 768x432 -r 15 -bf 0 -pix_fmt yuv420p -b:v 300k -preset slow -profile:v main -rc cbr_hq -rc-lookahead 5 -acodec aac -aac_coder twoloop -ar 48000 -ac 1 -b:a 32k -f mpegts -muxrate 440k -streamid 0:256 -streamid 1:257 -max_delay 1500000 -metadata service_provider="G0MJW" -metadata service_name="Mike" -y "udp://192.168.1.50:10000?pkt_size=1316"

This script is assuming nvidia and in your case would be just -vcodec h264 but apart from that and the different AV inputs, it should almost work as is.

Post Reply

Return to “The Portsdown Digital ATV System”