Skip to content

Commit

Permalink
#3706 nable hevc via vaapi
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Apr 15, 2023
1 parent feda254 commit de5c157
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions xpra/codecs/gstreamer/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,23 @@
DEFAULT_ENCODER_OPTIONS = {
"vaapih264enc" : {
"max-bframes" : 0, #int(options.boolget("b-frames", False))
"tune" : 3, #low-power
#"tune" : 3, #low-power
#"rate-control" : 8, #qvbr
"compliance-mode" : 0, #restrict-buf-alloc (1) – Restrict the allocation size of coded-buffer
#"keyframe-period" : 9999,
"prediction-type" : 1, #hierarchical-p (1) – Hierarchical P frame encode
#"prediction-type" : 1, #hierarchical-p (1) – Hierarchical P frame encode
#"quality-factor" : 10,
#"quality-level" : 50,
#"bitrate" : 2000,
#"prediction-type" : 1, #Hierarchical P frame encode
#"keyframe-period" : 4294967295,
"aud" : True,
},
"vaapih265enc" : {
"max-bframes" : 0, #int(options.boolget("b-frames", False))
#"tune" : 3, #low-power
#"rate-control" : 8, #qvbr
},
"x264enc" : {
"speed-preset" : "ultrafast",
"tune" : "zerolatency",
Expand Down Expand Up @@ -209,8 +214,8 @@ def add(element, encoding, cs_in, css_out, *args):
pass
log(f"init_all_specs try vaapi? {vaapi}")
if vaapi:
#add("vaapih264enc", "h264", "YUV420P", ("YUV420P", ), 20, 100)
add("vaapih264enc", "h264", "NV12", ("YUV420P", ), 20, 100)
add("vaapih265enc", "hevc", "NV12", ("YUV420P", ), 20, 100)
if WIN32:
add("nvd3d11h264enc", "h264", "YUV420P", ("YUV420P", ), 20, 100)
add("nvd3d11h265enc", "hevc", "YUV420P", ("YUV420P", ), 20, 100)
Expand Down

0 comments on commit de5c157

Please sign in to comment.