Open lhp-- opened 3 years ago
You might want to use the h264_nvenc encoder. Would suggest you to read this: https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/
try many times, and finally
//exec('ffmpeg', ['-hwaccels'], (err, stdout, stderr) => { //❌
exec('ffmpeg -hwaccels', [''], (err, stdout, stderr) => { //✔
if (err) {
console.log(stderr);
}
console.log('\nffmpeg -hwaccels:\n---------------------\n');
console.log(stdout);
console.log('\n\n');
});
and then, console out:
ffmpeg -hwaccels:
---------------------
Hardware acceleration methods:
cuda
dxva2
qsv
d3d11va
qsv
Version information
'-hwaccel cuvid' is not work.
Expected results
Encoding and decoding with GPU