Menu

GPU Decoding

dalben
2019-08-24
2025-01-22
  • dalben

    dalben - 2019-08-24

    You have a dropdown for GPU Decoding (you seem to have QSV twice), but no matter what I select it doesn't seem to use it. I know my machine can handle QSV and other Intel GPU methods.

    I then tried creating a setting that used QSV, but it souldn't let me save it saying the preset was incorrect or empty.

    Can ffmpeg batch support GPU Decoding, and if so, how can I get it going?

     
  • Abel

    Abel - 2019-09-16

    Hi, the dropdown just adds -hwaccel prior to input file. If that's not working, I would try testing it on the command line and see the results.

     
  • Petrus Vermaak

    Petrus Vermaak - 2023-02-13

    @eibol I have the same problem, the latest version of ffmpeg bach is installed, I have a AMD Ryzon 5600x with Nvidia 1070 installed, but no GPU decode options, it just says none. When using Handbrake it uses the GPU. Really need the extra power to convert large mp4's. Any suggestions how to make it work please?

     
  • Abel

    Abel - 2023-02-13

    Hi, have you tried pressing the refresh button on the right of the decode list?

     

    Last edit: Abel 2023-02-13
  • Petrus Vermaak

    Petrus Vermaak - 2023-02-13

    Awesome, I now have this:
    https://prnt.sc/lrMT5dTPIo57

    I tried them all but none of them really used the GPU above 2% to 3%. Any suggestions?

     
  • Tampurio

    Tampurio - 2023-03-07

    I have the same problem. FFmpeg Batch AV Converter is really wonderful but it doesn't seem to support hardware decoding (I have Nvdia GTX 1650 Super). If you could use these parameters: "-hwaccel cuvid" transcoding would go 6-7 times faster.

     
  • Abel

    Abel - 2023-03-07

    You can add those parameters at pre-input field, and check the result.

     
  • Tampurio

    Tampurio - 2023-03-07

    I tried. The speed does not change. 1.6x versus 7.5x from the command line.

    ffmpeg.exe -hwaccel cuvid -i 01.mkv -map 0 -c:v hevc_nvenc -c:s copy -x265-params lossless=1 -c:a copy output.mkv

    Am I doing something wrong with your program?

     
  • Abel

    Abel - 2023-03-07

    This is weird. I don't think you are doing anything wrong.

    The pre-input decoding is not really that important thing. It is -c:v hevc_nvenc
    should be already using GPU encoding, and it seems to be doing so, but slower.

    Are you using sequential or multi-file encoding? Are you using the "Try in console" button to test command line?

    I'll try to reproduce the issue as soon as possible.

     
  • Tampurio

    Tampurio - 2023-03-07

    I tried using the "Try in console" button to test command line. In the pre-input I put "-hwaccel_output_format cuda" which is more correct. The console opens and starts encoding without any errors but the speed is about 1.6x.

    Sequential encoding

     
  • Abel

    Abel - 2023-03-07

    Looks like your external ffmpeg.exe version and the one included in the application (5.1 Essential)
    are not the same.

    With which version did you achieve 7x speed? You could just replace FFBatch ffmpeg.exe version with that one (is it a more recent version?).

    You can click on the botton below the FFmpeg Batch logo to replace ffmpeg.exe with your preferred version.

     
  • Tampurio

    Tampurio - 2023-03-08

    You are right, I have version 5.1.2
    I will try to test as soon as possible

     
  • Petrus Vermaak

    Petrus Vermaak - 2023-03-13

    @Tampurio can you let me know how you managed to get 7,5 times speed from the command line? What version of ffmpeg did you use?

    This is the cmd right? (ffmpeg.exe -hwaccel cuvid -i 01.mkv -map 0 -c:v hevc_nvenc -c:s copy -x265-params lossless=1 -c:a copy output.mkv)

    I have massive amount of videos to convert so I really need to use my gpu as well.

     
    • Abel

      Abel - 2023-03-13

      I would try with the latest git version, pretty stable. Just download and decompress.
      https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z
      At bin folder it is available ffmpeg.exe

      Then replace ffmpeg.exe at FFmpeg Batch AV Converter with that file.
      (Use button below the top banner).

      You'll need 7zip application to decompress it.
      https://7-zip.org/download.html

      I hope that helps.

       
      • Tampurio

        Tampurio - 2023-03-13

        Great! Now the coding works very fast! 17,1x Speed

         
      • Petrus Vermaak

        Petrus Vermaak - 2023-03-13

        @eibol @tampurio I cannot get it working. The settings I tried looks like a 1 to 1 copy. Can you please give me the cmd to use inside ffbatch?

        This is my cmd in ffbatch batch converter:

        -c:v libx265 -preset slow -crf 27 -c:a libopus -b:a 16k -vbr on -compression_level 10 -ac 1 -strict -2
        

        It creates great video and audio and it's super small, but it runs at 1.6

        I'm ok if the cmd needs to change as long as the result is more or less the same (small size and great quality).

        Anny help would be greatly appreciated!

         

        Last edit: Petrus Vermaak 2023-03-14
  • Tampurio

    Tampurio - 2023-03-28

    I tried converting some AV1 files to H265. If I try from command line the speed is 7x. If I use the same settings in Av Converter 2.8.6, the speed is 1.7x

    The command line I use is this:

    ffmpeg.exe -i 01.mkv -map 0 -c:v hevc_nvenc -c:s copy -x265-params lossless=1 -c:a copy output.mkv

     
  • forart.eu

    forart.eu - 2024-07-20

    Hi there, sorry to revive this quite-old discussion: I recently tested FFMPEG encoding on a friend's MSI Stealth GS77 - 12U laptop but, even if activated, it uses just one of all available GPUs for both decoding and encoding.

    The question is: is it possible, on a multi-GPU system, to use one for decoding and another for encoding?
    For example: can I assign one to decode (Intel) and another (Nvidia) to encode or vice-versa ?
    Or, can I free-up the CPU workload by use hardware to accelerate decoding only ?

    Thanks in advance !

     

    Last edit: forart.eu 2024-07-20
  • Abel

    Abel - 2024-07-20

    Hi, I would try vpaapi, qsv or auto as a decoder, (you may need to refresh decoders list),
    It is the same as adding as pre-input parameter:

    -hwaccel vaapi / qsv / auto

    Then you can set hevc_nvenc or h264_nvenc in parameters for encoding.

    Performance should vary if decoding is actually being performed by intel gpu, however, depending on the input format, hardware decoding may not be available.

    Also, intel gpu decoding with nvidia encoding would not save much if finally decoding is performed by intel cpu.

    Let's see the results.

     
  • Jim Slim

    Jim Slim - 2025-01-22

    Just to add, that on my system (5950x / 3070) GPU decoding only adds about 2fps (to bring total to 202fps).

    Obviously your encoding fps will depend on many things, your CPU, perhaps your GPU if you are using that as the encoder, and then the actuall FFmpeg settings, like 'preset slow' which I use to get better quality/smaller filesize.

    You can of course use ' preset veryfast' which will run much faster, give a very smilar filesize, but with a slight reduction in visual quality . Also, the higher the CRF value, the faster the encode, but poorer the quality.

    Even with 'preset ultrafast' 'crf24' I only get 'x 11.7' speed on this 5950x, recoding a x264 source file.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.