[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] dtv-questions
From: |
Ralph A. Schmid, dk5ras |
Subject: |
Re: [Discuss-gnuradio] dtv-questions |
Date: |
Mon, 18 May 2015 12:32:38 +0200 |
Thanks a lot for the detailed explanation. This will help me!!
Ralph.
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Ron
Economos
Sent: Monday, May 18, 2015 03:53
To: address@hidden
Subject: Re: [Discuss-gnuradio] dtv-questions
The primary requirement is to the set the Transport Stream bitrate properly.
Otherwise, you'll get audio or video stuttering. For DVB-T, the bitrate
calculation is straight forward, and there are only so many combinations. I
have a command line utility here.
https://github.com/drmpeg/dtv-utils/blob/master/dvbtrate.c
For DVB-T2, the bitrate calculation is much more complex, and there are a
huge number of combinations. I have a command line utility, but I've been
reluctant to publish it on Github since it's so difficult to use.
What it really needs is a GUI, but I haven't got around to that.
However, it does work and I've put a copy on my website.
http://www.w6rz.net/dvbt2rate.c
You have to enter eleven parameters like so:
usage: dvbt2rate <channel bandwidth> <fft size> <guard interval> <number of
data symbols> <number of FEC blocks> <code rate> <modulation> <frame
size> <extended carrier> <pilot pattern> <L1 modulation>
For example, the BBC 32K mode (vv003-cr23.grc flow graph) would be:
./dvbt2rate 8 32 4 59 202 3 4 0 1 7 3
The results are:
$ ./dvbt2rate 8 32 4 59 202 3 4 0 1 7 3
FFT size = 32768
guard interval = 1/128
number of data symbols = 59
number of FEC blocks = 202
code rate = 2/3
constellation = 256QAM
frame size = normal
carrier mode = extended
pilot pattern = PP7
L1 constellation = 64QAM
clock rate = 9142857.142857, TF = 216.944000 ms
bitrate = 40214645.204775
max symbols = 68, max blocks = 229
symbols = 60, max blocks = 202
cells = 1639268, stream = 1636200, L1 = 2090, dummy = 978, unmodulated = 0
The bitrate for that mode is 40.214645 Mbps.
For the other test flow graph (vv009-4kfft.grc) it would be:
$ ./dvbt2rate 8 4 0 100 31 3 3 0 0 7 2
FFT size = 4096
guard interval = 1/32
number of data symbols = 100
number of FEC blocks = 31
code rate = 2/3
constellation = 64QAM
frame size = normal
carrier mode = normal
pilot pattern = PP7
L1 constellation = 16QAM
clock rate = 9142857.142857, TF = 48.272000 ms
bitrate = 27588664.235996
max symbols = 541, max blocks = 166
symbols = 104, max blocks = 31
cells = 341682, stream = 334800, L1 = 2216, dummy = 4192, unmodulated = 474
The bitrate for that mode is 27.588664 Mbps.
There are two rules that must be followed. First, the DVB-T2 frame
length (TF) can't be longer than 250 milliseconds. Second, the number of
"dummy" cells must be positive or 0. Dummy cells are just filler to
match the number of cells in FEC blocks to the number of cells in OFDM
symbols. To get the maximum bitrate, you want to select the number of
symbols and number of FEC blocks combination that minimizes the number
of dummy cells.
In the first example, the line "max symbols = 68, max blocks = 229" is
showing the maximum number of symbols and FEC blocks that will fit in
250 milliseconds. The line "symbols = 60, max blocks = 202" is showing
the total number of symbols you've chosen (in this case, 59 data symbols
+ 1 P2 symbol = 60) and the maximum number of FEC blocks that will fit
into that number of symbols.
Here's the guideline for choosing DVB-T2 parameters. See chapter 5.
http://www.etsi.org/deliver/etsi_ts/102800_102899/102831/01.02.01_60/ts_1028
31v010201p.pdf
If you do some Googling, there are probably some DVB-T2 bitrate
calculators available that are much easier to use.
As for PID selection, the range 1 to 0x1f is reserved for specific DVB
functions, so stay away from those. For my test streams, I've been using:
PAT = 0 (the PAT is always at PID 0);
PMT = 0x30
Video and PCR = 0x31
Audio = 0x34
Stuffing = 0x1fff (stuffing packets are always PID 0x1fff)
Most receivers will decode a simple Transport Stream without any
additional PIDs or service information beyond PAT, PMT, PCR, video,
audio and stuffing. If you want to get more complex, the DVB
specification for service information is here:
http://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_3004
68v011401p.pdf
Ron
On 05/17/2015 07:48 AM, Rafael Diniz wrote:
> Hi Ralph,
>
> I don't think there is something specific inside the TS for a
> transmission mode, unless there are some packets or packet complement,
> just like in ISDB-T (I do not know too much about DVB-T2), where you
> place information of which PID goes to which hierarchical layer.
>
> All you have to do is configure your MPEG2-TS muxer to place all the
> information you want inside the TS.
>
> I recommend the Open Broadcast Encoder:
> http://obe.tv/download
>
> Best regards,
> Rafael Diniz
>
> On 2015-05-17 11:36, Ralph A. Schmid, dk5ras wrote:
>> Hi,
>>
>>
>>
>> when playing with DVB-T2, I see there are example ts files of different
>> size, somehow optimized for the transmission mode, 4k or 8k, 64QAM or
>> 256QAM.
>>
>>
>>
>> Now when I have a look at them with my recoding software, they all look
>> identical, same bitrate and stuff, just different size. So I wonder,
>> what
>> are the differences, what qualifies a transport stream for a certain
>> transmission mode? I would like to prepare some on my own :)
>>
>>
>>
>> And another question, how do I set the ID stuff, name, PID?
>
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio