Open mvciekzvbek opened 2 years ago
Same here
In my case, the opposite is happening, I can make any changes to other types of video files (including .mov), but when the video I receive as input is a mp4, it returns the same error
Hey guys, I managed to solve the problem in my code. The error was caused by the way I prepared the input for ffmpeg. I used these two lines of code to convert a bufferArray to a format that ffmpeg can read, but this transformation was causing the bug.
const videoStream = new stream.PassThrough();
videoStream.end(Buffer.from(bufferFile));
ffmpeg()
.input(videoStream)
.output("output.mp4")
To fix it, I am now passing the direct link of the file that I have on the web, for example, https://my-file-repository/file.mp4.
ffmpeg()
.input("https://my-file-repository/file.mp4")
.output("output.mp4")
Version information
Code to reproduce
where
DEFAULT_VIDEO_EXTENSION
ismp4
.Expected results
I've used example from here: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/blob/master/examples/any-to-mp4-steam.js I guess it should convert video to .mp4 format successfully.
Observed results
Generally, I can't find the way to convert any of these .mov videos: https://drive.google.com/file/d/1p5X35MSj7AZc8NT1M42jb069r_u7zw1L/view?usp=sharing https://drive.google.com/file/d/1v6DsziJe9Ye1sjwnypzdNbX3N2gGyg_q/view?usp=sharing https://drive.google.com/file/d/1SWyF3nM-K8VPExPZhvK9j6oNEpIO8iFF/view?usp=sharing
Attached code works properly for: mp4, flv, mkv, avi formats.
Video conversion is successful when using ffmpeg from cli with command:
ffmpeg -i video.mov -vcodec h264 "asd.mp4"