-
Notifications
You must be signed in to change notification settings - Fork 30
PCR decoding #17
This idea would be useful for me and I may implement it at some point. I post it here for later reference and to share thoughts.
I would like to see the PCR timestamp (pcr_time) of each message, where available.
The PCR PID of a program is indicated in the PCR_PID field of the PMT. The PCR timestamp itself is located in the adaptation_field of said PID. Often the PCR_PID equals the video PID. Base PCR has the same 90k resolution as PTS, and some additional bits to increase the resolution to 27M but we don't need that.
I think the right approach for the first attempt is to just use the latest received base PCR value for this message's program, however this simple solution comes with some jitter. PCRs are transmitted at intervals of sub 100 ms so some interpolation is needed if we want to be more accurate.
All reactions
Replies: 1 comment 1 reply
SCTE35 doesn't use PCR, only PTS.
All reactions
it's in there now..... :)
{
"info_section": {
"table_id": "0xfc",
"section_syntax_indicator": false,
"private": false,
"sap_type": "0x3",
"sap_details": "No Sap Type",
"section_length": 42,
"protocol_version": 0,
"encrypted_packet": false,
"encryption_algorithm": 0,
"pts_adjustment": 0.0,
"cw_index": "0xff",
"tier": "0xfff",
"splice_command_length": 15,
"splice_command_type": 5,
"descriptor_loop_length": 10
},
"command": {
"calculated_length": 15,
"name": "Splice Insert",
"time_specified_flag": true,
"pts_time": 22960.350067,
"splice_event_id": 24,
"splice_event_cancel_indicator": false,
"out_of_network_indicator": false,
"program_splice_flag": true,
"duration_flag": false,
"splice_immediate_flag": false,
"unique_program_id": 1,
"avail_num": 8,
"avail_expected": 255
},
"descriptors": [
{
"tag": 0,
"descriptor_length": 8,
"name": "Avail Descriptor",
"identifier": "CUEI",
"provider_avail_id": 8
}
],
"crc": "0xd497da82",
"pid": "0x415",
"program": 1040,
"pcr": 22953.875478,
"pts": 22953.910044
}