Open Hyeoghwan opened 6 months ago
I attached the test.gif file on https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/assets/122068264/e1f3aa31-5386-4dab-a409-9a224e0610fe
const ffprobeInstaller = require('@ffprobe-installer/ffprobe'); const ffmpeg = require('fluent-ffmpeg'); const { Readable } = require('stream'); const fs = require('fs'); (async () => { const buffer = fs.readFileSync('test.gif'); let readableStream = new Readable(); readableStream._read = () => { }; readableStream.push(buffer); readableStream.push(null); // console.log(ffprobe.path, ffprobe.version); ffmpeg.setFfprobePath(ffprobeInstaller.path); let metadata = await get_video_meta_data(readableStream); async function get_video_meta_data(stream) { return new Promise((resolve, reject) => { new ffmpeg() .input(stream) .ffprobe((err, data) => { // console.log(err); }); resolve(); }); } })();
(note: if the problem only happens with some inputs, include a link to such an input file)
data should include duration but empty.
data is empty and err happens. Here is error data:
libavutil 58. 1.100 / 58. 1.100 libavcodec 60. 2.100 / 60. 2.100 libavformat 60. 2.100 / 60. 2.100 libavdevice 60. 0.100 / 60. 0.100 libavfilter 9. 1.100 / 9. 1.100 libswscale 7. 0.100 / 7. 0.100 libswresample 4. 9.100 / 4. 9.100 libpostproc 57. 0.100 / 57. 0.100 pipe:0: Input/output error
I only need the metadta for the input gif file. specifically, duration field.
Version information
Code to reproduce
I attached the test.gif file on https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/assets/122068264/e1f3aa31-5386-4dab-a409-9a224e0610fe
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
data should include duration but empty.
Observed results
data is empty and err happens. Here is error data:
I only need the metadta for the input gif file. specifically, duration field.