You are not logged in.
Running
ffmpeg -init_hw_device vulkan -i INPUT_FILE -vf format=nv12,hwupload -c:v h264_vulkan -y OUTPUT_FILEresults in "Invalid Arguments" on nvidia-575.57.08 driver (updated on June 6th)
Downgrading to "nvidia-570.153.02-3" fixed the issue for me.
I know this is an upstream issue, just want to post it here in case someone else also run into the same problem.
Offline
I know this is an upstream issue
Please post the link to said known issue.
Online
hanyoung wrote:I know this is an upstream issue
Please post the link to said known issue.
I haven't found an nvidia issue report yet.
Offline
vulkaninfo --summaryOffline
vulkaninfo --summary
575.57.08
==========
VULKANINFO
==========
Vulkan Instance Version: 1.4.313
Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_surface_maintenance1 : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 5
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1
VK_NV_display_stereo : extension revision 1
[b]Instance Layers: count = 7[/b]
--------------------------
VK_LAYER_KHRONOS_validation Khronos Validation Layer 1.4.313 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.4.303 version 1
[b]VK_LAYER_NV_present NVIDIA GR2608 layer 1.4.303 version 1[/b]
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_32 Steam Overlay Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_64 Steam Overlay Layer 1.3.207 version 1
Devices:
========
GPU0:
apiVersion = 1.4.303
[b]driverVersion = 575.57.8.0[/b]
vendorID = 0x10de
deviceID = 0x1b81
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = NVIDIA GeForce GTX 1070
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
[b]driverInfo = 575.57.08[/b]
conformanceVersion = 1.4.1.0
deviceUUID = c438aa24-4c52-3e7f-4c3b-b2836c8e4971
[b]driverUUID = 5f139ea4-52d6-527b-8f33-b64f559afd6f[/b]570.153.02
==========
VULKANINFO
==========
Vulkan Instance Version: 1.4.313
Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_surface_maintenance1 : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 5
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1
VK_NV_display_stereo : extension revision 1
Instance Layers: count = 6
--------------------------
VK_LAYER_KHRONOS_validation Khronos Validation Layer 1.4.313 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.4.303 version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_32 Steam Overlay Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_64 Steam Overlay Layer 1.3.207 version 1
Devices:
========
GPU0:
apiVersion = 1.4.303
[b]driverVersion = 570.153.2.0[/b]
vendorID = 0x10de
deviceID = 0x1b81
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = NVIDIA GeForce GTX 1070
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
[b]driverInfo = 570.153.02[/b]
conformanceVersion = 1.4.1.0
deviceUUID = c438aa24-4c52-3e7f-4c3b-b2836c8e4971
[b]driverUUID = 70ebf652-faaf-55d2-8008-fe5a49953688[/b]Apart from the driver version, there are difference in
Instance Layers: count
and
VK_LAYER_NV_present NVIDIA GR2608 layer
Offline
VK_LOADER_LAYERS_DISABLE='~implicit~' ffmpeg -init_hw_device vulkan -i porn.vp9 -vf format=nv12,hwupload -c:v h264_vulkan -y porn_compatible_with_your_tv.mp4/usr/share/vulkan/implicit_layer.d/nvidia_layers.json
Searching for VK_LAYER_NV_gr2608 yields surprising little results (a SO question about what that is - that has been moderated away…)
Edit: x-ref, https://bbs.archlinux.org/viewtopic.php … 5#p2246195
Last edited by seth (2025-06-14 06:30:00)
Offline
VK_LOADER_LAYERS_DISABLE='~implicit~' ffmpeg -init_hw_device vulkan -i porn.vp9 -vf format=nv12,hwupload -c:v h264_vulkan -y porn_compatible_with_your_tv.mp4
ffmpeg version n7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 15.1.1 (GCC) 20250425
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, matroska,webm, from 'porn.mkv'':
Metadata:
encoder : libebml v1.4.0 + libmatroska v1.6.1
Duration: 00:25:25.09, start: 0.000000, bitrate: 8060 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
Stream #0:1(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
Stream #0:2(eng): Subtitle: ass (ssa) (default) (forced)
Metadata:
title : English
Stream #0:3(ara): Subtitle: ass (ssa)
Metadata:
title : Arabic Montenegro
Stream #0:4(spa): Subtitle: ass (ssa)
Metadata:
title : European Spanish
Stream #0:5(fre): Subtitle: ass (ssa)
Metadata:
title : French
Stream #0:6(ger): Subtitle: ass (ssa)
Metadata:
title : German
Stream #0:7(ita): Subtitle: ass (ssa)
Metadata:
title : Italian
Stream #0:8(por): Subtitle: ass (ssa)
Metadata:
title : Portuguese Brazilian
Stream #0:9(rus): Subtitle: ass (ssa)
Metadata:
title : Russian
Stream #0:10(spa): Subtitle: ass (ssa)
Metadata:
title : Spanish Laos
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vulkan))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_vulkan @ 0x558f8e1bb680] No rate control settings specified, using fixed QP = 18
[vost#0:0/h264_vulkan @ 0x558f9044fb00] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x558f8e1b7480] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0x558f8e1b7480] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x558f8e1b7480] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/h264_vulkan @ 0x558f9044fb00] Could not open encoder before EOF
[vost#0:0/h264_vulkan @ 0x558f9044fb00] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_vulkan @ 0x558f9044fb00] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x558f9050f6c0] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A
[aac @ 0x558f907e2580] Qavg: 10519.031
Conversion failed!/usr/share/vulkan/implicit_layer.d/nvidia_layers.json
{
"file_format_version" : "1.0.1",
"layers": [{
"name": "VK_LAYER_NV_optimus",
"type": "INSTANCE",
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.4.303",
"implementation_version" : "1",
"description" : "NVIDIA Optimus layer",
"functions": {
"vkGetInstanceProcAddr": "vk_optimusGetInstanceProcAddr",
"vkGetDeviceProcAddr": "vk_optimusGetDeviceProcAddr"
},
"enable_environment": {
"__NV_PRIME_RENDER_OFFLOAD": "1"
},
"disable_environment": {
"DISABLE_LAYER_NV_OPTIMUS_1": ""
}
},{
"name": "VK_LAYER_NV_present",
"type": "INSTANCE",
"library_path": "libnvidia-present.so.575.57.08",
"api_version" : "1.4.303",
"implementation_version" : "1",
"description" : "NVIDIA GR2608 layer",
"functions": {
"vkGetInstanceProcAddr": "vk_nvpGetInstanceProcAddr",
"vkGetDeviceProcAddr": "vk_nvpGetDeviceProcAddr"
},
"enable_environment": {
"NVPRESENT_ENABLE_SMOOTH_MOTION": "1"
},
"disable_environment": {
"DISABLE_LAYER_NV_GR2608_1": ""
}
}]
}Offline
Exactly same as before or any changes to the failure?
What if you more nimbly only "VK_LOADER_LAYERS_DISABLE='*present*'"
Last edited by seth (2025-06-14 07:05:07)
Offline
Exactly same as before or any changes to the failure?
What if you more nimbly only "VK_LOADER_LAYERS_DISABLE='*present*'"
set VK_LOADER_LAYERS_DISABLE to either value didn't alter the ffmpeg output.
ffmpeg version n7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 15.1.1 (GCC) 20250425
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, matroska,webm, from 'porn.mkv':
Metadata:
encoder : libebml v1.4.0 + libmatroska v1.6.1
Duration: 00:25:25.09, start: 0.000000, bitrate: 8060 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
Stream #0:1(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
Stream #0:2(eng): Subtitle: ass (ssa) (default) (forced)
Metadata:
title : English
Stream #0:3(ara): Subtitle: ass (ssa)
Metadata:
title : Arabic Montenegro
Stream #0:4(spa): Subtitle: ass (ssa)
Metadata:
title : European Spanish
Stream #0:5(fre): Subtitle: ass (ssa)
Metadata:
title : French
Stream #0:6(ger): Subtitle: ass (ssa)
Metadata:
title : German
Stream #0:7(ita): Subtitle: ass (ssa)
Metadata:
title : Italian
Stream #0:8(por): Subtitle: ass (ssa)
Metadata:
title : Portuguese Brazilian
Stream #0:9(rus): Subtitle: ass (ssa)
Metadata:
title : Russian
Stream #0:10(spa): Subtitle: ass (ssa)
Metadata:
title : Spanish Laos
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vulkan))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_vulkan @ 0x559fabae3ec0] No rate control settings specified, using fixed QP = 18
[vost#0:0/h264_vulkan @ 0x559fadd7b2c0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x559fabac2fc0] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0x559fabac2fc0] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x559fabac2fc0] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/h264_vulkan @ 0x559fadd7b2c0] Could not open encoder before EOF
[vost#0:0/h264_vulkan @ 0x559fadd7b2c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_vulkan @ 0x559fadd7b2c0] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x559fababf940] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A
[aac @ 0x559fae51cec0] Qavg: 8910.823
Conversion failed!Offline
possibly not the layer.
https://github.com/paulpacifico/shutter … issues/266
https://trac.ffmpeg.org/wiki/Encode/H.264#Profile - does enforcing (likely either basline, main or high) a profile work around this?
Offline