------------------------------------------------------------------------------------------------------- Initial try. Only H264. https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/ # example, H265 recoding of a ~1GB '.ts' stream of duration ~25min /opt/ffmpeg/6x-cuda/bin/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i ~/tst/in.ts -c:v h264_nvenc -b:v 1.2M /tmp/oot.mp4 # runs a fair few times faster than on the cpus: e.g. 16x play, instead of ~0.4 play-speed # but haven't found a controllability like the tune and preset and quality settings of the cpu version # *and* it doesn't appear to do H265 encoding with the nvidia thing (what's 'hevc_vulkan'?) end of ffmpeg : video:210962kB audio:23647kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.772789% frame=75002 fps=848 q=21.0 Lsize= 236422kB time=00:25:00.01 bitrate=1291.2kbits/s speed=16.9x [aac @ 0x428d3c0] Qavg: 674.545 real 1m34.365s during this time, not very high loading: $ nvidia-smi | Mon Jun 12 21:42:34 2023 +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 530.30.02 Driver Version: 530.30.02 CUDA Version: 12.1 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA A40 Off| 00000000:41:00.0 Off | 0 | | 0% 32C P0 85W / 300W| 377MiB / 46068MiB | 3% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 3812595 C /opt/ffmpeg/6x-cuda/bin/ffmpeg 373MiB | +---------------------------------------------------------------------------------------+ ------------------------------------------------------------------------------------------------------- More. Wanting H265 (HEVC). Can't (briefly) find any option (actually effectual) like the '-crf' for libx265, to give quality-based variable rate. The incantation was: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i in.ts -c:v hevc_nvenc -b:v 1.5M cuda_hevc1M5.mkv this does pretty fast (~15x on the A40 on See in particular this page (or corresponding pdf: "Using FFmpeg with NVIDIA GPU Hardware Acceleration") https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html