Fix iOS playback of H.265 clips (#10105)

* Fix iOS playback of H.265 clips

* CI
This commit is contained in:
Andrew Reiter
2024-02-27 22:41:36 -05:00
committed by GitHub
parent 9893741990
commit 5edaaceaf2
3 changed files with 60 additions and 26 deletions

View File

@@ -461,9 +461,18 @@ PRESETS_RECORD_OUTPUT = {
}
def parse_preset_output_record(arg: Any) -> list[str]:
def parse_preset_output_record(arg: Any, force_record_hvc1: bool) -> list[str]:
"""Return the correct preset if in preset format otherwise return None."""
if not isinstance(arg, str):
return None
return PRESETS_RECORD_OUTPUT.get(arg, None)
preset = PRESETS_RECORD_OUTPUT.get(arg, None)
if not preset:
return None
if force_record_hvc1:
# Apple only supports HEVC if it is hvc1 (vs. hev1)
preset += ["-tag:v", "hvc1"]
return preset