[GH-ISSUE #433] Can STG make full use of the GPU when recording/exporting? #1725

Closed
opened 2026-03-01 18:47:47 +03:00 by kerem · 6 comments
Owner

Originally created by @Nesh108 on GitHub (Jan 14, 2019).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/433

Hello!

I have to start off saying that I absolutely love STG, it's a true life saver: finally a simple way to make GIFs on the go.
Thanks!

Here is my question: I have a computer with a GTX 1070 and I notice that when exporting, even not too long GIFs, the operation takes quite a bit of time.
I am using the 2.0 Encoder, the default setting.

I was wondering, would there be a way to make full use of my GPU when exporting the GIF?

Thanks in advance!

Originally created by @Nesh108 on GitHub (Jan 14, 2019). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/433 Hello! I have to start off saying that I absolutely love STG, it's a true life saver: finally a simple way to make GIFs on the go. Thanks! Here is my question: I have a computer with a GTX 1070 and I notice that when exporting, even not too long GIFs, the operation takes quite a bit of time. I am using the 2.0 Encoder, the default setting. I was wondering, would there be a way to make full use of my GPU when exporting the GIF? Thanks in advance!
kerem closed this issue 2026-03-01 18:47:48 +03:00
Author
Owner

@vatterspun commented on GitHub (Jan 15, 2019):

I thought I responded to this already but I guess the post got lost in the mail.

Anyway, I'll summarize what I said before and say that GPU is probably not a huge boost for encoding GIFs. There might be some FFMPEG tweaks that can grab extra speed from multi-threading, 64-bit, or even the GPU, but most encoding operations just use the processor. Notably, Photoshop professionals (unless something changed in the last few years) are not encouraged to buy anything but a basic graphics card when building a machine. The operations that most 2D graphics tools use aren't the same as 3D graphics.

<!-- gh-comment-id:454407396 --> @vatterspun commented on GitHub (Jan 15, 2019): I thought I responded to this already but I guess the post got lost in the mail. Anyway, I'll summarize what I said before and say that GPU is probably not a huge boost for encoding GIFs. There might be some FFMPEG tweaks that can grab extra speed from multi-threading, 64-bit, or even the GPU, but most encoding operations just use the processor. Notably, Photoshop professionals (unless something changed in the last few years) are not encouraged to buy anything but a basic graphics card when building a machine. The operations that most 2D graphics tools use aren't the same as 3D graphics.
Author
Owner

@Nesh108 commented on GitHub (Jan 26, 2019):

Thanks for taking the time to respond!
Yeah, I saw that FFMPEG can make use of the GPU, I might look into it later on. For now, I am not doing anything too heavy :)

Thanks and keep it up!

<!-- gh-comment-id:457844790 --> @Nesh108 commented on GitHub (Jan 26, 2019): Thanks for taking the time to respond! Yeah, I saw that FFMPEG can make use of the GPU, I might look into it later on. For now, I am not doing anything too heavy :) Thanks and keep it up!
Author
Owner

@vatterspun commented on GitHub (Jan 28, 2019):

I saw that FFMPEG can make use of the GPU

Yeah I should have guessed. Well, if FFMPEG eventually overtakes other tools in terms of encoding speed due to all the optimizations built in, it might make sense to use that by default.

<!-- gh-comment-id:457984933 --> @vatterspun commented on GitHub (Jan 28, 2019): > I saw that FFMPEG can make use of the GPU Yeah I should have guessed. Well, if FFMPEG eventually overtakes other tools in terms of encoding speed due to all the optimizations built in, it might make sense to use that by default.
Author
Owner

@rkantos commented on GitHub (Jan 31, 2019):

With FFMPEG you cannot get hardware accelerated GIF-creation though, since GPU encoders are designed for video encoding, or (M)JPEG encoding.

Here are some good stuff (commands) and how to use them when using hardware acceleration with FFMPEG (Nvenc & QSV): https://gist.github.com/Brainiarc7/7b6049aac3145927ae1cfeafc8f682c1

In my (I think it is a build by Zeranoe) FFMPEG I have the following codecs supported:

$ffmpeg -codecs | grep nvenc
DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_qsv nvenc nvenc_h264 )                 
DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_qsv )
$ffmpeg -codecs | grep qsv
DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_qsv nvenc nvenc_h264 )                 
DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_qsv )                                
DEV.L. mpeg2video           MPEG-2 video (decoders: mpeg2video mpegvideo mpeg2_qsv mpeg2_cuvid ) (encoders: mpeg2video mpeg2_qsv )                                                               
D.V.L. vc1                  SMPTE VC-1 (decoders: vc1 vc1_qsv vc1_cuvid )                                                                                                                        
DEV.L. vp8                  On2 VP8 (decoders: vp8 libvpx vp8_cuvid vp8_qsv ) (encoders: libvpx )

They are meant for video streaming, but if you change them very slightly, they should work with STG.

<!-- gh-comment-id:459500634 --> @rkantos commented on GitHub (Jan 31, 2019): With FFMPEG you cannot get hardware accelerated GIF-creation though, since GPU encoders are designed for video encoding, or (M)JPEG encoding. Here are some good stuff (commands) and how to use them when using hardware acceleration with FFMPEG (Nvenc & QSV): https://gist.github.com/Brainiarc7/7b6049aac3145927ae1cfeafc8f682c1 In my (I think it is a build by Zeranoe) FFMPEG I have the following codecs supported: ``` $ffmpeg -codecs | grep nvenc DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_qsv nvenc nvenc_h264 ) DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_qsv ) ``` ``` $ffmpeg -codecs | grep qsv DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_qsv nvenc nvenc_h264 ) DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_qsv ) DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo mpeg2_qsv mpeg2_cuvid ) (encoders: mpeg2video mpeg2_qsv ) D.V.L. vc1 SMPTE VC-1 (decoders: vc1 vc1_qsv vc1_cuvid ) DEV.L. vp8 On2 VP8 (decoders: vp8 libvpx vp8_cuvid vp8_qsv ) (encoders: libvpx ) ``` They are meant for video streaming, but if you change them very slightly, they should work with STG.
Author
Owner

@vatterspun commented on GitHub (Feb 3, 2019):

Does anyone have any idea what kind of boost comes from using the GPU for encoding? Does it matter if you have a basic vs. excellent graphics card?

<!-- gh-comment-id:460021181 --> @vatterspun commented on GitHub (Feb 3, 2019): Does anyone have any idea what kind of boost comes from using the GPU for encoding? Does it matter if you have a basic vs. excellent graphics card?
Author
Owner

@NickeManarin commented on GitHub (Nov 13, 2019):

Well, I'm already using parallel processing when analyzing the frames.

Btw, with the next version, v2.20, there will be available a new capture method (DirectX).

<!-- gh-comment-id:553419676 --> @NickeManarin commented on GitHub (Nov 13, 2019): Well, I'm already using parallel processing when analyzing the frames. Btw, with the next version, v2.20, there will be available a new capture method (DirectX).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1725
No description provided.