Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
HLSMaker is a library that helps create HLS (HTTP Live Streaming) video segments from a source file. HLS is a protocol for distributing video over the internet.
HLSMaker is a library that helps create HLS (HTTP Live Streaming) video segments from a source file. HLS is a protocol for distributing video over the internet.
Install the library from npm:
npm install hls-maker
import { HLSMaker, HLSMakerConfig } from 'hls-maker';
const options: HLSMakerConfig = {
sourceFilePath: 'path/to/source/video.mp4',
// Other options as per your requirements
};
const hlsMaker = new HLSMaker(options);
// Start the conversion process
hlsMaker.conversion(progress => {
console.log(`Progress: ${progress.percent}%`);
}).then(() => {
console.log('Conversion completed');
}).catch(error => {
console.error('Error:', error);
});
import { HLSMaker, HLSMakerConfig } from 'hls-maker';
const options: HLSMakerConfig = {
sourceFilePath: 'path/to/source/video.mp4',
// Other options as per your requirements
};
async function convertVideo() {
const hlsMaker = new HLSMaker(options);
try {
await hlsMaker.conversion();
console.log('Conversion completed');
} catch (error) {
console.error('Error:', error);
}
}
convertVideo();
You can concatenate HLS streams using the concat method. This method combines multiple HLS streams into a single stream.
import { HLSMaker, ConcatConfig } from 'hls-maker';
const options: ConcatConfig = {
sourceFilePath: 'path/to/first/video.mp4',
hlsManifestPath: 'path/to/concatenated/output.m3u8',
isLast: true // Set to true if this is the last stream in the sequence
};
HLSMaker.concat(options, function (process) {
console.log("Processing", process);
});
import { HLSMaker, ConcatConfig } from 'hls-maker';
const options: ConcatConfig = {
sourceFilePath: 'path/to/first/video.m3u8',
hlsManifestPath: 'path/to/concatenated/output.m3u8',
isLast: true // Set to true if this is the last stream in the sequence
};
async function concatVideos() {
try {
await HLSMaker.concat(options);
console.log('Concatenation completed');
} catch (error) {
console.error('Error:', error);
}
}
concatVideos();
You can insert HLS streams using the insert method. This method combines multiple HLS streams into a single stream.
await HLSMaker.insert({
hlsManifestPath: 'path/to/first/output.m3u8',
sourceHlsManifestPath: 'path/to/source/input.m3u8',
spliceIndex: 10 // insert from segment index
splicePercent: 30// insert from segment percent
});
sourceFilePath
(required): Path to the source file.hlsStartTime
: Start time for segmenting in HLS.hlsDuration
: Duration of the segment for HLS.hlsManifestPath
: Path to the HLS manifest file after segmenting.hlsSegmentDuration
: Duration of each segment (in seconds).hlsListSize
: Manifest list size.appendMode
(required): Append mode for segments.endlessMode
(required): Endless mode (no termination).sourceFilePath
(required): Path to the source file of the first segment.hlsManifestPath
(required): Path to the output manifest file after concatenation.isLast
(required): Set to true if this is the last stream in the sequence.Contact the author: hunglsxx@gmail.com
This library is released under the MIT License.
FAQs
HLSMaker is a library that helps create HLS (HTTP Live Streaming) video segments from a source file. HLS is a protocol for distributing video over the internet.
The npm package hls-maker receives a total of 3 weekly downloads. As such, hls-maker popularity was classified as not popular.
We found that hls-maker 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.