mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Better scalling handling
This commit is contained in:
parent
25901cef45
commit
f4980cefde
@ -21,7 +21,9 @@ func DetectHardwareAccel() HwAccelT {
|
||||
"-c:v", "h264_nvenc",
|
||||
"-preset", "fast",
|
||||
},
|
||||
ScaleFilter: "hwupload_cuda,scale_cuda=%d:%d:force_original_aspect_ratio=decrease",
|
||||
// if the decode goes into system memory, we need to prepend the filters with "hwupload_cuda".
|
||||
// since we use hwaccel_output_format, decoded data stays in gpu memory so we must not specify it (it errors)
|
||||
ScaleFilter: "scale_cuda=%d:%d",
|
||||
}
|
||||
default:
|
||||
return HwAccelT{
|
||||
@ -32,7 +34,9 @@ func DetectHardwareAccel() HwAccelT {
|
||||
// superfast or ultrafast would produce a file extremly big so we prever veryfast or faster.
|
||||
"-preset", "faster",
|
||||
},
|
||||
ScaleFilter: "scale=%d:%d:force_original_aspect_ratio=decrease",
|
||||
// we could put :force_original_aspect_ratio=decrease:force_divisible_by=2 here but we already calculate a correct width and
|
||||
// aspect ratio in our code so there is no need.
|
||||
ScaleFilter: "scale=%d:%d",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user