views:

238

answers:

2

It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes?

Thanks!

+1  A: 

It does in fact seek to the nearest key frame. If you want to be able to seek to more specific parts of the stream you'll need to add more key frames. Of course more key frames usually results in larger file size. Good luck!

heavilyinvolved
@heavilyinvolved. I think it's the other way round. More keyframes mean less processor time, because there's more data and less stuff to interpolate (though it trades off space, i.e. it takes more memory/bandwidth).
Juan Pablo Califano
@Juan Pablo Califano yeah you're right... updated.
heavilyinvolved
A: 

I have used the following properties in the meta data handler for finding the keyframes, but returned nothing:

var kfPoints:Object; for (var propName:String in metaInfoObj) { if (propName == "keyframes") { trace ("Keyframes received"); var kfObject:Object = metaInfoObj[propName]; kfPoints = kfObject["times"]; } }

How can I find keyframes in an mp4 file transcoded with an H264 codec?

supriya tenany
They are called 'seekpoints' in the object, not 'keyframes' for mp4.`public function onMetaData(infoObject:Object):void { trace(infoObject.seekpoints)}`. If it helps, can you make separate question for this and I'll post full code?
artvolk