Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
mp4-combiner
Advanced tools
Readme
MP4 Combiner is designed to be as simple to use as possible, the minimum you need to do to get this utility working is pass a path to a list of mp4 files, and pass a final output path.
This utility uses the heavyweight FFMPEG linux library to do the actual video processing.
This utility uses FFProbe to determine media file properties, which can automatically determine the highest quality (Height/Width + FPS).
Users can also optionally pass in overrides to FPS, Height, and Width values.
Simple API usage:
var ouputFileName = outputFile + Date.now();
var combiner = Combiner({
// Override the Minium FPS allowed (if no override set)
min_fps: 24,
// Override the Minimum Height allowed (if no override set)
min_height: 360,
// Override the Minimum Width allowed (if no override set)
min_height: 600,
// Override the processing speed (how slow/carefully FFMPEG does the video processing)
encoding_speed: "fast",
// Display the logs from FFMPEG
display_logs: true,
// Override the output FPS
fps_override: 10,
// Override the output Height
height_override: 150,
// Override the output Width
width_override: 200,
});
combiner.Combine([files.sampleVideo1, files.sampleVideo2, files.sampleVideo1], ouputFileName)
.then(function() {
console.log("You will now have a file at " + ouputFileName ".mp4");
})
.catch(function(err) {
console.log("Error combining MP4 files: ", err);
});
npm install mp4-combiner --save
var Combiner = require('mp4-combiner');
var combiner = Combiner({
min_fps: 24,
min_height: 360,
min_height: 600,
encoding_speed: "fast",
display_logs: true,
fps_override: 10,
height_override: 150,
width_override: 200,
});
Option | Default | Description |
---|---|---|
min_fps | 24 | The Minimum FPS allowed. If an FPS override is set, this has no effect. |
min_height | 600 | The Minimum Height allowed. If a Height override is set, this has no effect. |
min_width | 600 | The Minimum Width allowed. If a Width override is set, this has no effect. |
encoding_speed | medium | The FFMPEG Encoding Speed. Has to be one of the following presets: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow. Be careful using faster encoding presets, this will potentially cause frame drops, or other issues. Use at your own risk. |
display_logs | false | Display the FFMPEG Logs during Encoding. Completely optional, for testing we would recommend keeping them on. |
fps_override | Sets the output FPS. | |
height_override | Sets the output Height. | |
width_override | Sets the output Width. |
If no Overrides are set for FPS, Width, and Height this utility will do its best to determine the optimal output video.
The process of determining this optimal video is looping through all of the input files, extracting media information with FFProbe, extracting the largest width (width and height are paired, so largest width video's height will be the chosen height), and extracting the highest FPS.
An example of how this would look is the following: Video #1: Width 600, Height: 600, FPS 15 Video #2: Width: 1280, Height: 720, FPS: 24 Video #3: Width: 1080, Height: 729, FPS: 30
The final video will have the following info: Width: 1280, Height: 720, FPS: 30
You can always override these values if you so choose, this is just our attempt to help reducing developer overhead if all the videos are similar dimensions.
We have the following advice for developers using this Utility:
If you just want to play around with this utility, to see how it works, to see what optimal settings may be, etc. Clone the underlying repository and update the testing directory.
Add a new test similar to the test called "Success #3 - with overrides", adding your own mp4 files you want to play around with.
To run the tests, in your linux shell type: mocha test
If you set everything up correctly, you will start seeing the tests being run sequentially, your test will execute at the end, once done, you can find the combined video file.
FAQs
Simple Node package to combine Mp4 files at the highest possible resolution, and framerate. Relies on some heavy weight packages, and some linux shell scripting to build a video file.
The npm package mp4-combiner receives a total of 0 weekly downloads. As such, mp4-combiner popularity was classified as not popular.
We found that mp4-combiner 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.