Kawd
Kawd

Reputation: 4450

How to effectively turn high resolution images into a video with ffmpeg?

I'm trying to figure out the correct settings in order to achieve that:

await new Promise((resolve) => {
  ffmpeg()
    .on('end', () => {
      setTimeout(() => {
        console.log('done')
        resolve()
      }, 100)
    })
    .on('error', (err) => {
      throw new Error(err)
    })
    .input('/my-huge-frames/frame-%d.png')
    .inputFPS(1/24)
    .output('/my-huge-video.mp4')
    .outputFPS(24)
    .noAudio()
    .run()
  1. Are my inputFPS(1/24) & outputFPS(24) correct ?
  2. Each frame-%d.png is huge: 32400PX x 32400PX (~720Mb). Will ffmpeg be able to generate such a video, and if so, will the video be playable? If not, what is the maximum resolution each frame-%d.png should have instead?
  3. Since the process will be quite heavy, I believe using the command line could be more appropriate. In that case, what is the equivalent of the above Js code in the command line (as in ffmpeg -framerate etc...) ?

Upvotes: 0

Views: 338

Answers (1)

Grady Player
Grady Player

Reputation: 14549

your output image size is too large for most common video codecs.

  • h.264 2048x2048
  • h.265 8192×4320
  • av1 7680×4320

You may be able to do raw RGB or raw YUV, but that is going to be huge ~1.5GB per frame for YUV420...

what are you planning to play this on, I know of some dome theaters that theoretically able run something like 15 simultaneous 4k feeds... but they are processed before hand...

Upvotes: 1

Related Questions