Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-ffmpeg

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)

  • 1.7.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
575K
decreased by-20.73%
Maintainers
4
Weekly downloads
 
Created

What is fluent-ffmpeg?

The fluent-ffmpeg npm package is a powerful and flexible library for working with FFmpeg, a comprehensive multimedia processing tool. It allows you to perform a wide range of audio and video processing tasks, such as transcoding, format conversion, video editing, and more, using a fluent API.

What are fluent-ffmpeg's main functionalities?

Transcoding

This feature allows you to transcode a video from one format to another. In this example, an MP4 file is transcoded to AVI format.

const ffmpeg = require('fluent-ffmpeg');
ffmpeg('input.mp4')
  .output('output.avi')
  .on('end', () => {
    console.log('Transcoding finished');
  })
  .on('error', (err) => {
    console.error('Error: ' + err.message);
  })
  .run();

Video Editing

This feature allows you to edit videos, such as trimming a segment. In this example, a 10-second segment starting from the 10-second mark of the input video is extracted.

const ffmpeg = require('fluent-ffmpeg');
ffmpeg('input.mp4')
  .setStartTime('00:00:10')
  .setDuration('10')
  .output('output.mp4')
  .on('end', () => {
    console.log('Video editing finished');
  })
  .on('error', (err) => {
    console.error('Error: ' + err.message);
  })
  .run();

Audio Extraction

This feature allows you to extract audio from a video file. In this example, the audio from an MP4 video is extracted and saved as an MP3 file.

const ffmpeg = require('fluent-ffmpeg');
ffmpeg('input.mp4')
  .output('output.mp3')
  .noVideo()
  .on('end', () => {
    console.log('Audio extraction finished');
  })
  .on('error', (err) => {
    console.error('Error: ' + err.message);
  })
  .run();

Adding Watermarks

This feature allows you to add watermarks to videos. In this example, a text watermark is added to the video.

const ffmpeg = require('fluent-ffmpeg');
ffmpeg('input.mp4')
  .outputOptions('-vf', 'drawtext=text=Watermark:fontcolor=white:fontsize=24:x=10:y=10')
  .output('output.mp4')
  .on('end', () => {
    console.log('Watermark added');
  })
  .on('error', (err) => {
    console.error('Error: ' + err.message);
  })
  .run();

Other packages similar to fluent-ffmpeg

Keywords

FAQs

Package last updated on 05 Jun 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc