[FFmpeg-user] Segmentation fault when running vulkan filter on Windows

Dylan Fernando dylanf123 at gmail.com
Sun Apr 18 02:22:10 EEST 2021


When running avgblur_vulkan on Windows, using MSYS2, I get a Segmentation
fault. avgblur_opencl works correctly

Command used:
ffmpeg -v verbose -loglevel debug -init_hw_device vulkan:0.0 -i atm.mp4
-filter_complex hwupload,avgblur_vulkan,hwdownload avgvulkan3.mp4

Output:

ffmpeg version 4.4.git Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev9, Built by MSYS2 project)
  configuration: --enable-opencl --enable-vulkan --enable-libglslang
  libavutil      56. 72.100 / 56. 72.100
  libavcodec     58.135.100 / 58.135.100
  libavformat    58. 77.100 / 58. 77.100
  libavdevice    58. 14.100 / 58. 14.100
  libavfilter     7.111.100 /  7.111.100
  libswscale      5. 10.100 /  5. 10.100
  libswresample   3. 10.100 /  3. 10.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'verbose'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device'
(initialise hardware device) with argument 'vulkan:0.0'.
Reading option '-i' ... matched as input url with argument 'atm.mp4'.
Reading option '-filter_complex' ... matched as option 'filter_complex'
(create a complex filtergraph) with argument
'hwupload,avgblur_vulkan,hwdownload'.
Reading option 'avgvulkan3.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument verbose.
Applying option init_hw_device (initialise hardware device) with argument
vulkan:0.0.
[AVHWDeviceContext @ 000001430cbe9280] GPU listing:
[AVHWDeviceContext @ 000001430cbe9280]     0: GeForce RTX 2070 SUPER
(discrete) (0x1e84)
[AVHWDeviceContext @ 000001430cbe9280] Using queue family 0 (total queues:
16) for graphics
[AVHWDeviceContext @ 000001430cbe9280]     QF 0 flags: (graphics) (compute)
(transfers) (sparse)
[AVHWDeviceContext @ 000001430cbe9280] Using queue family 2 (total queues:
8) for compute
[AVHWDeviceContext @ 000001430cbe9280]     QF 2 flags: (compute)
(transfers) (sparse)
[AVHWDeviceContext @ 000001430cbe9280] Using queue family 1 (total queues:
2) for transfers
[AVHWDeviceContext @ 000001430cbe9280]     QF 1 flags: (transfers) (sparse)
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
"VK_EXT_external_memory_host"
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
"VK_KHR_push_descriptor"
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
"VK_EXT_host_query_reset"
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
VK_EXT_external_memory_host
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
VK_KHR_push_descriptor
[AVHWDeviceContext @ 000001430cbe9280] Using device extension
VK_EXT_host_query_reset
[AVHWDeviceContext @ 000001430cbe9280] Using device: GeForce RTX 2070 SUPER
[AVHWDeviceContext @ 000001430cbe9280] Alignments:
[AVHWDeviceContext @ 000001430cbe9280]
optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 000001430cbe9280]     minMemoryMapAlignment:
   64
[AVHWDeviceContext @ 000001430cbe9280]     minImportedHostPointerAlignment:
   4096
Applying option filter_complex (create a complex filtergraph) with argument
hwupload,avgblur_vulkan,hwdownload.
Successfully parsed a group of options.
Parsing a group of options: input url atm.mp4.
Successfully parsed a group of options.
Opening an input file: atm.mp4.
[NULL @ 000001430cca4f00] Opening 'atm.mp4' for reading
[file @ 000001430ccaec40] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] Format mov,mp4,m4a,3gp,3g2,mj2
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] ISO: File Type Major Brand:
mp42
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] Unknown dref type 0x206c7275
size 12
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] Before
avformat_find_stream_info() pos: 23751465 bytes read:74604 seeks:1
nb_streams:2
[h264 @ 000001430cca7180] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 6(SEI), nal_ref_idc: 0
    Last message repeated 1 times
[h264 @ 000001430cca7180] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 000001430cca7180] Format yuv420p chosen by get_format().
[h264 @ 000001430cca7180] Reinit context to 1024x576, pix_fmt: yuv420p
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[h264 @ 000001430cca7180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430cca7180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001430cca4f00] After
avformat_find_stream_info() pos: 99174 bytes read:205676 seeks:2 frames:9
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'atm.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
  Duration: 00:02:08.45, start: 0.000000, bitrate: 1479 kb/s
  Stream #0:0(und), 8, 1/25000: Video: h264 (Constrained Baseline), 1
reference frame (avc1 / 0x31637661), yuv420p(left), 1024x576, 0/1, 1386
kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, 90 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: output url avgvulkan3.mp4.
Successfully parsed a group of options.
Opening an output file: avgvulkan3.mp4.
File 'avgvulkan3.mp4' already exists. Overwrite? [y/N] y
[file @ 000001430ccab740] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 8 logical cores
[h264 @ 000001430d0747c0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000001430d0747c0] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 (h264) -> hwupload (graph 0)
  hwdownload (graph 0) -> Stream #0:0 (mpeg4)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 000001430d0747c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001430d0747c0] nal_unit_type: 6(SEI), nal_ref_idc: 0
    Last message repeated 1 times
[h264 @ 000001430d0747c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 000001430d0747c0] Format yuv420p chosen by get_format().
[h264 @ 000001430d0747c0] Reinit context to 1024x576, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 00000143185f62c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 00000143185f62c0] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0000014318769080] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0000014318769080] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0000014318769800] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0000014318769800] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0000014318620300] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0000014318620300] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 000001431851c180] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001431851c180] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 000001431851bd00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001431851bd00] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 000001431851d3c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001431851d3c0] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[graph_1_in_0_1 @ 00000143193b0100] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 00000143193b0100] Setting 'sample_rate' to value '48000'
[graph_1_in_0_1 @ 00000143193b0100] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 00000143193b0100] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 00000143193b0100] tb:1/48000 samplefmt:fltp
samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0000014319525ac0] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0000014319525ac0] Setting 'sample_rates' to value
'96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 000001430d0c6e40] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
    Last message repeated 14 times
[h264 @ 000001431851c600] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 000001431851c600] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 3
[graph 0 input from stream 0:0 @ 00000143197b6f00] Setting 'video_size' to
value '1024x576'
[graph 0 input from stream 0:0 @ 00000143197b6f00] Setting 'pix_fmt' to
value '0'
[graph 0 input from stream 0:0 @ 00000143197b6f00] Setting 'time_base' to
value '1/25000'
[graph 0 input from stream 0:0 @ 00000143197b6f00] Setting 'pixel_aspect'
to value '0/1'
[graph 0 input from stream 0:0 @ 00000143197b6f00] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 0:0 @ 00000143197b6f00] w:1024 h:576
pixfmt:yuv420p tb:1/25000 fr:25/1 sar:0/1
[format @ 00000143197b7280] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 00000143195c6600] query_formats: 6 queried, 5 merged, 0
already done, 0 delayed
[hwupload @ 00000143195c97c0] Surface format is yuv420p.
Segmentation fault

When running in gdb I found the error might be in SPIRV.dll:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ffca45be4e5 in ?? () from C:\msys64\mingw64\bin\SPIRV.dll

Regards,
Dylan


More information about the ffmpeg-user mailing list