DVB : PCR Jitter Calculation Tool

Example : If TS Video file is networking.ts


Calculating PCR JITTER:

ts2pes -v < notworking.ts | grep original_program_clock_reference_base

program_clock_reference_base:          488299937
program_clock_reference_extension:     83
program_clock_reference_base:          488299881
program_clock_reference_extension:     19
program_clock_reference_base:          488303219
program_clock_reference_extension:     85
program_clock_reference_base:          488303163
program_clock_reference_extension:     22



####################################################################################


ts2pes -v < notworking.ts | grep program_clock_reference_base
Program_clock_reference_base:         15480
program_clock_reference_base:          18810
original_program_clock_reference_base: 488313009
program_clock_reference_base:          22050
original_program_clock_reference_base: 488316291
program_clock_reference_base:          25380
original_program_clock_reference_base: 488319573
program_clock_reference_base:          28620
original_program_clock_reference_base: 488322855
program_clock_reference_base:          31950
original_program_clock_reference_base: 488326137
program_clock_reference_base:          35190
original_program_clock_reference_base: 488329419
program_clock_reference_base:          38520

####################################################################################PCR Value = PCR_base 488303219 * 300 + PCR_EXT 85 = 146490965785 , where as 300 is a pcr module clk extension

####################################################################################

12230: pid 3330, new pcr is 146489981183 (5425.554859 sec)

59418: pid 3330, new pcr is 146490965785 (5425.591325 sec), pcr delta is 984602, (36.466741 ms), indices delta is 47188 bytes,( 94.376000 ms), pcr accuracy is -0.0579092593, instant ts bit rate is 10352008.2226117756

####################################################################################

"%llu: pid %d, new pcr is %llu (%f sec), pcr delta is %llu, (%f ms), indices delta is %llu bytes,( %f ms), pcr accuracy is %.10f, instant ts bit rate is %.10f\n"

1.9117634:                        = %llu:

2.pid 4430                        = pid %d

3.new pcr is 146490965785 (5425.591325 sec)    = new pcr is %llu (%f sec)

4.pcr delta is 984602, (36.466741 ms)          = pcr delta is %llu, (%f ms)

5.indices delta is 47188 bytes,( 94.376000 ms) = indices delta is %llu bytes,( %f ms)

6.pcr accuracy is -0.0579092593                = pcr accuracy is %.10f

7.instant ts bit rate is 10352008.2226117756   = instant ts bit rate is %.10f\n

####################################################################################

1.new_pcr_index,pid,new_pcr,((double)(new_pcr) / SYSTEM_CLOCK_FREQUENCY) //new pcr in sec
 
2.new_pcr - pid_pcr_table[pid], ((double)((new_pcr - pid_pcr_table[pid]) * 1000)) / SYSTEM_CLOCK_FREQUENCY, //pcr delta

3.new_pcr_index - pid_pcr_index_table[pid],((double)((new_pcr_index - pid_pcr_index_table[pid]) * 8 * 1000)) / ibits,  //indices delta

4.(((double) (new_pcr - pid_pcr_table[pid])) / SYSTEM_CLOCK_FREQUENCY) - (((double)(new_pcr_index - pid_pcr_index_table[pid])) * 8 / ibits), //pcr accuracy

5.(((double)(new_pcr_index - pid_pcr_index_table[pid])) * 8 * SYSTEM_CLOCK_FREQUENCY) /  ((double)(new_pcr - pid_pcr_table[pid]))  // instant bitrate
                );
6.pid_pcr_table[pid] = new_pcr;

7.pid_pcr_index_table[pid] = new_pcr_index;


#####################################################################################

new_pcr             = pcr value
System_clk_freq     = 27000000
pid_pcr_table[pid]  = previous pcr value of same pid
new_pcr_index       = current (new) pcr index
pid_pcr_index_table = previous pcr index of same pid
ibits                = input bitrate of file (contant)

#####################################################################################
FOR MORE INFO EMAIL ME : Deviceporting@gmail.com 

No comments:

Post a Comment

Thank You , For Immediate Assistance Plz Put Email Copy to Deviceporting@gmail.com