Skip to content

Commit

Permalink
Set HDR color info on FrameworkMuxer
Browse files Browse the repository at this point in the history
Not setting the color info results in a missing "colr" box in the produced
container, under file/moov/trak/mdia/minf/stbl/stsd/hvc1. This means extractors
will not be able to find out the transcoded file is HDR.

In `Transformer`, this means it can't transcode this transcoded file, because
it currently relies on the container bearing HDR info to construct the
transcoding sample pipeline.

PiperOrigin-RevId: 487276712
  • Loading branch information
claincly authored and microkatz committed Nov 10, 2022
1 parent 4598cc9 commit d6c8e3a
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -124,6 +124,7 @@ public int addTrack(Format format) throws MuxerException {
} else {
mediaFormat =
MediaFormat.createVideoFormat(castNonNull(sampleMimeType), format.width, format.height);
MediaFormatUtil.maybeSetColorInfo(mediaFormat, format.colorInfo);
try {
mediaMuxer.setOrientationHint(format.rotationDegrees);
} catch (RuntimeException e) {
Expand Down

0 comments on commit d6c8e3a

Please sign in to comment.