SASUKE-DUCK / dovi-to-hdr-converter

19 stars 5 forks source link

how do you get this working on windows?! #2

Open doubledrat opened 4 months ago

doubledrat commented 4 months ago

sorry to have to ask, but I've just spent 2 hours trying to get vulkan to work on windows and just keep getting this when I use your code -

python DoVi2.py -i E:\downloads\dolby-vision-people.mp4 -o dvpeople.mp4 --bitrate 8000 --type hdr10 ['ffmpeg.exe', '-nostdin', '-loglevel', 'error', '-stats', '-y', '-init_hw_device', 'vulkan=vk:0', '-filter_hw_device', 'vulkan', '-i', 'E:\\downloads\\dolby-vision-people.mp4', '-vf', 'hwupload,libplacebo=peak_detect=false:colorspace=9:color_primaries=9:color_trc=16:range=tv:format=yuv420p10le,hwdownload,format=yuv420p10le', '-c:v', 'libx265', '-map_chapters', '-1', '-an', '-sn', '-b:v', '8000k', '-x265-params', 'repeat-headers=1:sar=1:hrd=1:aud=1:open-gop=0:hdr10=1:sao=0:rect=0:cutree=0:deblock=-3-3:strong-intra-smoothing=0:chromaloc=2:aq-mode=1:vbv-maxrate=160000:vbv-bufsize=160000:max-luma=1023:max-cll=0,0:master-display=G(8500,39850)B(6550,23000)R(35400,15650)WP(15635,16450)L(10000000,1)WP(15635,16450)L(1000000,100%):preset=slow', 'dvpeople.mp4_hdr10_slow.mp4'] Device creation failed: -12. Failed to set value 'vulkan=vk:0' for option 'init_hw_device': Cannot allocate memory Invalid filter device vulkan. Failed to set value 'vulkan' for option 'filter_hw_device': Invalid argument [AVFilterGraph @ 0000016f4c8aca40] No such filter: 'libplacebo' [vost#0:0/libx265 @ 0000016f4c9e19c0] Error initializing a simple filtergraph Error opening output file dvpeople.mp4_hdr10_slow.mp4. Error opening output files: Filter not found

I know it's not a problem with your code, but I'm hoping you can point me to a solution.

I have vulkan installed and vulkancube works, but I have no idea how to install the libplacebo filter and all the distributions I can find are just for un*x. I also don't know how to tell ffmpeg that I have vulkan. the only instructions I can find say go to the display part of the config program, which doesn't exist.

thanks in advance

SASUKE-DUCK commented 3 months ago

@frankivsk1 you can send me a message to discord if you like( discord user: wks_uwu ) , in the message you send indicate that you are the github user because I don't usually reply to messages.

SASUKE-DUCK commented 3 months ago

@doubledrat the issue is simple to answer, you do not have vulkan installed and/or you do not meet some of the requirements.

fraternl commented 2 months ago

I had some trouble getting it to work and blamed the ffmpeg.exe in my PATH

I got

Unrecognized option 'x265-params'.
Error splitting the argument list: Option not found

I downloaded https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip and extracted it in "C:\Program Files" Then I put it in my System's path (right-click this computer -> advanced -> environment variables -> Path)

then did ffmpeg -hwaccels and it gave me this:

ffmpeg -hwaccels

ffmpeg version N-114841-ge9e1932c1c-20240416 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.26.0.65_ecc5e41)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20240416
  libavutil      59. 15.100 / 59. 15.100
  libavcodec     61.  5.103 / 61.  5.103
  libavformat    61.  3.100 / 61.  3.100
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.101 / 10.  2.101
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
Hardware acceleration methods:
cuda
vaapi
dxva2
qsv
d3d11va
opencl
vulkan
d3d12va

It says "vulkan" and "--enable-libx265"