Domanda

When I'm using a command like this in ffmpeg (or any other program):

ffmpeg -i input.mp4 image%d.jpg

The combined files size of all the images always tends to be larger than the video itself. I've tried reducing the frames per second, lower compression settings, blurs, and everything else I can find but the JPEGs always end up being larger in size (combined) afterwards.

I'm trying to understand why this happens, and what can be done to match the size of the video. Are there other compression formats I can use besides JPEG or any settings or tricks I'm overlooking?

Is it even possible?

È stato utile?

Soluzione

To simplify, when the video is encoded, only certain images (keyframes) are encoded as full image such as your JPEG.

The rest are encoded as a difference between the current image and the next image, which for most scenes is much less in size comparing to the whole image.

Altri suggerimenti

This is because in a video you apply compression not only image by image, by in the time direction as well. So separate images will always be larger than the video. You can't do anything about that.

Lennart is correct, and if you want more detail you should take a look at http://en.wikipedia.org/wiki/Video_compression_picture_types#Summary

Basically sequences of images are I frames only whereas videos can use I frames, P frames and B frames depending on the codec and encode settings, which greatly improves compression efficiency.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top