feat: détection Dolby Vision avec avertissement (fallback HDR10)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,18 @@ def get_infos(file):
|
||||
hdr10_cmd_res = subprocess.getoutput(hdr10_cmd)
|
||||
logging.debug(hdr10_cmd_res)
|
||||
v_infos.update({'hdr10plus': True, 'hdr10plus_metadata': f'/tmp/{file}_hdr10_metadata.json'})
|
||||
try:
|
||||
for side_data in full_v_infos['frames'][0].get('side_data_list', []):
|
||||
if side_data.get('side_data_type') == 'DOVI configuration record':
|
||||
dv_profile = side_data.get('dv_profile', '?')
|
||||
logging.warning(
|
||||
f"Dolby Vision détecté (Profile {dv_profile}). "
|
||||
f"Encodage sans couche DV — HDR10 utilisé si disponible."
|
||||
)
|
||||
v_infos.update({'dolby_vision_profile': dv_profile})
|
||||
break
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
infos = {'duration': duration, 'video': v_infos, 'audio': a_infos, 'subtitles': s_infos}
|
||||
logging.debug("Informations du film : \n" + json.dumps(infos, indent=True))
|
||||
return infos
|
||||
|
||||
Reference in New Issue
Block a user