New issue
Advanced search Search tips

Issue 594241 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

MediaRecorder: produce keyframes more often.

Reported by thembr...@gmail.com, Mar 11 2016

Issue description

Example URL:

Steps to reproduce the problem:
Currently MediaRecorder forces keyframes every 30000 frames. This makes it prohibitively
expensive to seek in a resulting video (without re-encoding), as this might
require decoding up to 30000 frames. Forcing more keyframes makes seeking much
more efficient.

To see performance difference, record something on https://www.cam-recorder.com/
and try to seek in resulting file. It writes
MediaRecorder output, but adds missing Cues/Duration elements to the WebM file
to allow seeking.

What is the expected behavior?
MediaRecorder should produce keyframes more often. Seeking should be possible without re-encoding at decent performance.

What went wrong?
Seeking in a video without keyframed is very slow.

Did this work before? No 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.91  Channel: stable
OS Version: 
Flash Version: 

See https://codereview.chromium.org/1782043003/ for existing discussion
 
Cc: krav...@chromium.org
Labels: triage-te
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10fd187c1de8dff86eb165deaecec7a5b5f6cc36

commit 10fd187c1de8dff86eb165deaecec7a5b5f6cc36
Author: thembrown <thembrown@gmail.com>
Date: Mon Mar 14 22:25:09 2016

Force keyframes every 100 frames.

Old behavior forced keyframes every 30000 frames. This makes it prohibitively
expensive to seek in a resulting video (without re-encoding), as this might
require decoding up to 30000 frames. Forcing more keyframes makes seeking much
more efficient.

BUG= 594241 

Review URL: https://codereview.chromium.org/1782043003

Cr-Commit-Position: refs/heads/master@{#381090}

[modify] https://crrev.com/10fd187c1de8dff86eb165deaecec7a5b5f6cc36/content/renderer/media/video_track_recorder.cc

thembrown@gmail.com. Thanks for providing fix. Please resolve this bug once your fix is accepted.

Comment 4 by thembr...@gmail.com, Mar 15 2016

I probably don't have permissions to mark as fixed.
Status: Fixed (was: Unconfirmed)
This is going to tank quality; did anyone do any before and after comparisons to see what the quality hit was like, especially when restricting video bitrate?  Why is 100 frames the correct value?  Is there a noticeable keyframe refresh every 100 frames?

Keyframes are the most expensive type of frame; in general it's best to let the encoder decide if inserting one makes sense.  

Sign in to add a comment