Output format dash is not available
wenlittleoil opened this issue · comments
Version information
- fluent-ffmpeg version: 2.1.2
- ffmpeg version: ffmpeg version N-114826-g65c1c83ca4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2024 the FFmpeg developers built with Apple clang version 15.0.0 (clang-1500.3.9.4)
- OS: macos Mojave 10.14.6
Code to reproduce
const ffmpeg = require('fluent-ffmpeg');
const path = require('path');
// Make sure FFmpeg is available in your system's PATH
ffmpeg.setFfmpegPath('/usr/local/bin/ffmpeg');
// Input video file
const inputVideo = path.resolve(__dirname, 'input.mp4');
// DASH output directory and files
const outputDir = path.resolve(__dirname, 'dash_output');
const outputManifest = path.join(outputDir, 'manifest.mpd');
// Configure FFmpeg for DASH transcoding
ffmpeg(inputVideo)
.outputOptions([
// DASH options
'-f dash',
'-init_seg_name init_$RepresentationID$.m4s',
'-media_seg_name chunk_$RepresentationID$_$Number%05d$.m4s',
'-use_timeline 1',
'-use_template 1',
'-window_size 5',
'-adaptation_sets "id=0,streams=v id=1,streams=a"',
// Video options
'-map 0:v:0',
'-c:v:0 libx264',
'-b:v:0 500k',
'-s:v:0 640x360',
// Audio options
'-map 0:a:0',
'-c:a:0 aac',
'-b:a:0 128k',
])
.output(outputManifest)
.on('start', () => {
console.log('Starting DASH transcoding...');
})
.on('progress', (progress) => {
console.log(`Progress: ${progress.percent.toFixed(2)}%`);
})
.on('error', (err, stdout, stderr) => {
console.error('Error:', err.message);
console.error('FFmpeg stdout:', stdout);
console.error('FFmpeg stderr:', stderr);
})
.on('end', () => {
console.log('DASH transcoding completed.');
})
.run();
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
The program runs normally and generates mpd files.
Observed results
Error: Output format dash is not available
FFmpeg stdout: undefined
FFmpeg stderr: undefined
Checklist
- I have read the FAQ
- I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
- I have included full stderr/stdout output from ffmpeg
Same here, something changed in ffmpeg 7
Error: Output format image2 is not available
Error: Output format mjpeg is not available
I downgraded my ffmpeg version to 6.1.1 and solve the problem. Thanks for your helps.
Fixed here #1266
You can also install package from: https://www.npmjs.com/package/fluent-ffmpeg-7 and just change the import to from 'fluent-ffmpeg-7'
I did a quick version there till official version gets fixed.