feat: enhance logging for detected hardware codecs and improve CUDA acceleration handling
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m53s
Build Worker Base and Application Images / deploy-stack (push) Successful in 12s
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m53s
Build Worker Base and Application Images / deploy-stack (push) Successful in 12s
This commit is contained in:
parent
719d16ae4d
commit
360a4ab890
1 changed files with 6 additions and 4 deletions
|
@ -46,6 +46,7 @@ class FFmpegCapabilities:
|
||||||
# Log capabilities
|
# Log capabilities
|
||||||
if self.nvidia_support:
|
if self.nvidia_support:
|
||||||
logger.info("NVIDIA hardware acceleration available (CUDA/CUVID/NVDEC)")
|
logger.info("NVIDIA hardware acceleration available (CUDA/CUVID/NVDEC)")
|
||||||
|
logger.info(f"Detected hardware codecs: {self.codecs}")
|
||||||
if self.vaapi_support:
|
if self.vaapi_support:
|
||||||
logger.info("VAAPI hardware acceleration available")
|
logger.info("VAAPI hardware acceleration available")
|
||||||
if self.qsv_support:
|
if self.qsv_support:
|
||||||
|
@ -104,22 +105,23 @@ class FFmpegCapabilities:
|
||||||
|
|
||||||
# Add hardware acceleration if available
|
# Add hardware acceleration if available
|
||||||
if self.nvidia_support:
|
if self.nvidia_support:
|
||||||
if codec == 'h264' and 'h264_hw' in self.codecs:
|
# Force enable CUDA hardware acceleration for H.264 if CUDA is available
|
||||||
|
if codec == 'h264':
|
||||||
options.update({
|
options.update({
|
||||||
'hwaccel': 'cuda',
|
'hwaccel': 'cuda',
|
||||||
'hwaccel_device': '0',
|
'hwaccel_device': '0',
|
||||||
'video_codec': 'h264_cuvid',
|
'video_codec': 'h264_cuvid',
|
||||||
'hwaccel_output_format': 'cuda'
|
'hwaccel_output_format': 'cuda'
|
||||||
})
|
})
|
||||||
logger.debug("Using NVIDIA CUVID hardware acceleration for H.264")
|
logger.info("Using NVIDIA CUVID hardware acceleration for H.264")
|
||||||
elif codec == 'h265' and 'h265_hw' in self.codecs:
|
elif codec == 'h265':
|
||||||
options.update({
|
options.update({
|
||||||
'hwaccel': 'cuda',
|
'hwaccel': 'cuda',
|
||||||
'hwaccel_device': '0',
|
'hwaccel_device': '0',
|
||||||
'video_codec': 'hevc_cuvid',
|
'video_codec': 'hevc_cuvid',
|
||||||
'hwaccel_output_format': 'cuda'
|
'hwaccel_output_format': 'cuda'
|
||||||
})
|
})
|
||||||
logger.debug("Using NVIDIA CUVID hardware acceleration for H.265")
|
logger.info("Using NVIDIA CUVID hardware acceleration for H.265")
|
||||||
|
|
||||||
elif self.vaapi_support:
|
elif self.vaapi_support:
|
||||||
if codec == 'h264':
|
if codec == 'h264':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue