Can't use h264_nvenc codec, FFMPEG returns an error #1841
Replies: 6 comments
-
I wonder, if you change There is no way to change it through config as it is hardcoded. But if you confirm it resolved the issue we may think about a permanent solution |
Beta Was this translation helpful? Give feedback.
-
Also, full log with |
Beta Was this translation helpful? Give feedback.
-
Let me link to what I've been hacking on the past day or so. My apologies for any formatting issue that are in my changes or anything else that could stem from my general ignorance of the codebase. I added to the USER_CODEC enum so I could keep my experiments limited to the nvenc use case. I changed a set of if-else statements to a switch case because I've been trying to get the cq option working well since the cbr option isn't supported with the h.264 NVENC encoder. I just find this a little easier in keeping my tinkering isolated from the rest of the logic. Feel free to use those to help devise a proper fix. |
Beta Was this translation helpful? Give feedback.
-
And here is the log snippet I captured when I started trying to figure out what was going on. Again, I'm using the MotionEye front end and I set the logging level to debug in motioneye.conf
|
Beta Was this translation helpful? Give feedback.
-
After letting things run overnight, it looks like I have some more tweaking to do in the quality department. The codec is really noisy and it's caused some false positive motion events to be triggered. I need to tinker more to find optimal settings because my eventual goal is to make sure I can run multiple camera and still have enough CPU left over to handle the other small tasks I have the system doing. If any experts on nvenc see this and can recommend settings, I'm all ears :) |
Beta Was this translation helpful? Give feedback.
-
I'm closing this. After a bit more fiddling and fixing the quality calculation, I have a set of options that's working pretty well in my use case (thought the camera I'm using isn't incredibly high resolution). I'm going to clean up what I have then post it as a suggestion when I file the issue for the maintainers to look at. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running Motion via MotionEye and trying to select the h.264 nvenc option.
I'm using ffmpeg version 6.1.1-3ubuntu5.
It looks like Motion in trying to set a preset named ultrafast (it looks like that gets set here). But ffmpeg doesn't support that as reported by running the command ffmpeg -h encoder=h264_nvenc
I'm new to dealing directly with Motion and I'm trying to skim the code and docs but I don't see an obvious way to override adding the ultrafast preset to the list of options passed to ffmpeg. Is there a way to override this via a config file or in the data MotionEye is passing to motion? Or is this hard coded and the only work around to build a custom version of Motion?
Beta Was this translation helpful? Give feedback.
All reactions