We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trying to add background audio to a video in nodejs express, but instead of adding audio to the video it removes the audio from video how to fix?
import { path as ffmpegPath } from '@ffmpeg-installer/ffmpeg'; import ffmpeg from 'fluent-ffmpeg'; import { fileURLToPath } from 'url'; import { dirname } from 'path'; import path from 'path'; ffmpeg.setFfmpegPath(ffmpegPath); const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const video = path.resolve(__dirname, 'video3.mp4'); const audio = path.resolve(__dirname, 'video5.mp4'); const destination = path.resolve(__dirname, 'output.mp4'); setTimeout(() => { ffmpeg() .input(video) .input(audio) .complexFilter([ { filter: 'amix', options: { inputs: 2, duration: 'longest' } } ]) .on('end', async function (output) { console.log(output, 'files have been merged and saved.') }) .saveToFile(destination) }, 3000);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
trying to add background audio to a video in nodejs express, but instead of adding audio to the video it removes the audio from video how to fix?
The text was updated successfully, but these errors were encountered: