Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques Keyframes relation to file size

  • Keyframes relation to file size

    Posted by Travis Dao on July 28, 2005 at 6:21 pm

    Hi all,

    What’s the relation of keyframes to file size? Everything I’ve read says the more keyframes you have the larger the file size, and the less keyframes the smaller the file size. However in my testing I’ve gotten different results. When I have less keyframes the file size gets larger. I’m compressing flvs with Squeeze 4.1 and QT with Cleaner XL. In both cases when I change the keyframes from every second to every 5 seconds the file size gets larger. Is there something I’m missing? Thanks.

    T

    Charles Simonson replied 20 years, 9 months ago 3 Members · 3 Replies
  • 3 Replies
  • Ben Waggoner

    July 31, 2005 at 9:29 pm

    Keyframes take up more relative space, but if you have a fixed bitrate, what happens is that the keyframes get more bits and the delta frames get fewer. So the file size will be the same, but you’ll get lower compression efficiency.

    As to why it’s getting LARGER, not sure. Is it a significant amount? Are you using 2-pass encoding (you should be as long as you’re not doing real-time streaming via RTSP).

    My Book: https://www.benwaggoner.com/books.htm
    Squeeze and ProCoder tutorials: https://www.classondemand.net/benwaggoner/
    Compression Class at Stanford: https://www.digitalmediaacademy.org/compression.html

  • Travis Dao

    August 1, 2005 at 6:47 pm

    Ben,

    So if I have a fixed bitrate than the file size should remain the same regardless of the number(frequency) of keyframes?
    I’m using 2 pass VBR and the same bitate. These are my test results:

    FLV 10(fps)
    1,626,514 bytes — keyframe every 10 frames
    1,626,955 bytes — keyframe every 20 frames
    1,627,166 bytes — keyframe every 50 frames

    QT 15 (fps)
    2,955,391 bytes — keyframe every 15 frames
    2,712,897 bytes — keyframe every 30 frames
    2,831,045 bytes — keyframe every 75 frames
    2,871,357 bytes — keyframe every 150 frames

    T

  • Charles Simonson

    August 12, 2005 at 4:40 am

    Those numbers sound about right and what Ben stated is a good explanation of how keyframes are supposed to work. It is almost impossible to get the same file-size for two encodes at even the exact same settings. And as long as your results aren’t producing sizes that are drastically different (over 10%), then I would say you are doing Ok and not to worry about it.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy