mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Set HDR color info on FrameworkMuxer
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
(cherry picked from commit d6c8e3a8af)
This commit is contained in:
parent
70f74fde15
commit
98c981f6f2
1 changed files with 1 additions and 0 deletions
|
|
@ -124,6 +124,7 @@ import java.nio.ByteBuffer;
|
||||||
} else {
|
} else {
|
||||||
mediaFormat =
|
mediaFormat =
|
||||||
MediaFormat.createVideoFormat(castNonNull(sampleMimeType), format.width, format.height);
|
MediaFormat.createVideoFormat(castNonNull(sampleMimeType), format.width, format.height);
|
||||||
|
MediaFormatUtil.maybeSetColorInfo(mediaFormat, format.colorInfo);
|
||||||
try {
|
try {
|
||||||
mediaMuxer.setOrientationHint(format.rotationDegrees);
|
mediaMuxer.setOrientationHint(format.rotationDegrees);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue