Skip to content

Commit f4fda7d

Browse files
author
Clement Champetier
committed
OutputFile: copy color parameters when add a new video stream
Use case: MOV files with full/video range.
1 parent cca26f0 commit f4fda7d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AvTranscoder/file/OutputFile.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ IOutputStream& OutputFile::addVideoStream(const VideoCodec& videoDesc)
4242
stream.codec->level = videoDesc.getAVCodecContext().level;
4343
stream.codec->field_order = videoDesc.getAVCodecContext().field_order;
4444

45+
stream.codec->colorspace = videoDesc.getAVCodecContext().colorspace;
46+
stream.codec->color_primaries = videoDesc.getAVCodecContext().color_primaries;
47+
stream.codec->color_range = videoDesc.getAVCodecContext().color_range;
48+
stream.codec->color_trc = videoDesc.getAVCodecContext().color_trc;
49+
stream.codec->chroma_sample_location = videoDesc.getAVCodecContext().chroma_sample_location;
50+
4551
setOutputStream(stream, videoDesc);
4652

4753
// need to set the time_base on the AVCodecContext and the AVStream

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy