Open jonathan-fulton opened 8 years ago
Screenshots is just an example recipe, it is helpful for a few shots but when you have specific needs you should not use it. Build the ffmpeg command yourself using other fluent-ffmpeg methods :)
Also note that you can write the command line you cite with fluent-ffmpeg ;)
I am trying to the same but not sure how to use the output
or save
functions to write multiple image files.
+1, I'm trying to get every frame of a mp4 video and save them as PNGs in readable streams.
ffmpeg -i input.mp4 out%03d.png
I want to do this in fluent-ffmpeg
Currently, generating screenshots creates an ugly ffmpeg command. For instance, doing 1 screenshot / second for a 6 minute video (count = 360) passed ~3000 arguments to ffmpeg when I debugged. It also seemed to error out randomly mentioning something about bit_rate, width, height, etc.
Based on https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video it should be possible to use FPS as follows:
ffmpeg -i input.flv -vf fps=1 out%d.png
This worked blazingly fast. 1-2 seconds vs minutes for using node-fluent-ffmpeg when it didn't error out.