View Full Version : Forced I-Frame insertion?
gizmotech
8th September 2003, 21:44
Hi Guys,
Is there any current way to force an iframe on a given frame with xvid? I know this is rather strange, however it would be benificial to me (and perhaps others) to be able to specify to the encoder which frames we would like to see as key frames. My main goal is for splitting encoded files, on specific frames (which will be known ahead of time).
Is there any way to do this with the current keopi unstables, or is there a possiblity a feature like this could be added into dev-api-4?
Gizmo.
ProfDrMorph
9th September 2003, 01:01
Such a feature is already in dev-api-4. Or better: you can use one of the features of dev-api-4 to do this. I don't know how much information the devs want to be "leaked" or not about the differences between dev-api-3 and dev-api-4 so I won't post additional information.
KpeX
9th September 2003, 01:06
Use Statsreader 2.0 (comes with Koepi's builds (http://koepi.roeder.goe.net/), can't remember if it does with others), you can insert a keyframe into the stats file at any point when doing a 2-pass encode. Splitting files is exactly why this was implemented.
gizmotech
9th September 2003, 01:31
Excellent!
Many thanks boys, keep up the good work!
GizmoTech
PS: Thanks for the prompt replies. Good form!
sysKin
9th September 2003, 14:03
Originally posted by ProfDrMorph
I don't know how much information the devs want to be "leaked" or not about the differences between dev-api-3 and dev-api-4 so I won't post additional information. Please do, it's not a secret :)
As for the question: indeed, it works perfectly in devapi4 :)
For devapi3 you can use Statsreader *only* if you don't use b-frames (max equals -1). It's an internal limitation (bug) of that tree.
Radek
ProfDrMorph
10th September 2003, 15:57
Dev-api-4 allows you to specify "zones". E.g. the first 100 frames are one zone, the movie ( from frame 101 on ) itself up to the credits is another zone and the credits are one zone.
One of the options for every zone is "Force Keyframe". So you could just create a zone which consist of a single frame and enable "Force Keyframe" for this zone. I don't know whether "Force Keyframe" causes all frames to be keyframes in this zone or only the first one of this zone. The second idea would be the better solution IMO but I really don't know how the devs have implemented this feature. ;)
sysKin
11th September 2003, 12:45
Originally posted by ProfDrMorph
I don't know whether "Force Keyframe" causes all frames to be keyframes in this zone or only the first one of this zone.First one - once I'm bored enough, I'll implement "import" button that will automatically create zones from a chapter file.
Radek
gizmotech
11th September 2003, 13:34
Actually that would be a good idea to add to make the feature more useable, however I Wonder if you could make an import mode slightly more precise then based off chapter times.
Basically I have an encoded file, which atm I am stats editing w/ vdubmod, and adding dual key frames on cut my cut points. Now I have a list of 50 or so cut points in an encode which require dual key frames for cutting purposes, and it would be really benificial if I could just make a text file with a list of frame numbers that could be imported and made into keyframes.
gizmo
sysKin
11th September 2003, 14:47
Originally posted by gizmotech
Basically I have an encoded file, which atm I am stats editing w/ vdubmod, and adding dual key frames on cut my cut points. Now I have a list of 50 or so cut points in an encode which require dual key frames for cutting purposes, and it would be really benificial if I could just make a text file with a list of frame numbers that could be imported and made into keyframes.Why do you need dual keyframes for the cut points?
As for the question, there are two ways - you'll enter all zones manually or write your own "import" button ;)
I don't think you'll convince me to do it for you - I don't even see the reason for this (after importing chapter times you can always fine-tune the zone position to 1-frame precision manually)...
Still, it will be an easy piece of code
Radek
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.