Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: FFmpeg not working in path or /bin #525

Open
yami-no-tusbas opened this issue Jul 10, 2024 · 2 comments
Open

[Bug]: FFmpeg not working in path or /bin #525

yami-no-tusbas opened this issue Jul 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yami-no-tusbas
Copy link
Contributor

Environment

  • OS: Windows 11 23H2

Describe the bug

When I use native ffmpeg binding I got this for every video, acceleration is set to CUDA since I have NVIDIA GPU (RTX 4090). Iy don't care that my ffmpeg are in ./bin or in the path ,I always end up with this error, I've Tried 6.x, 7.x, nightly ffmpeg build, nothing is working here. But the most strange thing is... If I use the command your app is spawning, it work flawlessly I get the image. Since I had two GPU (integrated and dedicated) I tried too remove the integrated one from windows, and it did not change anything, it is not a matter of using the wrong GPU, since now I only have my rtx in windows. I also tried using DXVA2, OpenCL and Vulkan, just in case, it is the same error each time except that AV_HWDEVICE_TYPE_ chance to whatever I tried.

12:04:05 => Failed using native FFmpeg binding on 'G:\path to video\enco\1 (48) 4740296 [AV1(8bits) 35Q]_05-07-24_19-59_enc.mkv', try switching to process mode. Exception: System.Exception: Failed to find compatible pixel format for AV_HWDEVICE_TYPE_CUDA
   at VDF.Core.FFTools.FFmpegNative.VideoStreamDecoder.GetHWPixelFormat(AVHWDeviceType hwDevice, AVCodec* codec) in D:\a\videoduplicatefinder\videoduplicatefinder\VDF.Core\FFTools\FFmpegNative\VideoStreamDecoder.cs:line 138
   at VDF.Core.FFTools.FFmpegNative.VideoStreamDecoder..ctor(String url, AVHWDeviceType HWDeviceType) in D:\a\videoduplicatefinder\videoduplicatefinder\VDF.Core\FFTools\FFmpegNative\VideoStreamDecoder.cs:line 50
   at VDF.Core.FFTools.FfmpegEngine.GetThumbnail(FfmpegSettings settings, Boolean extendedLogging) in D:\a\videoduplicatefinder\videoduplicatefinder\VDF.Core\FFTools\FfmpegEngine.cs:line 179

And fun fact, I get this error for every single video ! (Most of themare in AV1 format.) I got the error on mp4 files too, so it's not related to AV1.

@yami-no-tusbas yami-no-tusbas added the bug Something isn't working label Jul 10, 2024
@yami-no-tusbas yami-no-tusbas changed the title [Bug]: FFmpeg not woring in path or /bin [Bug]: FFmpeg not working in path or /bin Jul 10, 2024
@0x90d
Copy link
Owner

0x90d commented Jul 10, 2024

If I use the command your app is spawning, it work flawlessly

Your log doesn't show that VDF fails in non-native mode. At least it doesn't show what kind of error it would get. Can you show more information here? Perhaps enable detailed ffmpeg logging in VDF.

I also tried using DXVA2, OpenCL and Vulkan, just in case, it is the same error

FFmpeg's avcodec_get_hw_config function returns null. This is not a bug in VDF. Ffmpeg docs describe this as the following: If the codec does not support any hardware configurations then it will always return NULL.

Running it on the ffmpeg executable might work as fffmpeg executable has thousands of fallbacks. It might get the thumbnail but not hardware accelerated (even if you explicit told ffmpeg to do so).

@yami-no-tusbas
Copy link
Contributor Author

yami-no-tusbas commented Jul 10, 2024

so, ffmpeg in /bin is the binaries and dlls from : "ffmpeg-7.0.1-full_build-shared.7z"
I checked the extended FFTools Logging and there are the logs :
log.txt

I do not know where to have more logs, I can try updating my drivers for nvidia, but geforce should have kept them updated, plus it's a brand new clean install of windows since I changed my cpu and motherboard. And just to be sure, I tried deactivating re-sizeable BAR, it changed nothing too. Without more logs I'm with no clues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants