Adaptive multi-pass video encoder control
AssigneeGoogle Inc.
InventorsYao-Chung Lin, Anil Christopher Kokaram, Andrew Joseph Crawford, Hugh Pierre Denman
Life of this patent
Estimating the term…
Abstract
A method includes determining whether a rate distortion cost of a compressed video is above a cost threshold, the compressed video being encoded using a first constant rate factor (CRF). Upon determining the quality of a compressed video is above a cost threshold calculating a second CRF based on the first CRF, and encoding a video associated with the compressed video using the second CRF. Upon determining the quality of a compressed video is below a cost threshold encoding the video using the first CRF and a target bitrate.
Claims15
A method, comprising:
- determining whether a rate distortion cost of a compressed video is above a cost threshold, the compressed video being encoded using a first constant rate factor (CRF);
- upon determining a quality of the compressed video is above the cost threshold,
- calculating a second CRF as:
- CRF
- 2
- =
- CRF
- 1
- =
- 1
- α
-
- log
-
- (
- B
- ma
-
-
- x
- B
- 1
- )
- where CRF1 is the first CRF,
- CRF, is the second CRF,
- α is a constant,
- Bmax is the target maximum bitrate, and
- B1 is the bitrate of the compressed video, and
- encoding a video associated with the compressed video using the second CRF;
- or
- upon determining a quality of the compressed video is below the cost threshold,
- encoding a video associated with the compressed video using the first CRF and a target bitrate.
A method, comprising:
- in a first pass of a multi-pass encoding scheme, encoding a video stream using a first constant rate factor (CRF) to generate a compressed video stream;
- determining a rate distortion cost associated with the compressed video stream;
- determining whether the rate distortion cost is above a cost threshold;
- upon determining the rate distortion cost is above the cost threshold,
- calculating a second CRF as:
- CRF
- 2
- =
- CRF
- 1
- +
- 1
- α
-
- log
-
- (
- B
- ma
-
-
- x
- B
- 1
- )
- where CRF1 is the first CRF,
- CRF is the second CRF,
- α is a constant,
- Bmax is the target maximum bitrate, and
- B1 is the bitrate of the compressed video, and
- in an intermediate pass of the multi-pass encoding scheme, encoding the video stream associated with the compressed video stream using the second CRF;
- or
- upon determining the rate distortion cost is below the cost threshold,
- in a final pass of the multi-pass encoding scheme, encoding the video stream associated with the compressed video stream using the first CRF and a target bitrate.
A non-transitory computer-readable storage medium having stored thereon computer executable program code which, when executed on a computer system, causes the computer system to perform steps comprising:
- determining whether a quality of a compressed video is above a cost threshold, the compressed video being encoded using a first constant rate factor (CRF);
- upon determining the quality of the compressed video is above a cost threshold,
- calculating a second CRF based on the first CRF as:
- CRF3={circumflex over (α)} log(Bmax)+{circumflex over (β)}
- where
- α
- ^
- =
- log
-
- (
- B
- 1
- )
- -
- log
-
- (
- B
- 2
- )
- CRF
- 1
- -
- CRF
- 2
- ,
- and
- {circumflex over (β)}=log(B1)−{circumflex over (α)}CRF1
- CRF1 is a CRF used to encode the video before using the first CRF,
- CRF2 is the first CRF,
- α is a constant,
- Bmax is the target maximum bitrate,
- B1 is a bitrate associated with CRF1
- B2 is the bitrate of the compressed video, and
- encoding a video associated with the compressed video using the second CRF;
- or
- upon determining the quality of the compressed video is below a cost threshold,
- encoding a video associated with the compressed video using the first CRF and a target bitrate.
A method, comprising:
- in a first pass of a multi-pass encoding scheme, encoding a video stream using a first constant rate factor (CRF) to generate a first compressed video stream;
- determining a rate distortion cost associated with the first compressed video stream;
- determining whether the rate distortion cost is above a cost threshold;
- upon determining the rate distortion cost is above the cost threshold,
- calculating a second CRF as:
- CRF3={circumflex over (α)} log(Bmax)+{circumflex over (β)}
- where,
- α
- ^
- =
- log
-
- (
- B
- 1
- )
- -
- log
-
- (
- B
- 2
- )
- CRF
- 1
- -
- CRF
- 2
- ,
- and
- {circumflex over (β)}=log(B1)−{circumflex over (α)}CRF1
- CRF1 is a CRF used to encode the video before using the first CRF,
- CRF2 is the first CRF,
- α is a constant,
- Bmax is the target maximum bitrate,
- B1 is a bitrate associated with CRF1
- B2 is the bitrate of the compressed video, and
- in an intermediate pass of the multi-pass encoding scheme, encoding the video stream using the second CRF;
- or
- upon determining the rate distortion cost is below the cost threshold,
- in a final pass of the multi-pass encoding scheme, encoding the video using the first CRF and a target bitrate.
Dependencies are inferred from the claim text.