Questions tagged [fluent-ffmpeg]

Fluent ffmpeg is a Node.js library (A fluent API to FFMPEG)

This library abstracts the complex command-line usage of ffmpeg into a fluent, easy to use node.js module. In order to be able to use this module, make sure you have ffmpeg installed on your system (including all necessary encoding libraries like libmp3lame or libx264).

github repo

369 questions
1
vote
1 answer

Upload ffmpeg file output to AWS s3 using NodeJS

The ffmpeg.output("path/file.mp4") need a string path as an argument to write the output file to it. But s3 bucket.upload(parms, ...) need a Binary File as a value to the Body: in parms JSON Problem: Unable to provide file data using the file path…
Dürrani
  • 950
  • 12
  • 21
1
vote
1 answer

How to use -stream_loop audio in fluent-ffmpeg?

I'm trying to loop the audio to fit the size of the video. I use VIDEOSHOW to create VIDEO and videoshow uses fluent-ffmpeg. I already have this code on the command line that works perfectly: `ffmpeg -y -r 1 -loop 1 -i image.png -stream_loop -1…
1
vote
0 answers

ffmpeg encoded video has video/audio sync delay when uploading to Facebook & WhatsApp

"fluent-ffmpeg": "^2.1.2", "ffmpeg": "^0.0.4", node : 8 Code to reproduce let command = ffmpeg() .input(tempFilePath) .input(watermarkFilePath) .complexFilter([ "[0:v][1:v]overlay=W-w-20:H-h-20" …
royherma
  • 4,095
  • 1
  • 31
  • 42
1
vote
0 answers

Encoding WEBM to MP4 in NodeJS fails with too many packets buffered for output stream

I'm encoding short WEBM clips in NodeJS on GCP using fluent-ffmpeg: ffmpeg(`/tmp/${id}/clip.webm`) .renice(5) .outputOptions([ '-c:v libx264', '-c:a aac', '-pix_fmt yuv420p', '-profile:v main', '-level 3.1', '-movflags…
Igniter
  • 857
  • 9
  • 24
1
vote
1 answer

How to convert image to video using fluent-ffmpeg in NodeJS

I would like to create a video using fluent-ffmpeg in NodeJS. My objective is to create a video using one image. And what I have done so far is the following: var express = require('express') var router = express.Router() const ffmpeg =…
MjM
  • 571
  • 4
  • 15
1
vote
1 answer

Video output file duration is cut in half when processed using fluent-ffmpeg

I have a node server set up and it takes a file for pre-processing. When using only ffmpeg library, files are processed with no problem, when using fluent-ffmpeg, if a video is 20 seconds, the output will only be the last half of the video (10…
Kamau
  • 53
  • 2
  • 7
1
vote
0 answers

nodejs ffmpeg works in local but not in production

var proc = ffmpeg() .input('./public/img/capture/photoframe.png') .input( scenePath + '%04d.png') .inputFPS(15) .input( msgPath + '%04d.png') .inputFPS(15) .input( path + data + '.' + ext ) .complexFilter([ "[3:v]scale=668:-1[scaledUGC]", …
HUNG
  • 525
  • 7
  • 17
1
vote
0 answers

merge multiple videos to a single .mp4

I am using fluent-ffmpeg in nodejs to merge multiple videos in one single file but while executing I am getting an Error: cannot find ffprobe var fluent_ffmpeg = require("fluent-ffmpeg"); var mergedVideo = fluent_ffmpeg(); var videoNames =…
Gourav Roy
  • 25
  • 1
  • 7
1
vote
1 answer

node-fluent-ffmpeg doesn't resize videos correctly when given specific size

Version information fluent-ffmpeg version: 2.1.2 ffmpeg version: ffmpeg version 4.1.3 OS: mac os x mojave 10.14.3 Code to reproduce First cut the videos using this command: const cutVideo = async (currentWord) => { return new Promise((resolve,…
Yagiz
  • 1,033
  • 2
  • 21
  • 47
1
vote
1 answer

Intermittent pixel format error when using fluent-ffmpeg

I'm using the (excellent!) node-fluent-ffmpeg library as the first step in a video processing pipeline. Depending on the source video I provide to node-fluent-ffmpeg (videos are coming from same provider which makes this behavior surprising, but I…
pdoherty926
  • 9,895
  • 4
  • 37
  • 68
1
vote
1 answer

ffmpeg with background color

This command works nice with some GIF but with some others return a error: ffmpeg -f gif -f lavfi -i color=FFFFFF -i animated.gif -y -filter_complex "[0][1]scale2ref[bg][gif];[bg]setsar=1[bg];[bg][gif]overlay=shortest=1" -pix_fmt yuv420p…
NAG
  • 341
  • 6
  • 29
1
vote
2 answers

Cannot merge videos with express using ffmpeg: Cannot use 'in' operator to search for 'readable' in undefined

The goal is to save video files into api/videos/result and then merge all videos in that folder into one video. The npm module fluent-ffmpeg is throwing the error: TypeError: Cannot use 'in' operator to search for 'readable' in undefined at…
Lyefyre
  • 21
  • 3
1
vote
0 answers

Video concatenation with ffmpeg gives incorrect duration

I have a video file and I try to operate with it by means of fluent-ffmpeg. Here is an information which I get about this file with ffprobe. You can see that video duration is 6.014s. { streams: [ { index: 0, codec_name: 'h264', …
Sergey Mell
  • 7,780
  • 1
  • 26
  • 50
1
vote
0 answers

FFmpeg add complex filter image and audio to video

I'm working with fluent-ffmpeg for Node and would like to add a gif image and an audio to an mp4 video. The gif added with complexFilter works as expected, but the audio does not work with the complexFilter applied. Without the complexFilter, the…
fitzmode
  • 1,007
  • 1
  • 18
  • 29
1
vote
2 answers

How to generate video thumbnail in NodeJs?

I am trying to generate video thumbnail but I am not getting an idea how to do that, I tried using fluent-ffmpeg & Video-thumbnail libraries but I don't know how to use them. Please, someone, help me Note I cannot usersocket.io in my project I have…
Schüler
  • 512
  • 4
  • 10
  • 25