[FFmpeg-trac] #11271(undetermined:closed): How to choose the best hwaccel?
FFmpeg
trac at avcodec.org
Wed Apr 9 13:27:32 EEST 2025
#11271: How to choose the best hwaccel?
-------------------------------------+-------------------------------------
Reporter: Mads | Owner: (none)
Johansen |
Type: enhancement | Status: closed
Priority: normal | Component:
| undetermined
Version: git-master | Resolution: fixed
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Mads Johansen):
Replying to [comment:3 Balling]:
> >On windows I used the following command, changing cuda with the other
options written above
>
> You are supposed to use -f null NUL instead of -f null - on windows. -
(pipe) is not fast on Windows, I believe.
>
No, I'm not :)
{{{
ffmpeg -benchmark -hwaccel cuda -i mandelbrot-yuv420p-2160p.mov -f null
NUL - 1>mandelbrot-yuv420p-2160p1cuda.txt 2>&1
[AVFormatContext @ 000001a4062b92c0] Unable to choose an output format for
'pipe:'; use a standard extension for the filename or specify the format
manually.
[out#1 @ 000001a46f7a1940] Error initializing the muxer for pipe:: Invalid
argument
Error opening output file -.
Error opening output files: Invalid argument
}}}
> > The only conclusion I can come up with is that it doesn't matter what
hwaccel you use.
>
> No true, I think nvdec (-hwaccel cuda) takes less energy and less memory
than -c:v hevc_cuvid -i mandelbrot-yuv420p-2160p.mov
>
> you can see that in nvidia-smi
I don't care about memory, but have the bench: maxrss lines if absolutely
required.
About the power consumption:
{{{
ffmpeg -benchmark -hwaccel cuda -i mandelbrot-yuv420p-2160p.mov -f null -
> mandelbrot-yuv420p-2160p1cuda.txt 2>&1
}}}
68W
{{{
ffmpeg -benchmark -hwaccel d3d12va -i mandelbrot-yuv420p-2160p.mov -f null
- > mandelbrot-yuv420p-2160p1d3d12va.txt 2>&1
}}}
68W
{{{
ffmpeg -benchmark -hwaccel vulkan -i mandelbrot-yuv420p-2160p.mov -f null
- > mandelbrot-yuv420p-2160p1vulkan.txt 2>&1
}}}
68W
{{{
ffmpeg -benchmark -hwaccel dxva2 -i mandelbrot-yuv420p-2160p.mov -f null -
> mandelbrot-yuv420p-2160p1dxva2.txt 2>&1
}}}
68W
Conclusion about power consumption: It's identical. That means, again,
that my original conclusion was right.
''It does not matter which hwaccel you use. EOD.''
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11271#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list