I was wondering about the range of the parameters of the accelerated encoders supported in GStreamer (nvv4l2 & omx). For example, the iframeinterval parameter has a range of 0 to 4294967295.
How is this range mapped on the actual I-frame interval?
How is it with the other encoder parameters?
Hi,
Theoretically iframeinterval can be set to very large value, but generally we set it to 1-2 second interval so that you can seek in the stream more easily. Since decoding starts from I frames.
So, the actual I frame interval is iframeinterval/framerate?
What about the other numeric parameters?
quant-i/p/b-frames
SliceIntraRefreshInterval
slice-header-spacing
Is there a general mapping/scaling process of the 32bit/64bit parameters?
The quantization parameters (quant-i/p/b-frames) of the nvv4l2h264enc have a default value of 2^32 - 1. If that is the true value of the quantization parameter (no mapping/scaling) I have a wrong understanding of the quantization process.
quant-i/p/b-frames
qp range is 0 - 51. Please set in this range.
SliceIntraRefreshInterval iframeinterval is to set interval of IDR frames, and SliceIntraRefreshInterval is to set interval of I frames. generally we set IDR frame interval > I frame inteval. Such as iframeinterval=30 SliceIntraRefreshInterval=15
slice-header-spacing
This is to set how many macroblocks are put in one encoded slice. There is same properties in jetson_multimedia_api sample and please refer to How does slice mode video encoding work for Jetson? - #14 by DaneLLL
So the range depends on the resolution.
Hi,
Thanks for the suggestion. We will try to improve the document. If you have further questions about setting properties, please feel free to make a post.
Assuming I set quant-i/p/b-frames to a value higher than 51, e.g. 255, what is the resulting value? Is it capped at 51 and higher values are set to 51?
The terms are a bit confusing for me, so I would be happy if you could clarify the following questions:
The i-frames are keyframes, i.e., full frames and may come as IDR frame or non-IDR frame?
The p-frames and b-frames are intra-frames, i.e., no full frames and are “predictions” which reference to the previous frames?
Do the SliceIntraRefreshInterval and iframeinterval have a significant impact on video quality?
Background to this question: The IDR frames are keyframes, i.e., full frames. The smaller the interval the higher the number of full frames in the encoded video, hence more detail / higher video quality. Thats how I thought it would work, but not how the encoder actually performs the compression. Where am I wrong and what did I miss respectively?
Yes, it has impact to video quality. Since IDR/I frames have larger size, if setting the interval to small size, more bits are distributed in IDR/I frames. We would suggest set interval to ~ 1 second. For 30 fps, suggest set interval = 30.