Hello all,
I’m using libav to write a C++ program that extracts frames from a video at a 
given timestamp.
I’m a beginner in multimedia processing but I understood there are frames that 
can be decoded without using others (I frames) and frames the are dependent on 
others (P and B frames).
Right now I use av_seek_frame() with the AVSEEK_FLAG_BACKWARD flag to seek to 
the previous closest keyframe frame and if it’s not the initially desired 
frame, I start decoding from the current frame toward the desired frame.
The problem is I have a video in which the first and the second keyframes are 
separated by 8 seconds and if I seek the frame at the 6th second, the whole 
process of decoding every frame until I reach the desired frame takes 5 seconds 
(on an Android mid-range device) which seems too long to me.

Is there any more optimized way to do this ?

Best regards,
Corentin Bruneau.
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to