mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Adding validation against Dolby vision files
Done more testing & confirmed, dolby vision files are normally not converted properly so we'll filter these out now. The output usually doesn't have evident issues, it's only when tested on a Dolby vision TV that issues present & it's highly dependant on the source material. i.e I think if the file has the correct HDR10 fallback info then it will play fine on a Dolby vision TV (just can't play Dovi proper), but a lot of files I've had don't have this info & after conversion the Dovi TV will display a pink blown out version. It'll be better to just prevent Dovi conversions & I guess there's the question of why compress a Dovi file? I don't think it fits the work flow of a bitrate based re-encode.
This commit is contained in:
parent
1591e686f8
commit
8324988ad3
1 changed files with 16 additions and 2 deletions
|
|
@ -633,9 +633,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
hdrEnabled = true;
|
||||
}
|
||||
|
||||
// Had at least one case where a file contained no evident HDR data but was marked as HDR content
|
||||
// meaning transcode OR plex would butcher the file
|
||||
// VALIDATE HDR - Ignore Dolby vision & badly formatted files
|
||||
if (hdrEnabled !== true) {
|
||||
// Had at least one case where a file contained no evident HDR data but was marked as HDR content
|
||||
// meaning transcode OR plex would butcher the file
|
||||
try {
|
||||
if (typeof file.mediaInfo.track[i + 1].HDR_Format !== 'undefined') {
|
||||
response.infoLog += '==ERROR== This file has Media data implying it is HDR '
|
||||
|
|
@ -647,6 +648,19 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
} catch (err) {
|
||||
// Catch error - Ignore & carry on - If check can bomb out if tags don't exist...
|
||||
}
|
||||
} else {
|
||||
// If specifically marked Dolby Vision
|
||||
try {
|
||||
if (file.mediaInfo.track[i + 1].HDR_Format.search('Dolby Vision') >= 0) {
|
||||
response.infoLog += '==ERROR== This file has Media data implying it is Dolby Vision '
|
||||
+ `(${file.mediaInfo.track[i + 1].HDR_Format}), `
|
||||
+ 'Currently we cannot safely convert this HDR format and retain the Dolby Vision format. '
|
||||
+ 'Aborting!\n';
|
||||
return response;
|
||||
}
|
||||
} catch (err) {
|
||||
// Catch error - Ignore & carry on - If check can bomb out if tags don't exist...
|
||||
}
|
||||
}
|
||||
|
||||
// Check if codec of stream is HEVC, Vp9 or AV1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue