add hardware HEVC encoder support, add matching profiles
This commit is contained in:
parent
f9b19ebdc4
commit
fbf90f2c89
2 changed files with 26 additions and 6 deletions
|
@ -257,6 +257,22 @@ x265_tunes = [
|
|||
"ssim"
|
||||
]
|
||||
|
||||
codec_h265 = Codec(
|
||||
"h265",
|
||||
"HEVC encoded using a hardware encoder via VAAPI. Very good quality and faster-than-realtime times.",
|
||||
["-vaapi_device", "/dev/dri/renderD128", "-filter:v", "format=nv12,hwupload", "-profile:v", "main", "-codec:v", "hevc_vaapi", "-rc_mode", "CQP"],
|
||||
[
|
||||
CodecPar(
|
||||
"QP",
|
||||
"-qp",
|
||||
True,
|
||||
None,
|
||||
StrIntInRange(0, 52),
|
||||
"Quality factor: 0 is lossless, 22-27 generally very good, 52 worst."
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
codec_x265 = Codec(
|
||||
"x265",
|
||||
"HEVC encoded using x265. Very good quality and decent encode times.",
|
||||
|
@ -443,6 +459,7 @@ codec_sdrop = Codec(
|
|||
)
|
||||
|
||||
video_codec_router = CodecRouter("M")
|
||||
video_codec_router.add_codec(codec_h265)
|
||||
video_codec_router.add_codec(codec_x265)
|
||||
video_codec_router.add_codec(codec_x264)
|
||||
video_codec_router.add_codec(codec_rav1e)
|
||||
|
@ -530,9 +547,12 @@ def get_preset(presets, preset):
|
|||
factory_presets = " ".join([
|
||||
"@share:video=x264:23,slow;audio=opus;container=mp4;ffmpeg-vfilter=scale=1280:trunc(ow/a/2)*2",
|
||||
"@share-portrait:video=x264:23,slow;audio=opus;container=mp4;ffmpeg-vfilter=scale=720:trunc(ow/a/2)*2",
|
||||
"@archive-hq:video=x265:23,slow;audio=opus;container=mkv",
|
||||
"@archive:video=x265:25,medium;audio=opus;container=mkv",
|
||||
"@archive-animation:video=x265:27,slow;audio=opus;container=mkv"
|
||||
"@archive-sw-23:video=x265:23,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-25:video=x265:25,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-27:video=x265:27,slow;audio=opus;container=mkv",
|
||||
"@archive-animation:video=x265:27,slow,animation;audio=opus;container=mkv",
|
||||
"@archive-27:video=h265:27;audio=opus;container=mkv",
|
||||
"@archive-29:video=h265:29;audio=opus;container=mkv"
|
||||
])
|
||||
|
||||
# --------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue