Live Stream API는 광고 시점을 실시간 스트림에 삽입할 수 있는 두 가지 방법을 지원합니다.
- 광고 시점 채널 이벤트 만들기
- 대역 내 SCTE-35 명령어 삽입
이 페이지에서는 광고 시점에 사용되는 대역 내 SCTE-35 명령어를 설명합니다.
광고 마커는 입력 스트림에 전달되며 SCTE-35 사양 케이블 디지털 프로그램 삽입 큐 메시지를 준수해야 합니다.
SCTE-35 데이터는 0x86
과 같은 기본 스트림 유형을 사용하여 MPEG-TS 기본 데이터 스트림에서 전달할 수 있습니다. SRT 입력 스트림만 대역 SCTE-35 명령어를 수집하는 데 사용할 수 있습니다.
Live Stream API는 TS 기본 스트림의 모든 PID를 파싱합니다.
Live Stream API는 SCTE-35 명령어 목록 내에서 SCTE-35에 정의된 splice_insert
명령어를 지원합니다.
HLS 매니페스트 파일
HLS의 경우 각 splice 명령어는 매니페스트 재생목록에서 #EXT-X-CUE-OUT/#EXT-X-CUE-OUT-CONT/#EXT-X-CUE-IN
마커를 생성합니다. splice 명령어는 다음과 같이 SCTE-35 데이터를 base64 형식으로 인코딩한 #EXT-OATCLS-SCTE35
항목을 생성합니다.
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:44:44.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000007.m4s
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:44:48.143Z
#EXTINF:1.212833
720p60_h264_fmp4-0000000008.m4s
#EXT-OATCLS-SCTE35:/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-CUE-OUT:45.000000
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:44:49.356Z
#EXTINF:2.787167
720p60_h264_fmp4-0000000009.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=2.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:44:52.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000010.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=6.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:44:56.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000011.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=10.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:00.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000012.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=14.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:04.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000013.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=18.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:08.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000014.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=22.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:12.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000015.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=26.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:16.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000016.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=30.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:20.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000017.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=34.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:24.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000018.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=38.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:28.143Z
#EXTINF:4.000000
720p60_h264_fmp4-0000000019.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=42.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:32.143Z
#EXTINF:2.000000
720p60_h264_fmp4-0000000020.m4s
#EXT-X-CUE-OUT-CONT:ElapsedTime=44.787167,Duration=45.000000,SCTE35=/DAlAAAAAAAAAP/wFAVDE1agf+//yBysA/4APcxQAAAAAAAAXhEvvQ==
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:34.143Z
#EXTINF:0.212833
720p60_h264_fmp4-0000000021.m4s
#EXT-X-CUE-IN
#EXT-X-PROGRAM-DATE-TIME:2023-05-19T17:45:34.358Z
#EXTINF:3.784522
720p60_h264_fmp4-0000000022.m4s
DASH 매니페스트 파일
DASH의 경우 각 splice 명령어는 MPD 파일에 <EventStream>
섹션이 있는 새 기간을 다음과 같이 생성합니다.
<Period id="Dash-32.475" start="PT32.475S">
<AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720">
<Representation mimeType="video/mp4" id="720p60_h264_fmp4" codecs="avc1.4d001f" width="1280" height="720" startWithSAP="1" bandwidth="2100000">
<SegmentTemplate timescale="1000000" initialization="720p60_h264_fmp4/720p60_h264_fmp4-initialization_segment_0000000000.m4s" media="720p60_h264_fmp4/720p60_h264_fmp4-$Number%010d$.m4s" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
<Representation mimeType="video/mp4" id="360p30_h264_fmp4" codecs="avc1.4d001e" width="640" height="360" startWithSAP="1" bandwidth="600000">
<SegmentTemplate timescale="1000000" initialization="360p30_h264_fmp4/360p30_h264_fmp4-initialization_segment_0000000000.m4s" media="360p30_h264_fmp4/360p30_h264_fmp4-$Number%010d$.m4s" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" mimeType="audio/mp4" id="1" label="441k_160_aac_fmp4">
<Representation id="441k_160_aac_fmp4" codecs="mp4a.40.2" audioSamplingRate="44100" startWithSAP="1" bandwidth="160000">
<SegmentTemplate timescale="1000000" initialization="441k_160_aac_fmp4/441k_160_aac_fmp4-initialization_segment_0000000000.m4s" media="441k_160_aac_fmp4/441k_160_aac_fmp4-$Number%010d$.m4s" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" mimeType="audio/mp4" id="2" label="48k_160_aac_fmp4">
<Representation id="48k_160_aac_fmp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128000">
<SegmentTemplate timescale="1000000" initialization="48k_160_aac_fmp4/48k_160_aac_fmp4-initialization_segment_0000000000.m4s" media="48k_160_aac_fmp4/48k_160_aac_fmp4-$Number%010d$.m4s" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet contentType="text" lang="en-US" segmentAlignment="true">
<Representation mimeType="text/vtt" id="caption_webvtt_en_webvtt" bandwidth="4698">
<SegmentTemplate timescale="1000000" media="caption_webvtt_en_webvtt/caption_webvtt_en_webvtt-$Number%010d$.vtt" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet contentType="text" lang="es-CO" segmentAlignment="true">
<Representation mimeType="text/vtt" id="caption_webvtt_es_webvtt" bandwidth="5450">
<SegmentTemplate timescale="1000000" media="caption_webvtt_es_webvtt/caption_webvtt_es_webvtt-$Number%010d$.vtt" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet contentType="text" lang="zh-CN" segmentAlignment="true">
<Representation mimeType="text/vtt" id="caption_webvtt_zh_webvtt" bandwidth="7329">
<SegmentTemplate timescale="1000000" media="caption_webvtt_zh_webvtt/caption_webvtt_zh_webvtt-$Number%010d$.vtt" startNumber="9" presentationTimeOffset="1684475755212833">
<SegmentTimeline>
<S t="1684475755212833" d="2787167"/>
<S t="1684475758000000" d="4000000" r="9"/>
<S t="1684475798000000" d="2000000"/>
<S t="1684475800000000" d="212833"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<EventStream timescale="1000000" schemeIdUri="urn:scte:scte35:2013:xml">
<Event duration="45000000" id="1684475755">
<SpliceInfoSection xmlns="http://www.scte.org/schemas/35">
<SpliceInsert outOfNetworkIndicator="true" spliceImmediateFlag="true">
<BreakDuration autoReturn="true" duration="45000000"/>
</SpliceInsert>
</SpliceInfoSection>
</Event>
</EventStream>
</Period>