Replacing the MiniTiouner

Digital ATV - The latest generation, cutting edge ATV - Please discuss it all here.
Forum rules
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.

Thank you
SkyVision
Posts: 54
Joined: Fri Jan 24, 2020 1:51 pm

Re: Replacing the MiniTiouner

Post by SkyVision » Fri Nov 10, 2023 2:10 pm

I just noticed DATV Express has a noise tool, I might give that a try, thanks Charles, good thinking
Could be a useful feature for Portsdown if it was simple to implement
I imagine that's what they would use in a lab testing enviroment
If there is another way I'd be keen to know

M0LNG
Posts: 22
Joined: Mon Oct 16, 2023 5:18 pm

Re: Replacing the MiniTiouner

Post by M0LNG » Fri Nov 10, 2023 7:42 pm

For implementing the adjacent signals test, can anyone recommend an appropriate ffmpeg incantation to create a loopable MPEG-TS file valid for DVB-S2, with a constant bitrate to suit the parameters Dave has suggested (333kS, FEC 1/2, QPSK)? Assume that I can generate suitable uncompressed video as input.

So far I have been successfully feeding signals into the SF8008 using a HackRF and the "dvbs2_tx" example flowgraph from GNU Radio and its "adv16apsk910.ts" input file. To implement Dave's test, I want to adapt this setup to simultaneously produce multiple adjacent 333kS signals at 500kHz spacing, so I'll need to have several short, moving MPEG-TS loops that will be easily distinguishable from each other when seen on the receiver display.

SkyVision
Posts: 54
Joined: Fri Jan 24, 2020 1:51 pm

Re: Replacing the MiniTiouner

Post by SkyVision » Sat Nov 11, 2023 12:38 am

I use Vmix with External on, use the loop function (OBS could be used)
That drives F1EJP's Freestream coder, set it to what you want the the TS file to be
Then you can record the stream using VLC leave it run a while through a few loops
Not sure what you plan to use to play the TS file back with but there may be a loop on that too IE VLC

I've tried to re-record that TS file again IE double pass CBR but didn't see much difference, Freesteam works pretty good
Most of the professional tools from DVEO/Dektec/Alitronika can play a file in a loop which is handy

Cheers Roger
Last edited by SkyVision on Sat Nov 11, 2023 5:15 am, edited 2 times in total.

SkyVision
Posts: 54
Joined: Fri Jan 24, 2020 1:51 pm

Re: Replacing the MiniTiouner

Post by SkyVision » Sat Nov 11, 2023 4:52 am

Martin, once you've made your CBR TS file you could try Alitronika DVSstation IP that has a loop function
Here is a link with that and some other bits https://1drv.ms/f/s!ApSo-Ka6kz012SOOIOS ... o?e=Oj3936
It will let you insert errors in if that helps
Or DVSstation 4 there is the goodies box that might help

If you want generate DVB-S/S2 playing your test TS file, I think Jean-Pierre used Dektec DTA-107 PCI, the software loops and goes down to 88Ksym
The newer version is DTA-2107 PCie also goes down to 88Ksym, these are semi-professional tools, there is a couple cheap on UK ebay
But Portsdown will do that with VLC streaming your loop, there's just more moving parts

If making a nice CBR TS file Big Buck Bunny is usually a good starting point, gentle motion helps make a useful test file
But with everything low bit rate too much motion and it gets blocky

M0LNG
Posts: 22
Joined: Mon Oct 16, 2023 5:18 pm

Re: Replacing the MiniTiouner

Post by M0LNG » Sat Nov 11, 2023 3:10 pm

Roger, thanks but it's really just the low-level details of generating TS data with ffmpeg that I was looking for.

I already have a setup for turning TS data into DVB-S2 via GNU Radio and a HackRF (or other SDR TX). A file source in the GR flowgraph loops the input data. On the other end of the cable is the SF8008 receiver that I'm currently experimenting with feeding signals to, or potentially any other receiver under test. What I was looking for is the specifics of using ffmpeg to generate TS data with all the right parameters, i.e. what FreeStreamCoder etc are doing behind the scenes.

For running tests that are exactly reproducible, and dependent on the minimum amount of software, configuration and other variables, I would like to stick to just ffmpeg and GNU Radio for this, and pre-generate the TS data rather than relying on any real-time encoding setup.

I think I've figured most of it out now. From this page in the USRP docs I've found the "dvbs2rate" utility, which for a 333k symbol rate gives:

Code: Select all

$ ./dvbs2rate 333000
DVB-S2 normal FECFRAME
QPSK, pilots off
coderate = 1/4,  BCH rate = 12, ts rate = 163250.969529
coderate = 1/3,  BCH rate = 12, ts rate = 218597.229917
coderate = 2/5,  BCH rate = 12, ts rate = 262874.238227
coderate = 1/2,  BCH rate = 12, ts rate = 329289.750693
...etc.
So for 333kS FEC1/2 QPSK, assuming I leave pilots off, I want a TS stream rate of 329289bps. If I first generate some H.264/AAC video with a constant bitrate some margin below that stream rate, it seems I could just do:

Code: Select all

ffmpeg -i input.mp4 -c copy -muxrate 329289 -f mpegts test.ts
But there is also the various metadata to be attached to the transport stream. From looking at some of F1EJP's scripts, it looks like I should be adding something like:

Code: Select all

-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="Test Provider" -metadata service_name="Test Service"
But I'm not certain yet if I'm missing anything else relevant, and I'm unclear on exactly what the "mpegts_pmt_start_pid" setting does.

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

Re: Replacing the MiniTiouner

Post by G8GKQ » Sat Nov 11, 2023 3:37 pm

Hi Martin

You seem to have most of the parameters that you need there. I have always used

Code: Select all

-blocksize 1880
as well. You can set

Code: Select all

mpegts_pmt_start_pid 256
for completeness, but I don't think that it matters.

There is some code here https://github.com/davecrump/portsdown4 ... /a.sh#L882 that I wrote sometime ago for mpeg-2 transmissions. You probably want to make sure that the incoming video is H264 encoded. The Portsdown uses some custom code from F5OEO for generating an H264 transport stream; ffmpeg could probably do the job now, but was not up to it 6 years ago.

If these streams are for the "interfering" channels, what is on them doesn't matter so much. But clearly you want to have valid data on the main channel.

Dave

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

Re: Replacing the MiniTiouner

Post by g0mjw » Sat Nov 11, 2023 3:52 pm

Here is a script I used for 150k to a portsdown- but you can adjust things like the coder, resolution, frame rate etc.

c:\ffmpeg\bin\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 60k -r 10 -preset slow -profile:v main -rc cbr_hq -rc-lookahead 5 -acodec aac -aac_coder twoloop -ar 48000 -ac 1 -b:a 24k -f mpegts -muxrate 150k -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.36:10000?pkt_size=1316"

Incidentally, you can test all these with the local host and VLC. You might want something like

c:\ffmpeg\bin\ffmpeg -f dshow -i video="OBS-Camera" -thread_queue_size 512 -f dshow -i audio="OBS-Audio" -vcodec h264 -s 1280x720 -bf 0 -pix_fmt yuv420p -b:v 180k -r 15 -preset slow -profile:v main -rc cbr_hq -rc-lookahead 5 -acodec aac -aac_coder twoloop -ar 48000 -ac 1 -b:a 24k -f mpegts -muxrate 330k -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://127.0.0.1:8282?pkt_size=1316"

M0LNG
Posts: 22
Joined: Mon Oct 16, 2023 5:18 pm

Re: Replacing the MiniTiouner

Post by M0LNG » Sat Nov 11, 2023 5:47 pm

Thanks Dave & Mike, those are both very useful references.

The "pcr_period" and "pat_period" settings seem like important things I was missing.

It looks like some of the metadata options I was seeing in F1EJP's scripts are superfluous, as according to the ffmpeg docs these are all the same as the defaults, except for the provider and service names, and the 256/257 stream types for audio and video.

I can't see why the "mpegts_pmt_start_pid" should matter, since from what I'm seeing this seems to relate only to how to map multiple video streams into a single transport stream. Unless there are receivers that specifically expect a certain PMT PID range to be used? Otherwise it looks like it can probably be omitted and left at the ffmpeg default of 4096.

I think that in order to create a clean loop I will also need:

Code: Select all

-mpegts_flags initial_discontinuity
so that the receiver knows it needs to to restart decoding when the file loops around.

SkyVision
Posts: 54
Joined: Fri Jan 24, 2020 1:51 pm

Re: Replacing the MiniTiouner

Post by SkyVision » Thu Nov 16, 2023 3:46 am

Screenshot (447).png
Screenshot (447).png (868.45 KiB) Viewed 501890 times

SkyVision
Posts: 54
Joined: Fri Jan 24, 2020 1:51 pm

Re: Replacing the MiniTiouner

Post by SkyVision » Thu Nov 16, 2023 1:52 pm

Pictured is the TBS7901 Pcie mini DVBS/S2/SX card featuring M88RS6060 from Montage
I asked Montage what it can do and it's just a bog standard 950-2350mhz down to 1Msym device, according to the blurb
So lets call the Pic a "concept drawing"
There is a picture on the net with it and a Rock 5B, and Crazycat69 Github has some stuff and there is Windows and Linux suport

charlie.kim@montage-lz.com from Montage Korea said
" I need to sign a NDA to provide the more detail specification and information about it"
He needs to speak to the Organ Grinder, not the Monkey, if anyone wants to follow up on that
Probably not worth spending much time on, but they may have other devices and seem friendly

In 1999 as an up an coming Satellite Entrepreneur I visited the Earls Court Satellite Expo (I'm still selling sat boxes 24 years later)
It occured to me if someone from the BATC were to attend some DVBS Expos and network, you would get some contacts and inside info
Cabsat in Dubai is the big one, but there are others, I don't imagine there is a Sat Expo at Earls Court anymore

Cheers Roger

Post Reply

Return to “DATV - Digital ATV”