dev #17

Merged
siwat merged 29 commits from dev into main 2025-09-25 19:59:50 +00:00
Showing only changes of commit 360a4ab890 - Show all commits

View file

@ -46,6 +46,7 @@ class FFmpegCapabilities:
# Log capabilities
if self.nvidia_support:
logger.info("NVIDIA hardware acceleration available (CUDA/CUVID/NVDEC)")
logger.info(f"Detected hardware codecs: {self.codecs}")
if self.vaapi_support:
logger.info("VAAPI hardware acceleration available")
if self.qsv_support:
@ -104,22 +105,23 @@ class FFmpegCapabilities:
# Add hardware acceleration if available
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({
'hwaccel': 'cuda',
'hwaccel_device': '0',
'video_codec': 'h264_cuvid',
'hwaccel_output_format': 'cuda'
})
logger.debug("Using NVIDIA CUVID hardware acceleration for H.264")
elif codec == 'h265' and 'h265_hw' in self.codecs:
logger.info("Using NVIDIA CUVID hardware acceleration for H.264")
elif codec == 'h265':
options.update({
'hwaccel': 'cuda',
'hwaccel_device': '0',
'video_codec': 'hevc_cuvid',
'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:
if codec == 'h264':