Update index.ts

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 fa69833d6d
commit c372a21883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,7 +43,7 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
const stream = args.inputFileObj.ffProbeData.streams[i]; const stream = args.inputFileObj.ffProbeData.streams[i];
if ( if (
stream.codec_type === 'video' stream.codec_type === 'video'
&& stream.transfer_characteristics === 'smpte2084' && stream.color_transfer === 'smpte2084'
&& stream.color_primaries === 'bt2020' && stream.color_primaries === 'bt2020'
&& stream.color_range === 'tv' && stream.color_range === 'tv'
) { ) {

Loading…
Cancel
Save