Skip to content

Set hwaccel to cuda#5

Closed
utkustnr wants to merge 1 commit intoEposVox:masterfrom
utkustnr:utkuustuner-patch-1
Closed

Set hwaccel to cuda#5
utkustnr wants to merge 1 commit intoEposVox:masterfrom
utkustnr:utkuustuner-patch-1

Conversation

@utkustnr
Copy link

You can just change auto to cuda and -pix_fmt will still be usable. However it won't give the same effect. -hwaccel_output_format cuda is required from what I read and that can't be used with -pix_fmt. Maybe they can be used together but I couldn't figure it out. As for the -bf 0, I was getting "No decoder surfaces left" error when encoding starts. Some reddit thread said setting b-frames to 0 instead of default -1 (auto) OR using -extra_hw_frames 2 (keep increasing 2 until error goes away) fixes it so I chose b-frame one. After doing these changes my speed went from 1.5-2x to 7.5-8x and gpu usage increased dramatically compared to original batch. Also used #4 to fix naming.

You can just change auto to cuda and "-pix_fmt" will still be usable. However it won't give the same effect. "-hwaccel_output_format cuda" is required from what I read and that can't be used with "-pix_fmt". Maybe they can be used together but I couldn't figure it out. As for the "-bf 0", I was getting "No decoder surfaces left" error when encoding starts. Some reddit thread said setting b-frames to 0 instead of default -1 (auto) OR using "-extra_hw_frames 2" (keep increasing 2 until error goes away) fixes it so I chose b-frame one. After doing these changes my speed went from 1.5-2x to 7.5-8x and gpu usage increased dramatically compared to original batch. Also used #4 to fix naming.
@utkustnr utkustnr closed this Jan 31, 2022
@utkustnr utkustnr deleted the utkuustuner-patch-1 branch January 31, 2022 06:26
@utkustnr utkustnr restored the utkuustuner-patch-1 branch January 31, 2022 13:06
@utkustnr
Copy link
Author

utkustnr commented Jan 31, 2022

I didn't mean to close this pr. Apparently I don't know how to use github. Anyway, if someone wants to speed up their process feel free to do these changes.

Update: Just found out that increase in speed comes with increased file size. I still think it's an improvement nonetheless. I processed the same folder with and without cuda and they had 9 gb difference (both was around 1/3-1/4 of original size just to be clear). That being said that 9 gb costed just as much hours to process. Anyone who wants to use this version should keep this in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant