Updated transfer_characteristics to color_transfer

Current implementation is looking for "transfer_characteristics" within ffprobe data as an attribute that has to match to determine if a file is HDR or not. However, current ffprobe is not showing this attribute on HDR files. I am proposing changing this attribute to "color_transfer" which does show up on HDR files.
make-only-subtitle-default
clifford64 2 years ago committed by GitHub
parent a7db890f14
commit fa69833d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,7 @@ var plugin = function (args) {
for (var i = 0; i < args.inputFileObj.ffProbeData.streams.length; i += 1) {
var stream = args.inputFileObj.ffProbeData.streams[i];
if (stream.codec_type === 'video'
&& stream.transfer_characteristics === 'smpte2084'
&& stream.color_transfer === 'smpte2084'
&& stream.color_primaries === 'bt2020'
&& stream.color_range === 'tv') {
isHdr = true;

Loading…
Cancel
Save