- 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==
- like
-
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.
-
adbreak2 can be used to generate splice inserts for sidecar files.
-
Generate a "CUE-OUT" and "CUE-IN" with adbreak2
a@fu:~/cuei$ adbreak2 --duration 240 --event-id=1234 --pts 1234.567890 --sidecar my_sidecar.txt
Writing to sidecar file: my_sidecar.txt
CUE-OUT PTS:1234.567889 Id:1234 Duration: 240.0
CUE-IN PTS:1474.567889 Id:1235
a@fu:~/cuei$ cat my_sidecar.txt
1234.56789,/DAlAAAAAAAAAP/wFAUAAATSf+/+Bp9rxv4BSZcABNIAAAAA9RqQjw==
1474.56789,/DAgAAAAAAAAAP/wDwUAAATTf0/+B+kCxgTTAAAAALukcWw=
-
Sidecar files can also be 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