Open tiktoins opened 2 years ago
Not all computers who is going to run this will have a GPU. Add an option for that yourself.
Not all computers who is going to run this will have a GPU. Add an option for that yourself.
Can you help me to add that option? because my gpu is far better than my cpu And love the bot it works great 👍
First you would need to install ffmpeg and add it to your PATH. Afterwards you can get list of all available codes by typing ffmpeg -encoders
. But you most likely want to use h264_nvenc
with Nvidia GPU. When you have decided what codec you want to use you can edit the codec in video.py
:
final.write_videofile(
f"{path}/{file_name}.mp4",
fps=frames,
temp_audiofile=f"{path}/temp-audio.m4a",
remove_temp=True,
codec="h264_nvenc", #edit this
audio_codec="aac",
)
hi offish, please make changes to force video render by gpu instead of cpu waiting for your commit changes :) finest regards