
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
grunt-ffmpeg
Advanced tools

Grunt task to wrap ffmpeg using node-fluent-ffmpeg
You need FFmpeg >= 0.9 installed to work with this plugin. Read about it here
npm install grunt-ffmpeg --save-dev
Type: Boolien
Default: false
debug mode (now only for displaying ffmpeg command)
Type: String
Default: undefined
Example: '1000k' - 1000 kbps
Generated video bitrate
Type: String
Default: undefined
Example: '64k' - 64 kbps
Generated audio bitrate
Type: String
Default: undefined (don't chage size)
Example: '800x600'
Generated video size WIDTH x HEIGHT
Type: Object
Default: undefined
Example:
{
withAudioChannels: 1
}
Object of extra node-fluent-ffmpeg options. Full list here
You can merge FFmpegOptions from options and actual task config:
ffmpeg: {
options: {
FFmpegOptions: {
withVideoCodec: 'libx624',
withAudioChannels: 2
}
},
compile: {
options: {
FFmpegOptions: {
withAudioChannels: 1,
withAspectRatio: 1.33
}
},
files: [...]
}
}
With this config compile task will have this FFmpegOptions:
FFmpegOptions: {
withVideoCodec: 'libx624', // from options
withAudioChannels: 1, // merge task.options with options
withAspectRatio: 1.33 // from task.options
}
Type: Function
Default: undefined
input: String input file name
ouptut: String output file name
Triggers when single file decoding is finished
Type: Function
Default: undefined
err: String error message
input: String input file name
ouptut: String output file name
Triggers when single file decoding has an error
Type: Function
Default: undefined
data: Object codec data object
input: String input file name
Triggers on single file and give codec info object
Generate *.mp4 files from *.avi and *.flv source files
grunt.initConfig({
ffmpeg: {
video: {
files: [{
expand: true,
cwd: 'video_source',
src: ['*.avi', '*.flv'],
dest: 'dist',
ext: '.mp4'
}]
}
}
});
grunt.loadNpmTasks('grunt-ffmpeg');
grunt.registerTask('default', ['ffmpeg']);
Generate *.ogg and *.mp3 files from *.wav source files
grunt.initConfig({
ffmpeg: {
audio: {
files: [{
expand: true,
cwd: 'test/assets',
src: ['*.wav'],
dest: 'dist',
ext: '.ogg'
},{
expand: true,
cwd: 'test/assets',
src: ['*.wav'],
dest: 'dist',
ext: '.mp3'
}]
}
}
});
grunt.loadNpmTasks('grunt-ffmpeg');
grunt.registerTask('default', ['ffmpeg']);
Generate *.ogg and *.mp3 files from *.wav source files
grunt.initConfig({
ffmpeg: {
compile: {
options: {
videoBitrate: '1000k',
audioBitrate: '64k',
size: '1920x1080',
onEnd: function (input, output) {
console.log(input + ' -> ' + output);
},
onError: function (error, input, output) {
console.log('error on: ' + input + ' ['+ error +']');
},
onCodecData: function (data, input) {
console.log(input + ' input is ' + data.audio + ' audio with ' + data.video + ' video');
},
FFmpegOptions: {
// Specify video codec
withVideoCodec: 'libx624'
// Auto-pad video, defaulting to black padding
applyAutopadding: true
// Set aspect ratio
withAspectRatio: 1.33
// Keep aspect ratio
keepPixelAspect: true
// more at https://github.com/schaermu/node-fluent-ffmpeg#supplying-ffmpeg-options
}
},
files: [{
expand: true,
cwd: 'test/assets',
src: ['*.avi', '*.flv'],
dest: 'dist',
ext: '.mp4'
},{
expand: true,
cwd: 'test/assets',
src: ['*.avi', '*.flv'],
dest: 'dist',
ext: '.webm'
}]
},
}
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2014 Licensed under the MIT license.
FAQs
Grunt task to wrap ffmpeg
The npm package grunt-ffmpeg receives a total of 22 weekly downloads. As such, grunt-ffmpeg popularity was classified as not popular.
We found that grunt-ffmpeg 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.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.