[FFmpeg-trac] #8512(undetermined:open): The Vulkan based filter scale_vulkan does not work on NVIDIA hardware.
FFmpeg
trac at avcodec.org
Thu Feb 6 21:20:08 EET 2020
#8512: The Vulkan based filter scale_vulkan does not work on NVIDIA hardware.
-------------------------------------+-------------------------------------
Reporter: Brainiarc7 | Owner: philipl
Type: defect | Status: open
Priority: normal | Component:
| undetermined
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Brainiarc7):
Hello @philipl,
With your recommendation:
{{{
ffmpeg -threads 1 -loglevel info -nostdin -y \
-fflags +genpts-fastseek \
-init_hw_device cuda=cuda:0 -filter_hw_device cuda \
-hwaccel nvdec -hwaccel_output_format cuda -extra_hw_frames 2 \
-reinit_filter 1 -vsync 1 -async 1 -filter_threads 2
-filter_complex_threads 2 \
-i feeds.mp4 -filter_complex \
"[0:v]hwupload=derive_device=vulkan,split=2[s0][s1]; \
[s0]scale_vulkan=w=1920:h=1080:scaler=0,hwupload=derive_device=cuda[v0]; \
[s1]scale_vulkan=w=1280:h=720:scaler=0,hwupload=derive_device=cuda[v1]"
\
-map "[v0]" -b:v:0 5800k -minrate:v:0 5800k -maxrate:v:0 5800k
-bufsize:v:0 5800k -c:v:0 h264_nvenc -r:v:0 ntsc \
-profile:v:0 high -preset:v:0 llhp -rc:v:0 cbr_ld_hq -g:v:0 60 -gpu:v:0
0 -strict_gop:v:0 1 -bf:v:0 0 \
-map "[v1]" -b:v:1 4000k -minrate:v:1 4000k -maxrate:v:1 4000k
-bufsize:v:1 4000k -c:v:1 h264_nvenc -r:v:1 ntsc \
-profile:v:1 high -preset:v:1 llhp -rc:v:1 cbr_ld_hq -g:v:1 60 -gpu:v:1
0 -strict_gop:v:1 1 -bf:v:1 0 \
-map 0:a -c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \
-flags +global_header+cgop \
-max_muxing_queue_size 9000000 -threads 2 -f tee \
"[select=\'v:0,a\':f=mp4]'hq.mp4'| \
[select=\'v:1,a\':f=mp4]'med.mp4'"
}}}
That command works and its' exceptionally *faster* than the prior variant
above.
The encoder in this case runs at about ~10x on an RTX 2080.
The previous command (with the repeated hwdownload instances) run at a
paltry ~1.5x.
That's a ~7x speed up!
Thank you so much :-)
I can now (safely) close this ticket.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8512#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list