Insert keyframe every x frames

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
ncsbert
Posts: 1
Joined: Mon Feb 19, 2007 5:28 pm

Insert keyframe every x frames

Post by ncsbert »

Would it be feasible to have an option (similar to QT Pro's export option) where you can force a keyframe after any given number of frames? The number of frames to wait before a new keyframe would be user defined of course.

Thanks in advance everyone. Please keep up the great work.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Insert keyframe every x frames

Post by jbrjake »

ncsbert wrote:Would it be feasible to have an option (similar to QT Pro's export option) where you can force a keyframe after any given number of frames? The number of frames to wait before a new keyframe would be user defined of course.
For x264, in our next beta, you'll be able to set a minimum and maximum key-frame interval. For now, there won't be a pretty GUI way, just a text box in the preferences. From there you'll be able to pass options to x264, similar to how you can pass options to ffmpeg in VisualHub. So to get a keyframe every second for 24fps video, you could try this:

Code: Select all

min-keyint=24:keyint=24
I know this isn't very Mac-like, and my apologies for that. It's only an interim solution. There should probably, in the end, be widgets for all the popular options, including the keyints. But I don't want to labor other developers with that busywork. And I don't know any Cocoa yet. So it'll be awhile.
MySchizoBuddy
Posts: 30
Joined: Thu Feb 15, 2007 3:51 pm

Post by MySchizoBuddy »

how about Automatic keyframe
use when it is needed.

Sorenson Squeeze and Apple Quicktime allow u that option
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Post by rhester »

MySchizoBuddy wrote:how about Automatic keyframe
use when it is needed.
How do you define "when it is needed" given that keyframes are generally pragmatically used to control seek time forward/back during presentation? People have their own ideas about how much 'skip' they prefer (especially versus file size waste).

Rodney
thanar
Posts: 34
Joined: Fri Feb 09, 2007 11:16 am

Post by thanar »

What do presentations have to do with the specific issue?

Anyway, all modern (incl. mpeg4s and 264s codecs) have automatic keyframes build-in.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Post by rhester »

thanar wrote:What do presentations have to do with the specific issue?
The point of the thread was the ability to control keyframe intervals. The only practical reason to do so is to control seek-skip-gaps when you're watching it (thus "presentation").
thanar wrote:Anyway, all modern (incl. mpeg4s and 264s codecs) have automatic keyframes build-in.
Of course they do - and thus, as a result, so does MediaFork. That wasn't what was requested (initially).

Rodney
MySchizoBuddy
Posts: 30
Joined: Thu Feb 15, 2007 3:51 pm

Post by MySchizoBuddy »

rhester wrote:
How do you define "when it is needed" given that keyframes are generally pragmatically used to control seek time forward/back during presentation? People have their own ideas about how much 'skip' they prefer (especially versus file size waste).

Rodney
what are u talking about
key frame is a frame encoded without reference to any images in another frame, meaning it contains the entire image as it appears on that frame.
I want automatic because i have no idea what value to use for which movie type.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Post by rhester »

Here you demonstrate you know what a keyframe is, physically:
MySchizoBuddy wrote:key frame is a frame encoded without reference to any images in another frame, meaning it contains the entire image as it appears on that frame.
Here you demonstrate you have no idea why they are used:
MySchizoBuddy wrote:I want automatic because i have no idea what value to use for which movie type.
I'll say this again, for clarity. The xvid and x264 encoders inside MediaFork already do automatic keyframing. We didn't have to do anything to enable it, you don't have to do anything to enable it, it's just there.

Want proof? Start up a movie on your iPod. Pause it. Go back to the main menu. Then go back to the movie. Notice how it almost - but not quite - picks up where you left off.

Why wasn't it exact? Because the iPod - like most playback devices - must begin playback at a keyframe, because of the definition you gave.

So how do you know what the keyframe interval should be? There is no definition! "Automatic" is arbitrary and defined on a per-codec basis. I personally prefer my keyframes every 5 seconds, which works out to either roughly every 120 frames (for NTSC film/23.976 fps) or 150 frames (for NTSC video/29.97 fps). Maybe you want yours every 10 seconds. Maybe you want yours every second. I don't know. It doesn't matter. It's up to you, and there is no "right" answer.

Rodney
Post Reply