#11613: ffv1_vulkan and level 4 does not work well
----------------------------------+--------------------------------------
             Reporter:  Andrew-R  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avcodec   |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:
 How to reproduce:
 {{{
 bash-5.1$ RADV_PERFTEST=video_decode ~/bin/ffmpeg8-vk -init_hw_device
 vulkan -hwaccel vulkan -hwaccel_output_format vulkan  -i ~/6029.mp4 -an
 -c:v ffv1_vulkan -level 4 -strict -2  -vframes 1000 frame-ffv1-vulkan.mkv
 ffmpeg version N-118546-g903b085f91 Copyright (c) 2000-2025 the FFmpeg
 developers
   built with gcc 11.2.0 (GCC)
   configuration: --enable-opencl --disable-debug --enable-libx265
 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan
 --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d
 --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-
 libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-
 libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus
 --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh
 --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-
 libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp
   libavutil      60.  3.100 / 60.  3.100
   libavcodec     62.  3.101 / 62.  3.101
   libavformat    62.  0.102 / 62.  0.102
   libavdevice    62.  0.100 / 62.  0.100
   libavfilter    11.  0.100 / 11.  0.100
   libswscale      9.  0.100 /  9.  0.100
   libswresample   6.  0.100 /  6.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/6029.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: mp42isomavc1
     creation_time   : 2011-06-24T09:52:37.000000Z
     encoder         : HandBrake 0.9.5 2011043000
   Duration: 01:28:31.60, start: 0.000000, bitrate: 789 kb/s
   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
 yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, 657 kb/s, 25
 fps, 25 tbr, 90k tbn (default)
     Metadata:
       creation_time   : 2011-06-24T09:52:37.000000Z
       vendor_id       : [0][0][0][0]
       encoder         : JVT/AVC Coding
   Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 127 kb/s (default)
     Metadata:
       creation_time   : 2011-06-24T09:52:37.000000Z
       vendor_id       : [0][0][0][0]
 File 'frame-ffv1-vulkan.mkv' already exists. Overwrite? [y/N] y
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (ffv1_vulkan))
 Press [q] to stop, [?] for help
 [ffv1_vulkan @ 0xc85f1c0] Async buffers: 0MiB per context, 0MiB total,
 depth: 1
 Output #0, matroska, to 'frame-ffv1-vulkan.mkv':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: mp42isomavc1
     encoder         : Lavf62.0.102
   Stream #0:0(und): Video: ffv1 (FFV1 / 0x31564646), vulkan(tv,
 smpte170m/smpte170m/bt709, progressive), 720x400, q=2-31, 200 kb/s, 25
 fps, 1k tbn (default)
     Metadata:
       encoder         : Lavc62.3.101 ffv1_vulkan
       creation_time   : 2011-06-24T09:52:37.000000Z
       vendor_id       : [0][0][0][0]
 [out#0/matroska @ 0xc85d980] video:83357KiB audio:0KiB subtitle:0KiB other
 streams:0KiB global headers:0KiB muxing overhead: 0.053416%
 frame= 1000 fps= 44 q=-0.0 Lsize=   83402KiB time=00:00:40.00
 bitrate=17080.6kbits/s speed=1.77x elapsed=0:00:22.62


 }}}

 Resulting file is uplayable:

 {{{
 bash-5.1$ mpv frame-ffv1-vulkan.mkv
  (+) Video --vid=1 (*) (ffv1 720x400 25.000fps)
 [ffmpeg/video] ffv1: CRC mismatch 1ED3EEA2!
 Could not open codec.
 Decoder init failed for ffv1
 Failed to initialize a decoder for codec 'ffv1'.
 Video: no video
 No video or audio streams selected.
 Exiting... (Errors when loading file)
 }}}

 Note that same problem seem to exist in sw ffv1 encoder.

 Without -level 4 Vulkan encoder complains:

 {{{
 [ffv1_vulkan @ 0xc8e2b80] Encoding frames with subsampling and unaligned
 dimensions is only supported in version 4 (-level 4)
 }}}

 while sw encoder works fine.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11613>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to