futzu / SCTE35_threefive

threefive is the one you want. threefive is the best SCTE-35 tool available. SCTE-35 Decoder, SCTE-35 Encoder, SCTE-35 Parser.
https://slow.golf
MIT License
136 stars 26 forks source link

encoding a signal with auto_return = true #90

Closed scunning1987 closed 11 months ago

scunning1987 commented 11 months ago

Hi Adrian,

I can't tell if this is supposed to be supported or not, but I have a use case where I need to generate a SCTE35 with auto_return = true .

From your code I see various mentions of cmd.break_auto_return, but when I try to encode a SCTE35 (TimeSignal) with this set to True, it seems to be ignored. Please let me know, thanks.

futzu commented 11 months ago

Good to see you man, you doing okay?

I just looked this up about an hour ago for a different issue,

Adrian

{
    "info_section": {
        "table_id": "0xfc",
        "section_syntax_indicator": false,
        "private": false,
        "sap_type": "0x3",
        "sap_details": "No Sap Type",
        "section_length": 64,
        "protocol_version": 0,
        "encrypted_packet": false,
        "encryption_algorithm": 0,
        "pts_adjustment_ticks": 207000,
        "pts_adjustment": 2.3,
        "cw_index": "0x0",
        "tier": "0x0",
        "splice_command_length": 5,
        "splice_command_type": 6,
        "descriptor_loop_length": 42,
        "crc": "0xa6bfc57f"
    },
    "command": {
        "command_length": 5,
        "command_type": 6,
        "name": "Time Signal",
        "time_specified_flag": true,
        "pts_time": 26363.038756,
        "pts_time_ticks": 2372673488
    },
    "descriptors": [
        {
            "tag": 2,
            "descriptor_length": 40,
            "name": "Segmentation Descriptor",
            "identifier": "CUEI",
            "components": [],
            "segmentation_event_id": "0xffffffff",
            "segmentation_event_cancel_indicator": false,
            "program_segmentation_flag": true,
            "segmentation_duration_flag": true,                     <--- set  segmentation_duration_flag
            "delivery_not_restricted_flag": true,
            "segmentation_duration": 1200.0,                        <---set  segmentation_duration
            "segmentation_duration_ticks": 108000000,
            "segmentation_message": "Break Start",    <----- Indicated by segmentation_type_id
            "segmentation_upid_type": 1,
            "segmentation_upid_type_name": "Deprecated",
            "segmentation_upid_length": 20,
            "segmentation_upid": REDACTED",
            "segmentation_type_id": 34,                   <-------- segmentation_type_id of 34 "Break Start
            "segment_num": 1,
            "segments_expected": 0
        }
    ]
}
scunning1987 commented 11 months ago

Hi,

All good here, I appreciate the response.

I'll revert to using an End time signal instead of auto_return.

Thanks, Scott