2

I'd like to determine the number of reference frames used in encoding a h.264 file using libavcodec. I've been able to determine most of the other information I'm looking for programmatically but so far can't locate this one item.

Any help much appreciated.

1
  • Are you asking how to find the max ref frames count in a given h.264 stream, produced by an unknown encoder? (mediainfo shows a ref frame count even when it doesn't find x264's version/settings string). To find the max DPB size, I guess? Or are you talking about how to find out what x264 settings libavcodec passed to libx264 when your program is encoding? x264's logging to stdout includes a histogram of usage for each ref distance. Commented Feb 18, 2015 at 3:40

1 Answer 1

0

4-5 reference frames are recommend for general encoding. Higher values will only add to encoding time and decoding complexity, with little to no gain in quality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.