
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
hls-get-scte-segments
Advanced tools
Utility for parsing .m3u8 and extract information about CUE-OUT/CUE-IN segments
Utility for parsing .m3u8 and extract information about CUE-OUT/CUE-IN segments
import {getScteSegments} from 'hls-get-scte-segments';
const playlistText = `
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:103090
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:47.759Z
#EXTINF:5.572,
manifest_1_103090.ts
#EXT-X-DATERANGE:ID="198",START-DATE="2023-01-31T06:28:53.331Z",PLANNED-DURATION=22.087,SCTE35-OUT=0xFC302500000003289800FFF01405000000C67FEFFECA4EF5BDFE010BC8DC0EAC000000002B9AD333
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:53.331Z
#EXTINF:4.438,
manifest_1_103091.ts
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:57.769Z
#EXTINF:6.006,
manifest_1_103092.ts
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:03.775Z
#EXTINF:6.006,
manifest_1_103093.ts
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:09.781Z
#EXTINF:5.639,
manifest_1_103094.ts
#EXT-X-DATERANGE:ID="198",START-DATE="2023-01-31T06:28:53.331Z",END-DATE="2023-01-31T06:29:08.146Z",DURATION=22.089
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:15.420Z
#EXTINF:5.639,
manifest_1_103095.ts
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:21.059Z
#EXTINF:6.006,
manifest_1_103096.ts
`;
const scteSegments = getScteSegments(playlistText);
// List the URLs of CUE-OUT/CUE-IN segments
for (const segment of scteSegments) {
// segment is a Segment object parsed by hls-parser (See https://github.com/kuu/hls-parser)
console.log(`${getSuffix(segment)}${segment.uri}`);
}
// manifest_1_103091.ts => CUE-OUT
// manifest_1_103095.ts => CUE-IN
// You can also get adjacent N segments
const scteSegments = getScteSegments(playlistText, {adjacentSegments: 1});
for (const segment of scteSegments) {
console.log(`${getPrefix(segment)}${segment.uri}`);
}
// manifest_1_103090.ts
// manifest_1_103091.ts => CUE-OUT
// manifest_1_103092.ts
// manifest_1_103094.ts
// manifest_1_103095.ts => CUE-IN duration=22.089
// manifest_1_103096.ts
// You can also get all the in-between segments
const scteSegments = getScteSegments(playlistText, {hollow: false});
for (const segment of scteSegments) {
console.log(`${getPrefix(segment)}${segment.uri}`);
}
// manifest_1_103091.ts => CUE-OUT
// manifest_1_103092.ts
// manifest_1_103093.ts
// manifest_1_103094.ts
// manifest_1_103095.ts => CUE-IN duration=22.089
function getSuffix({dateRange}) {
if (!dateRange) {
return '';
}
return ` => ${dateRange.end ? 'CUE-IN duration=' + dateRange.duration : 'CUE-OUT'}`;
}
import {getScteSegments} from 'hls-get-scte-segments';
const playlistText = `
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:103090
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:47.759Z
#EXTINF:5.572,
manifest_1_103090.ts
#EXT-OATCLS-SCTE35:/DAlAAFuu/s2AP/wFAUAAAACf+/+LEknYf4AKTGxAAEBAQAASvVJ6w==
#EXT-X-CUE-OUT:22.087
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:53.331Z
#EXTINF:4.438,
manifest_1_103091.ts
#EXT-X-CUE-OUT-CONT:ElapsedTime=4.438,Duration=22.087,SCTE35=/DAlAAFuu/s2AP/wFAUAAAACf+/+LEknYf4AKTGxAAEBAQAASvVJ6w==
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:28:57.769Z
#EXTINF:6.006,
manifest_1_103092.ts
#EXT-X-CUE-OUT-CONT:ElapsedTime=10.444,Duration=22.087,SCTE35=/DAlAAFuu/s2AP/wFAUAAAACf+/+LEknYf4AKTGxAAEBAQAASvVJ6w==
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:03.775Z
#EXTINF:6.006,
manifest_1_103093.ts
#EXT-X-CUE-OUT-CONT:ElapsedTime=16.450,Duration=22.087,SCTE35=/DAlAAFuu/s2AP/wFAUAAAACf+/+LEknYf4AKTGxAAEBAQAASvVJ6w==
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:09.781Z
#EXTINF:5.639,
manifest_1_103094.ts
#EXT-X-CUE-IN
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:15.420Z
#EXTINF:5.639,
manifest_1_103095.ts
#EXT-X-PROGRAM-DATE-TIME:2023-01-31T06:29:21.059Z
#EXTINF:6.006,
manifest_1_103096.ts
`;
const scteSegments = getScteSegments(playlistText);
// List the URLs of CUE-OUT/CUE-IN segments
for (const segment of scteSegments) {
// segment is a Segment object parsed by hls-parser (See https://github.com/kuu/hls-parser)
console.log(`${getSuffix(segment)}${segment.uri}`);
}
// manifest_1_103091.ts => CUE-OUT
// manifest_1_103095.ts => CUE-IN
// You can also get adjacent N segments
const scteSegments = getScteSegments(playlistText, {adjacentSegments: 1});
for (const segment of scteSegments) {
console.log(`${getPrefix(segment)}${segment.uri}`);
}
// manifest_1_103090.ts
// manifest_1_103091.ts => CUE-OUT duration=22.087
// manifest_1_103092.ts
// manifest_1_103094.ts
// manifest_1_103095.ts => CUE-IN
// manifest_1_103096.ts
// You can also get all the in-between segments
const scteSegments = getScteSegments(playlistText, {hollow: false});
for (const segment of scteSegments) {
console.log(`${getPrefix(segment)}${segment.uri}`);
}
// manifest_1_103091.ts => CUE-OUT duration=22.087
// manifest_1_103092.ts
// manifest_1_103093.ts
// manifest_1_103094.ts
// manifest_1_103095.ts => CUE-IN
function getSuffix({markers}) {
for (const marker of markers) {
if (marker.type === 'OUT') {
return `CUE-OUT duration=${marker.duration}`;
} else if (marker.type === 'IN') {
return 'CUE-IN';
}
}
return '';
}
getScteSegments(playlist[, options])Extracts CUE-OUT/CUE-IN segments from playlist
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| playlist | string | Yes | N/A | A text data of an HLS media playlist |
An array of instances of Segment (See hls-parser)
FAQs
Utility for parsing .m3u8 and extract information about CUE-OUT/CUE-IN segments
The npm package hls-get-scte-segments receives a total of 4 weekly downloads. As such, hls-get-scte-segments popularity was classified as not popular.
We found that hls-get-scte-segments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.