Screentogif: Can STG make full use of the GPU when recording/exporting?

Created on 14 Jan 2019  路  6Comments  路  Source: NickeManarin/ScreenToGif

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!

Most helpful comment

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.

All 6 comments

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.

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!

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.

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.

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?

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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

positr0nic picture positr0nic  路  17Comments

u2shana picture u2shana  路  14Comments

felixfbecker picture felixfbecker  路  27Comments

levid7 picture levid7  路  16Comments

Cornstar23 picture Cornstar23  路  11Comments