Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.31 KB

sidecar.md

File metadata and controls

73 lines (53 loc) · 2.31 KB

Sidecar Files

  • Sidecar files are an easy way to insert SCTE-35 into MPEGTS streams or HLS manifests. It's a simplier SCTE-104.
a@debian:~/x9k3$ cat sidecar.txt

38103.868589, /DAxAAAAAAAAAP/wFAUAAABdf+/+zHRtOn4Ae6DOAAAAAAAMAQpDVUVJsZ8xMjEqLYemJQ== 
38199.918911, /DAsAAAAAAAAAP/wDwUAAABef0/+zPACTQAAAAAADAEKQ1VFSbGfMTIxIxGolm0= 
  • line format for sidecar file is insert_pts, cue ,

    • like 38103.868589, /DAxAAAAAAAAAP/wFAUAAABdf+/+zHRtOn4Ae6DOAAAAAAAMAQpDVUVJsZ8xMjEqLYemJQ==
  • pts is the insert time for the cue, cue can be base64,hex, int, or bytes.

  • The insert_pts has to be valid for the video, meaning if your insert_pts is 38103.868589, the video PTS has to be less than 38103.868589 for the cue to be inserted.

  • Sidecar files can be made manually or generated by threefive

    • Generate a sidecar file from an existing video
    threefive sidecar video.ts
    • Will generate a sidecar file named sidecar.txt with the Cues from video.ts
  • Insert SCTE-35 Cues from a sidecar file into an mpegts file.

    • threefive inject [input video] with [sidecar file] at [pid of new SCTE-35 stream]
a@fu:~/build/SCTE35_threefive$ threefive inject video.ts with ~/sidecar.txt at 777

Output File:    superkabuki-video.ts
PMT Section Length: 60
Program Number: 1
PCR PID: 256
Program Info Length: 6

Added Registration Descriptor:
        b'\x05\x04CUEI'

Found Streams:
        Stream Type: 0x1b  PID: 256  EI Len:  0
        Stream Type: 0xf  PID: 257  EI Len:  6
        Stream Type: 0x86  PID: 258  EI Len:  0
        Stream Type: 0x15  PID: 259  EI Len:  15

Added Stream:
        Stream Type: 0x86 PID: 777 EI Len:  0

Inserted Cue:
        @72668.9952, /DAgAAAAAAAAAP/wDwUAAAABf//+AA27oAABAAAAANwB3tE=

Inserted Cue:
        @72670.9972, /DAgAAAAAAAAAP/wDwUAAAABf//+AKTLgAABAAAAANaNPVc=

Inserted Cue:
        @72672.9992, /DAgAAAAAAAAAP/wDwUAAAABf//+AFJlwAABAAAAAMOOklg=

Inserted Cue:
        @72675.0012, /DAgAAAAAAAAAP/wDwUAAAABf//+AA27oAABAAAAANwB3tE=

Inserted Cue:
        @72677.0032, /DAgAAAAAAAAAP/wDwUAAAABf//+AKTLgAABAAAAANaNPVc=

Inserted Cue:
        @72679.0052, /DAgAAAAAAAAAP/wDwUAAAABf//+AFJlwAABAAAAAMOOklg=

Inserted Cue:
        @72681.0072, /DAgAAAAAAAAAP/wDwUAAAABf//+AA27oAABAAAAANwB3tE=
a@fu:~/build/SCTE35_threefive$ 
  • output filename will be superkabuki-video.ts