#network #stream #dump #file #transport #data #rtp

app scte35dump

Dump SCTE-35 data from a Transport Stream contained within a file or RTP network stream

7 releases

✓ Uses Rust 2018 edition

0.1.6 Jul 19, 2019
0.1.5 Dec 4, 2018
0.1.4 Sep 27, 2018
0.1.3 Apr 25, 2018
0.1.2 Mar 15, 2018

#10 in Video

Download history 47/week @ 2019-07-06 9/week @ 2019-07-13 10/week @ 2019-07-20 11/week @ 2019-07-27 20/week @ 2019-08-03 12/week @ 2019-08-10 2/week @ 2019-08-17 16/week @ 2019-08-24 13/week @ 2019-08-31 28/week @ 2019-09-07 46/week @ 2019-09-14 22/week @ 2019-09-21 10/week @ 2019-09-28 10/week @ 2019-10-05 5/week @ 2019-10-12

94 downloads per month

MIT/Apache

30KB
595 lines

scte35dump

Dump SCTE-35 data from a Transport Stream contained within a file or RTP network stream

USAGE:
    scte35dump [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    file       Read a transport stream from the named file
    help       Prints this message or the help of the given subcommand(s)
    net        Read an RTP-encapsulated transport stream from the network
    section    Decode a single splice_info section value given on the command line

Install

  1. Install rustup: https://rustup.rs/ (which will give you a Rust build env, including the cargo tool)
  2. Run cargo install scte35dump
  3. Run scte35dump --help for usage instructions

SCTE-35 spec coverage

Not all commands are currently implemented:

  • splice_null()
  • splice_schedule()
  • splice_insert()
  • time_signal()
  • bandwidth_reservation()
  • private_command()

Examples

The file subcommand

Dump from a local transport stream file

scte35dump file test-dump.ts

The net subcommand

Dump from an RTP multicast stream

$ scte35dump net -m 234.10.10.1 -p 5001 --ifaddr 192.168.0.11
unhandled pid 264
unhandled pid 8191
unhandled pid 256
unhandled pid 1500
unhandled pid 4096
new table for pid 4096, program 1
new PMT entry PID 256 (in program_number 1)
new PMT entry PID 264 (in program_number 1)
new PMT entry PID 1500 (in program_number 1)
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceInsert {
    splice_event_id: 1,
    reserved: 127,
    splice_detail: Insert {
        network_indicator: In,
        splice_mode: Program(
            Immediate
        ),
        duration: Some(
            SpliceDuration {
                return_mode: Manual,
                duration: 10800000
            }
        ),
        unique_program_id: 1,
        avail_num: 0,
        avails_expected: 0
    }
}
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 0 } SpliceNull

The section subcommand

Dump a base64-encoded section string passed as a command-line argument

$ scte35dump section --base64 "/DAlAAAAAAAAAP/wFAUAAAABf+/+LRQrAP4BI9MIAAEBAQAAfxV6SQ=="
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 4095 } SpliceInsert {
    splice_event_id: 1,
    reserved: 127,
    splice_detail: Insert {
        network_indicator: Out,
        splice_mode: Program(
            Timed(
                Some(
                    756296448
                )
            )
        ),
        duration: Some(
            SpliceDuration {
                return_mode: Automatic,
                duration: 19125000
            }
        ),
        unique_program_id: 1,
        avail_num: 1,
        avails_expected: 1
    }
}

Dump a hexidecimal-encoded section string passed as a command-line argument

$ scte35dump section --hex "fc302500000000000000fff01405000000017feffe2d142b00fe0123d3080001010100007f157a49"
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 4095 } SpliceInsert {
    splice_event_id: 1,
    reserved: 127,
    splice_detail: Insert {
        network_indicator: Out,
        splice_mode: Program(
            Timed(
                Some(
                    756296448
                )
            )
        ),
        duration: Some(
            SpliceDuration {
                return_mode: Automatic,
                duration: 19125000
            }
        ),
        unique_program_id: 1,
        avail_num: 1,
        avails_expected: 1
    }
}

Dependencies

~7.5MB
~151K SLoC