Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: content/renderer/media/video_track_recorder.cc

Issue 1782043003: MediaRecorder: produce keyframes more often (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_track_recorder.cc
diff --git a/content/renderer/media/video_track_recorder.cc b/content/renderer/media/video_track_recorder.cc
index 295209a098e675cf6b5b758fa63bb45a5d8e7a98..9cbd91f38d2677bc4437837f1f26f74ca62a37bb 100644
--- a/content/renderer/media/video_track_recorder.cc
+++ b/content/renderer/media/video_track_recorder.cc
@@ -326,9 +326,11 @@ void VideoTrackRecorder::VpxEncoder::ConfigureEncoding(const gfx::Size& size) {
// Note that due to http://crbug.com/440223, it might be necessary to force a
// key frame after 10,000frames since decoding fails after 30,000 non-key
// frames.
+ // Forcing a keyframe in regular intervals also allows seeking in the
+ // resulting recording with decent performance.
codec_config_.kf_mode = VPX_KF_AUTO;
codec_config_.kf_min_dist = 0;
- codec_config_.kf_max_dist = 30000;
+ codec_config_.kf_max_dist = 100;
miu 2016/03/11 20:04:36 It seems that your goal is to generate a key frame
thembrown 2016/03/11 20:32:51 My goal was mainly to introduce a upper bound for
miu 2016/03/12 02:01:28 SGTM.
// Do not saturate CPU utilization just for encoding. On a lower-end system
// with only 1 or 2 cores, use only one thread for encoding. On systems with
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698