Skip to content

Commit

Permalink
Fix warnings when using HW
Browse files Browse the repository at this point in the history
  • Loading branch information
raydouglass committed Sep 13, 2023
1 parent c1f9137 commit 5506501
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion media_management_scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def convert_with_config(
VideoCodec.H264.equals(config.video_codec)
and config.bitrate is not None
and config.bitrate != "disabled"
and not config.hardware_nvidia
):
crf = 1
# -x264-params vbv-maxrate=1666:vbv-bufsize=3332:crf-max=22:qpmax=34
Expand All @@ -167,7 +168,11 @@ def convert_with_config(
):
raise Exception("Avg Bitrate not supported for H265")

args.extend(["-crf", str(crf), "-preset", config.preset])
if not config.hardware_nvidia:
args.extend(["-crf", str(crf)])

args.extend(["-preset", config.preset])

if config.deinterlace:
is_interlaced = metadata.interlace_report.is_interlaced(
config.deinterlace_threshold
Expand Down

0 comments on commit 5506501

Please sign in to comment.