I would like to check Andrew's 3 attached patches in as: ffmpeg-8.0.V1 ... V2 ... V3 so that they do not get lost.  I built 3 different distros with them in WITHOUT any vulkan stuff installed just to make sure no impact to normalcy.  What do you think?

On Tue, Dec 2, 2025 at 6:34 PM Andrew Randrianasulu via Cin <cin@lists.cinelerra-gg.org> wrote:
On Mon, Dec 1, 2025 at 8:09 PM Andrew Randrianasulu
<randrianasulu@gmail.com> wrote:
>
> Probably at patchwork also, but GSoC page links to this
>
> https://github.com/raphaelthegreat/FFmpeg/tree/prores-vk-encode
>
> page itself:
>
> https://summerofcode.withgoogle.com/archive/2025/projects/PHTgRqGg
>
> so I pulled tree into separate folder, switched to branch, extracted 3 last commits, git am them to ffmpeg.git (there was host copy vulkan fix in meantime)
>
> And ....
>
> it seems to work.
>
> At least for HQ profile ...
>
> at 4.5 fps, but this is faster than ffv1 (but not lossless, obviously).
>
> ./ffmpeg  -init_hw_device vulkan=vulkan -hwaccel vulkan -filter_hw_device vulkan -i /dev/shm/Nature072-A006C0035_230328_4U1Q.mov -vf libplacebo  -c:v prores_ks_vulkan -f matroska -noautoscale -pix_fmt vulkan  4k.mov
> ffmpeg version N-120782-gc12bca52f8 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. 19.101 / 60. 19.101
>   libavcodec     62. 21.100 / 62. 21.100
>   libavformat    62.  6.103 / 62.  6.103
>   libavdevice    62.  2.100 / 62.  2.100
>   libavfilter    11. 10.101 / 11. 10.101
>   libswscale      9.  3.100 /  9.  3.100
>   libswresample   6.  2.100 /  6.  2.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/Nature072-A006C0035_230328_4U1Q.mov':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 512
>     compatible_brands: qt
>     creation_time   : 2023-04-07T18:41:32.000000Z
>     encoder         : Blackmagic Design DaVinci Resolve Studio
>   Duration: 00:00:08.00, start: 0.000000, bitrate: 1787424 kb/s
>   Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt709, progressive), 3840x2160, 1787418 kb/s, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 15360 tbn (default)
>     Metadata:
>       creation_time   : 2023-04-07T18:41:32.000000Z
>       handler_name    : VideoHandler
>       vendor_id       : appl
>       encoder         : Apple ProRes 422 HQ
>       timecode        : 21:22:52:12
>   Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74), 0 kb/s
>     Metadata:
>       creation_time   : 2023-04-07T18:41:32.000000Z
>       handler_name    : TimeCodeHandler
>       timecode        : 21:22:52:12
> File '4k.mov' already exists. Overwrite? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (prores (native) -> prores (prores_ks_vulkan))
> Press [q] to stop, [?] for help
> [prores_ks_vulkan @ 0xb299440] Autoselected HQ profile to keep best quality. It can be overridden through -profile option.
> Output #0, matroska, to '4k.mov':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 512
>     compatible_brands: qt
>     encoder         : Lavf62.6.103
>   Stream #0:0: Video: prores (HQ) (apch / 0x68637061), vulkan(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 1k tbn (default)
>     Metadata:
>       encoder         : Lavc62.21.100 prores_ks_vulkan
>       creation_time   : 2023-04-07T18:41:32.000000Z
>       handler_name    : VideoHandler
>       vendor_id       : appl
>       timecode        : 21:22:52:12
> [out#0/matroska @ 0xb29ddc0] video:1770722KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.001071%
> frame=  480 fps=4.5 q=-0.0 Lsize= 1770741KiB time=00:00:08.00 bitrate=1813239.1kbits/s speed=0.0755x elapsed=0:01:45.90
>
>
> testing:
>
> bash-5.1$ mplayer 4k.mov
> MPlayer SVN-r38660-11.2.0 (C) 2000-2024 MPlayer Team
> 227 audio & 468 video codecs
> do_connect: could not connect to socket
> connect: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote control.
>
> Playing 4k.mov.
> libavformat version 61.6.100 (internal)
> libavformat file format detected.
> [lavf] stream 0: video (prores), -vid 0
> VIDEO:  [apch]  3840x2160  0bpp  60.000 fps    0.0 kbps ( 0.0 kbyte/s)
> ==========================================================================
> Opening video decoder: [qtvideo] Quicktime Video decoder
> sh->ImageDesc not set, try -demuxer mov if this fails.
> QuickTime6.3 DLLs found
> QuickTime.qts patched!!! old entry=0x6693c3e0
> theQuickTimeDispatcher catched -> 0x6693c3e0
> WARNING! Invalid Ptr handle!
> theQuickTimeDispatcher catched -> 0x6693c3e0
> theQuickTimeDispatcher catched -> 0x6693c3e0
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> VO: [vdpau] 3840x2160 => 3840x2160 Packed YUY2
> DecompressSequenceBegin result=-8961
> VDecoder init failed :(
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 61.17.100 (internal)
> Selected video codec: [ffprores] vfm: ffmpeg (FFmpeg Apple ProRes)
> ==========================================================================
> Clip info:
>  COMPATIBLE_BRANDS: qt
>  MAJOR_BRAND: qt
>  MINOR_VERSION: 512
>  ENCODER: Lavf62.6.103
> Load subtitles in ./
> Audio: no sound
> Starting playback...
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> [swscaler @ 0x57a10180]bicubic scaler, from yuv422p10le to yuv420p using MMXEXT
> VO: [vdpau] 3840x2160 => 3840x2160 Planar YV12
> [VD_FFMPEG] DRI failure.
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> VO: [vdpau] 3840x2160 => 3840x2160 Planar YV12
> V:   0.0   0/  0 ??% ??% ??,?% 0 0
> [VD_FFMPEG] DRI failure.
> V:   0.3   0/  0 ??% ??% ??,?% 0 0
> [ASPECT] Warning: No suitable new res found!
> [ASPECT] Warning: No suitable new res found!
> V:   1.9   0/  0 47% 460%  0.0% 0 0
>
> Exiting... (Quit)
>
>
>
> I wonder if Terje can replicate those results? Do not forgot to check if libplacebo was compiled in for your ffmpeg version ...

It works with combination of two ffmpeg lines:


./ffmpeg  -init_hw_device vulkan=vulkan -hwaccel vulkan
-filter_hw_device vulkan -hwaccel_output_format vulkan -i
/dev/shm/Nature072-A006C0035_230328_4U1Q.mov   -c:v prores_ks_vulkan
-f matroska -noautoscale -pix_fmt vulkan  4k.mov

ffmpeg version N-120782-gc12bca52f8 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. 19.101 / 60. 19.101
  libavcodec     62. 21.100 / 62. 21.100
  libavformat    62.  6.103 / 62.  6.103
  libavdevice    62.  2.100 / 62.  2.100
  libavfilter    11. 10.101 / 11. 10.101
  libswscale      9.  3.100 /  9.  3.100
  libswresample   6.  2.100 /  6.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/dev/shm/Nature072-A006C0035_230328_4U1Q.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : 2023-04-07T18:41:32.000000Z
    encoder         : Blackmagic Design DaVinci Resolve Studio
  Duration: 00:00:08.00, start: 0.000000, bitrate: 1787424 kb/s
  Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061),
yuv422p10le(tv, bt709, progressive), 3840x2160, 1787418 kb/s, SAR 1:1
DAR 16:9, 60 fps, 60 tbr, 15360 tbn (default)
    Metadata:
      creation_time   : 2023-04-07T18:41:32.000000Z
      handler_name    : VideoHandler
      vendor_id       : appl
      encoder         : Apple ProRes 422 HQ
      timecode        : 21:22:52:12
  Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74), 0 kb/s
    Metadata:
      creation_time   : 2023-04-07T18:41:32.000000Z
      handler_name    : TimeCodeHandler
      timecode        : 21:22:52:12
Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> prores (prores_ks_vulkan))
Press [q] to stop, [?] for help
[prores_ks_vulkan @ 0xc9c7400] Autoselected HQ profile to keep best
quality. It can be overridden through -profile option.
Output #0, matroska, to '4k.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf62.6.103
  Stream #0:0: Video: prores (HQ) (apch / 0x68637061), vulkan(tv,
bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s,
60 fps, 1k tbn (default)
    Metadata:
      encoder         : Lavc62.21.100 prores_ks_vulkan
      creation_time   : 2023-04-07T18:41:32.000000Z
      handler_name    : VideoHandler
      vendor_id       : appl
      timecode        : 21:22:52:12
[out#0/matroska @ 0xc9cbb80] video:1744362KiB audio:0KiB subtitle:0KiB
other streams:0KiB global headers:0KiB muxing overhead: 0.001087%
frame=  480 fps=5.4 q=-0.0 Lsize= 1744381KiB time=00:00:08.00
bitrate=1786246.0kbits/s speed=0.0907x elapsed=0:01:28.16

testing:

bash-5.1$ mpv 4k.mov
Video --vid=1  (*) (prores 3840x2160 60 fps)
[ffmpeg/video] prores: Unknown prores profile 0
[ffmpeg/video] prores: Unknown prores profile 0
[ffmpeg/video] prores: Unknown prores profile 0
[ffmpeg/video] prores: Unknown prores profile 0
[ffmpeg/video] prores: Unknown prores profile 0
VO: [gpu] 3840x2160 yuv422p10
V: 00:00:07.967 / 00:00:08.000 (100%) Dropped: 148

so, a bit faster than with libplacebo.


Patches (git am) for ffmpeg git from

git://git.videolan.org/ffmpeg.git

at commit

commit 413346bd06c33226254dacc829f128a6b6c337d7 (origin/master, origin/HEAD)

attached ....
_______________________________________________
Cin mailing list -- cin@lists.cinelerra-gg.org
To unsubscribe send an email to cin-leave@lists.cinelerra-gg.org