fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.85k stars 874 forks source link

ffmpeg.run() calls self.prepare readmetaData is Undefined unable to be set #1191

Open Andrewiski opened 1 year ago

Andrewiski commented 1 year ago

Version information

Code to reproduce

Any call to .run or pipe will cause ffprobe to be ran if the input is not a stream as there is no way to set readMetaData that is passed to _prepare as only the call back function is passed in on line 431.

Issue is an http:// input results in at least 2 calls be made to the url and there is no way to prevent ffprobe from being started.
Andrewiski commented 1 year ago

see #930 as pull request that was not accepted, I changed from that pull request so that the backward logic of !readMetadata is now readmetadata===false so that only skips if readMetadata is set to false undefined is currently the default and it does readMetadata. This is needed to prevent multiple url calls on http sources as ffprobe also opens up the url to sample it data.