keyframe interval on iOS hardware encoder

411 views
Skip to first unread message

h...@highfive.com

unread,
Apr 20, 2016, 9:38:31 PM4/20/16
to discuss-webrtc

Ran into the following todo:

https://chromium.googlesource.com/external/webrtc/+/master/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc#441


and it seems like without setting kVTCompressionPropertyKey_MaxKeyFrameInterval the encoder gets to decide how many keyframes to send.


<VideoToolbox/VTCompressionProperties.h>:93
 Video encoders are allowed to generate key frames more frequently if
 
this would result in more efficient compression.  
 
The default key frame interval is 0, which indicates that the
 video encoder should choose
where to place all key frames.

Trying this out on AppRTCDemo with iPhone 6S+ in a loopback call resulted in a generated keyframe approximately every 2 secs. So despite setting kVTCompressionPropertyKey_RealTime the encoder is trying to optimize for seekable content with periodic keyframes, instead of optimizing for latency and bandwidth by sending fewer keyframes. Does it make sense to set the kVTCompressionPropertyKey_MaxKeyFrameInterval to something relatively high so that only things like FIR/PLI triggers a keyframe?

Peter Boström

unread,
Apr 21, 2016, 9:04:45 AM4/21/16
to discuss...@googlegroups.com, Zeke Chin
Do you mind filing a bug on this? Getting keyframes every two seconds seems bad.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6a7360f7-57a5-47b4-aaa9-ed20881c4057%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

h...@highfive.com

unread,
Apr 21, 2016, 1:39:39 PM4/21/16
to discuss-webrtc, tkc...@webrtc.org
Reply all
Reply to author
Forward
0 new messages