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

When no GPUs are found, ffmpeg uses GPU_THREADS variable for CPU #58

Open
jeremysherriff opened this issue Jan 2, 2025 · 2 comments
Open
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jeremysherriff
Copy link
Contributor

When setting up my docker-compose environment, I only changed the THREADS count for CPU knowing that I had no usable GPU (I have an Intel iGPU).

Snippet:

    environment:
      - GPU_THREADS=5
      - CPU_THREADS=3

This configuration spawned 8 ffmpeg processes:
image

Log snippet showing no GPUs being detected and used:

root@mediabox:/volume1/docker/previews# docker compose up -d
[+] Running 1/1
 ✔ Container previews  Started                                                                                                   10.3s
root@mediabox:/volume1/docker/previews# docker compose logs -f
previews  | 2025/01/02 21:53:25 | ℹ️  - GPU Detection (with AMD Support) was recently added
previews  | to this script.
previews  | 2025/01/02 21:53:25 | ℹ️  - Please log issues here
previews  | https://github.com/stevezau/plex_generate_vid_previews/issues
previews  | 2025/01/02 21:53:25 | ⚠️  - Error initializing NVIDIA GPU detection NVML Shared
previews  | Library Not Found. NVIDIA GPUs will not be detected.
previews  | 2025/01/02 21:53:25 | ⚠️  - Error initializing AMD GPU detection: 'ROCM_PATH'.
previews  | AMD GPUs will not be detected.
previews  | 2025/01/02 21:53:25 | ⚠️  - No GPUs detected. Defaulting to CPU ONLY.
previews  | 2025/01/02 21:53:25 | ⚠️  - If you think this is an error please log an issue
previews  | here https://github.com/stevezau/plex_generate_vid_previews/issues
previews  | 2025/01/02 21:53:25 | ℹ️  - Getting the media files from library 'Movies'
previews  | 2025/01/02 21:53:32 | ℹ️  - Got 1813 media files for library Movies

My expectation was that I would see 3 ffmpeg processes only.

@stevezau
Copy link
Owner

stevezau commented Jan 3, 2025

Right now it defaults to falling back to CPU if the GPU is not available.. but you are right prob better to fail.

I'll fix this when i get time.

@stevezau stevezau self-assigned this Jan 3, 2025
@stevezau stevezau added bug Something isn't working documentation Improvements or additions to documentation labels Jan 3, 2025
@jeremysherriff
Copy link
Contributor Author

Ah ok, good to have confirmation that it's working as (currently) intended.

Potentially you could drop one of the variables, if you've got fallback working nicely there may not be a reason to have both?

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

No branches or pull requests

2 participants