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

force video render by gpu instead of cpu #86

Open
tiktoins opened this issue Apr 17, 2022 · 3 comments
Open

force video render by gpu instead of cpu #86

tiktoins opened this issue Apr 17, 2022 · 3 comments
Labels
enhancement New feature or request v1.x Issue is related to v1 of twitchtube

Comments

@tiktoins
Copy link

hi offish,
please make changes to force video render by gpu instead of cpu
waiting for your commit changes :)
finest regards

@offish offish added the enhancement New feature or request label Apr 17, 2022
@offish
Copy link
Owner

offish commented Apr 17, 2022

Not all computers who is going to run this will have a GPU. Add an option for that yourself.

@shubham07x383
Copy link

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 👍

@OwOHamper
Copy link

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",
    )
    ``` 

@offish offish added the v1.x Issue is related to v1 of twitchtube label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.x Issue is related to v1 of twitchtube
Projects
None yet
Development

No branches or pull requests

4 participants