简体   繁体   English

如何在iOS中为H264编码指定参考框架?

[英]how to specify reference frames for H264 encoding in iOS?

I'm trying to improve the video quality of my video recording app, the resulted video always have 1 reference frames (see below), while we do see videos from other apps having this value of 2, I checked apple documents and searched SO, but not able to find any solution to specify this parameter, can anybody shed some lights here? 我正在尝试改善视频录制应用程序的视频质量,结果视频始终具有1个参考帧(请参见下文),而我们确实看到其他应用程序的视频具有此值2,我检查了苹果文档并进行了搜索,但找不到任何解决方案来指定此参数,有人可以在这里说些什么吗? many thanks! 非常感谢!

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings, CABAC                   : Yes
**Format settings, ReFrames                : 1 frame**
Format settings, GOP                     : M=1, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 14s 868ms
Bit rate                                 : 1 527 Kbps
Width                                    : 540 pixels
Height                                   : 960 pixels
Display aspect ratio                     : 0.562
Frame rate mode                          : Variable
Frame rate                               : 25.221 fps
Minimum frame rate                       : 3.750 fps
Maximum frame rate                       : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive

Encoding.com supports the modification of reference frames via the tag in their api. Encoding.com支持通过api中的标签修改参考框架。 Here is their recommendation for this parameter: 这是他们对此参数的建议:

"An important h.264 feature that allows for reference frames other than the one before or after the current frame. Using this parameter you can specify up to 16 reference frames. For live action 4-6 reference frames will suffice, but for animation 16 should be used. Generally the default is 6." “ h.264的一项重要功能,它允许在当前帧之前或之后的参考帧以外的其他参考帧。使用此参数,您最多可以指定16个参考帧。对于实时操作,4-6个参考帧就足够了,但是对于动画16应该使用。通常默认值为6。“

http://www.encoding.com/http-live-streaming-hls/#Encodingcom_HLS_Pro http://www.encoding.com/http-live-streaming-hls/#Encodingcom_HLS_Pro

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM