-
Notifications
You must be signed in to change notification settings - Fork 2k
Add detection for NVENC and use accordingly - Needs testing from NVIDIA users #2259
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
base: develop
Are you sure you want to change the base?
Conversation
@LevaniVashadze Good one, will it throw an error if you do not have an Nvidia card? Looks a bit like PR #2256, maybe we could add a universal check to check the compatibility of different codecs? Since the h264_nvenc codec is much faster when you have an Nvidia card |
Yeah also thought of that, but was too lazy, but does seem like a duplicate. I added a check now, but need someone to test on nvidia hardware, it does return False for me and if it fails it will return false too, so it's pretty fool proof |
Just needs to run this function in a python console and have ffmpeg installed |
@LevaniVashadze is that the most safe and reliable method? I don't think all the users have ffmpeg installed in their PATH. I will soon run that code to see the output when having an Nvidia card |
you... need ffmpeg installed and in path for the bot to run.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the tiny comment, LGTM
This pull request is stale as it has been open for 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days. |
could anyone with a nvidia gpu just run this piece of code in the python console? and see what the function returns, thanks in advance(must have ffmpeg installed) |
Returns false for me |
@LevaniVashadze This code returns that the codec is supported import subprocess
result = subprocess.run(
['ffmpeg', '-loglevel', 'error', '-f', 'lavfi', '-i',
'color=black:s=1080x1080', '-vframes', '1', '-an',
'-c:v', 'hevc_nvenc', '-f', 'null', '-'],
capture_output=True,
text=True
)
# Check if NVENC is working
if result.returncode == 0:
print("✅ NVENC is supported and working!")
else:
print("❌ NVENC failed:", result.stderr) |
Hmm that seems to work then, when I ran it my resultcode was 4294967295 and it HAD a result.stderr(error). So I guess I'll modify it a bit. |
Changed video encoding to standard h264, since the nvenc encoderes relied on nvidia cards and didn't work on my amd machine.