VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Hi,
    i'm trying to test ffmpeg hw acceleration with my GTX 1050 Ti. I've dowloaded the "git full" from https://www.gyan.dev/ffmpeg/builds/ but when I run
    Code:
    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
    i get this error:

    Code:
    [h264 @ 000001acbd16e640] No decoder surfaces left00:00.00 bitrate=N/A speed=   0x
    [h264 @ 000001acbc6acc00] No decoder surfaces left
    [h264 @ 000001acbc6ae3c0] No decoder surfaces left
    [h264 @ 000001acbc672200] No decoder surfaces left
    Error while decoding stream #0:0: Invalid data found when processing input
    [h264 @ 000001acbccae540] No decoder surfaces left
    Error while decoding stream #0:0: Invalid data found when processing input
    [h264 @ 000001acbd16e640] No decoder surfaces left
    [h264 @ 000001acbc6acc00] No decoder surfaces left
    Error while decoding stream #0:0: Invalid data found when processing input
        Last message repeated 1 times
    Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
    Error reinitializing filters!
    Failed to inject frame into filter network: Function not implemented
    Error while processing the decoded data for stream #0:0
    Conversion failed!
    I don't know why. I have already tried to put -vf and hwupload_cuda, hwdownload and all the workaround that I have found on the internet.
    Any advice?
    Should I compile the library following the nVidia guide for hw acceleration (https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/)?

    Thanks in advance to anyone who will help me
    Quote Quote  
  2. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Well, I use a large .bat file which has versions of this commandline with various calculated bitrates etc, so here's an example of one that works:
    Code:
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -hide_banner -v verbose -nostats ^
    -f vapoursynth -i "D:\VRDTVSP-SCRATCH\some_input_file.QSF.vpy" ^
    -probesize 200M -analyzeduration 200M  ^
    -i "D:\VRDTVSP-SCRATCH\some_input_file.QSF.mp4" -map 0:v:0 -map 1:a:0 ^
    -vf "setdar=16/9" -vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp ^
    -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 ^
    -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 ^
    -rc:v vbr -cq:v 24 -qmin 16 -qmax 48 ^
    -b:v 3163432 -minrate:v 602558 -maxrate:v 6326864 -bufsize 6326864 ^
    -profile:v high -level 5.2 ^
    -movflags +faststart+write_colr  ^
    -c:a libfdk_aac -cutoff 20000 -ab 256k -ar 48000  ^
    -y "T:\HDTV\VRDTVSP-Converted\some_input_file.mp4"
    Notes:
    - it uses a Vapoursynth script as video input and a (VideoRedo QuickStreamFixed) file for audio input, converting the video with nvenc and the audio with fdk-aac
    - it definitely works on a 2060 Super ... the 1050Ti can't handle all the same nvenc parameters so it's commandline does not have
    -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0
    which then definitely works on the 1050Ti that I have

    Dunno anything about https://www.gyan.dev/ffmpeg/builds/ (not sure it's legal nor if it's kosher, I assume it is OK) as I cross-compile my own ffmpeg using a version of rdp's build script https://github.com/rdp/ffmpeg-windows-build-helpers or MABS build script https://github.com/m-ab-s/media-autobuild_suite
    edit: https://www.gyan.dev/ffmpeg/builds/ is referred to by https://ffmpeg.org/download.html#build-windows wow I didn't know it existed.

    if you want an example of something which used filters, including an OpenCL filter, this has been used in the past:
    Code:
    -filter_complex "[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
    Last edited by hydra3333; 4th Aug 2021 at 07:44. Reason: add example
    Quote Quote  
  3. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    you could also consider https://github.com/rigaya/NVEnc
    Quote Quote  
  4. Originally Posted by hydra3333 View Post
    Well, I use a large .bat file which has versions of this commandline with various calculated bitrates etc, so here's an example of one that works:
    Code:
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -hide_banner -v verbose -nostats ^
    -f vapoursynth -i "D:\VRDTVSP-SCRATCH\some_input_file.QSF.vpy" ^
    -probesize 200M -analyzeduration 200M  ^
    -i "D:\VRDTVSP-SCRATCH\some_input_file.QSF.mp4" -map 0:v:0 -map 1:a:0 ^
    -vf "setdar=16/9" -vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp ^
    -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 ^
    -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 ^
    -rc:v vbr -cq:v 24 -qmin 16 -qmax 48 ^
    -b:v 3163432 -minrate:v 602558 -maxrate:v 6326864 -bufsize 6326864 ^
    -profile:v high -level 5.2 ^
    -movflags +faststart+write_colr  ^
    -c:a libfdk_aac -cutoff 20000 -ab 256k -ar 48000  ^
    -y "T:\HDTV\VRDTVSP-Converted\some_input_file.mp4"
    Notes:
    - it uses a Vapoursynth script as video input and a (VideoRedo QuickStreamFixed) file for audio input, converting the video with nvenc and the audio with fdk-aac
    - it definitely works on a 2060 Super ... the 1050Ti can't handle all the same nvenc parameters so it's commandline does not have
    -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0
    which then definitely works on the 1050Ti that I have

    Dunno anything about https://www.gyan.dev/ffmpeg/builds/ (not sure it's legal nor if it's kosher, I assume it is OK) as I cross-compile my own ffmpeg using a version of rdp's build script https://github.com/rdp/ffmpeg-windows-build-helpers or MABS build script https://github.com/m-ab-s/media-autobuild_suite

    if you want an example of something which used filters, including an OpenCL filter, this has been used in the past:
    Code:
    -filter_complex "[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"

    Thanks a lot hydra3333, you saved me. I used the second tool that you suggest to me and now everything is working!
    Quote Quote  
  5. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Glad you're up and going.
    Have fun !
    Quote Quote  
  6. I'm interested in more comments on this issue.

    I have a two PCs with Intel processors and which have QSV: one of them also has an Nvidia card that supports hardware encoding.

    The initial command given:

    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4

    also does not work on the PC which has the Nvidia card.

    However, I've found that this:

    ffmpeg -y -vsync 0 -hwaccel dxva2 -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4

    does work: dxva2 being a sort of 'generic' name for the graphics accelerator.

    The GPU page of Task Manager shows that the Nvidia card is indeed being used for both decoding and encoding.

    Why is a mystery to me. I've tried asking questions about Nvidia hardware acceleration in a varity of forms, including Nvidia's own,
    and have never gotten any sort of usable answer.

    I have also found that this will work:

    ffmpeg -y -vsync 0 -hwaccel dxva2 -i input.mp4 -c:a copy -c:v h264_nvenc -gp 30 output.mp4

    I have never found the -hwaccel_output_format cuda to be necessary or helpful. Just specifying the Nvidia enchanced codec is sufficient.

    I have also found that specifying the quality factor (using -crf or -g:v or -gp, depending on the codec) yields better results than specifying a bitrate.
    You might be surprised at how much more compression you can get without sacrificing quality by specifying quality.

    What we all really need now is someone who can tell us how to really use the Nvidia GPU enhanced filters. The examples given by Nvidia on their web pages don't work, and nobody there seems to care.
    Quote Quote  
  7. You need to compile ffmpeg for using hardware acceleration. Unfortunately there is no hw-accelerated build available.
    Last edited by joearmstrong; 3rd Aug 2021 at 04:03.
    Quote Quote  
  8. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    @BartZLederman In regard to quality settings, I think you may find it's perhaps more driven by the nvidia nvenc settings eg
    Code:
    -preset p7 -multipass fullres
    Please maybe see p.18 onward of this:
    http://developer.download.nvidia.com/video/gputechconf/gtc/2020/presentations/s21337-n...l-flow-sdk.pdf

    Originally Posted by joearmstrong View Post
    You need to compile ffmpeg for using hardware acceleration. Unfortunately there is no hw-accelerated build available.
    Agreed.
    Post #2 does suggest something like MABS to build it one's self with that stuff baked in.
    edit: https://www.gyan.dev/ffmpeg/builds/ is referred to by https://ffmpeg.org/download.html#build-windows wow I didn't know it existed. This https://www.gyan.dev/ffmpeg/builds/ says it has nvenc/nvdec built in.
    Last edited by hydra3333; 4th Aug 2021 at 07:45. Reason: add reference to building
    Quote Quote  
  9. I don't understand the comment that was made previously "You need to compile ffmpeg for using hardware acceleration. Unfortunately there is no hw-accelerated build available."

    All of the versions of ffmpeg I have used are the pre-built ones, and they have QSV and CUDA already compiled in, at least for the Windows releases. For me it has been 'plug and play' for both QSV and CUDA. I don't have a system with an AMD card that supports hardware acceleration.

    But this does bring up two potential problems you can run into.

    The first is that you need a CPU that supports QSV (older Intel processors do not), or a Graphics Card that supports hardware acceleration: and MOST older AMD and Nvidia cards do not. I'm not even sure that all of the current cards do, you need to check the manufacturer's web site to find out.

    Then comes the bigger problem: you also need to install additional software to make QSV or Cuda work. If you're using the newest version of your particular operating system this shouldn't be a problem. If you have an older system (such as still using Windows 7), getting the right vendor software can be a big problem.

    Intel has a "scorched earth" approach to CPU support. When Intel stops manufacturing a particular version of a CPU they hunt down and destroy all of the software kits that support that CPU. (I'm not exaggerating, look it up yourselves on the Intel web site if you don't believe me). So if you didn't install the QSV support software when the CPU / System was new it can be a battle to go back and enable it.

    Nvidia is a little better, but you still need to install the support kit before ffmpeg can actually connect to the graphics card.

    So for me, getting the right version of ffmpeg is trivial: the latest builds that I can find on the normal download pages (at least for Windows) already have all of the hardware support built-in. I've never had to build my own version of ffmpeg. It's the graphics card vendor's software that you need to find and install that is the challenge.
    Quote Quote  
  10. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by BartZLederman View Post
    All of the versions of ffmpeg I have used are the pre-built ones, and they have QSV and CUDA already compiled in, at least for the Windows releases. For me it has been 'plug and play' for both QSV and CUDA.
    I do not know where you get your builds.
    Technically, there may be legal issues in distribution of the ffmpeg.exe depending what is baked into the build.
    Who knows what's in the .exe you use

    Originally Posted by BartZLederman View Post
    The first is that you need a CPU that supports QSV (older Intel processors do not), or a Graphics Card that supports hardware acceleration: and MOST older AMD and Nvidia cards do not. I'm not even sure that all of the current cards do, you need to check the manufacturer's web site to find out.
    Well, sort of, I guess.
    Newer nvidia cards tend to have less inbuilt (hardware) encode constraints than older ones.
    For nvidia, refer to this to see what card does what for NVEnc encode and NVDec decode https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new

    Originally Posted by BartZLederman View Post
    Then comes the bigger problem: you also need to install additional software to make QSV or Cuda work. If you're using the newest version of your particular operating system this shouldn't be a problem. If you have an older system (such as still using Windows 7), getting the right vendor software can be a big problem.
    Um, not quite the whole story at least for nvidia
    In principle, for NVIDIA, just install the recommended (latest) nvidia driver you can download from the nvidia website (not any other site) for your model of nvidia video card. That's all I do and OpenCL and NVENC/NVDEC (not the range of "cuda" "filters" which does indeed require extra installation stuff) work fine out of the box, if you have built ffmpeg with the right nv headers, which perhaps is only what "many" people may need.
    If one needs fancy stuff, perhaps consider avisynth and/or vapoursynth which ffmpeg can have support baked in for during the build process.

    Originally Posted by BartZLederman View Post
    Nvidia is a little better, but you still need to install the support kit before ffmpeg can actually connect to the graphics card.
    Um that is not my experience, from an nvidia 1050Ti onward (see above) ... install the latest driver for your nvidia card and vanilla nvdec/nvenc stuff works "out of the box" if you have built ffmpeg with the right nv headers.
    If you mean something else, feel very free to clarify.

    Originally Posted by BartZLederman View Post
    So for me, getting the right version of ffmpeg is trivial: the latest builds that I can find on the normal download pages (at least for Windows) already have all of the hardware support built-in. I've never had to build my own version of ffmpeg.
    Um that is not my experience at all ! ... at least for comparatively "safe" (i.e. no trojans,viruses,worms,day-0-exploits et al) and "legal" ffmpeg.exe files ... not sure what "normal download pages" means for those.
    edit: I guess you could mean these https://ffmpeg.org/download.html#build-windows ... I don't know what's in them build-wise though. This https://www.gyan.dev/ffmpeg/builds/ says it has nvenc/nvdec built in.

    Originally Posted by BartZLederman View Post
    It's the graphics card vendor's software that you need to find and install that is the challenge.
    Please refer above, the right "latest" nvidia drivers can easily be located and downloaded directly from the actual nvidia website, just pop this link https://www.nvidia.com/Download/index.aspx?lang=en-us on your desktop and check that site every few weeks for a newer version ... with that, vanilla nvdec/nvenc stuff works "out of the box" if you have built ffmpeg with the right nv headers.
    If you mean the fancy, ahem "filtery type stuff", like https://developer.nvidia.com/cudnn (that's a bad example, but you get the drift) yes that's extra.

    I suppose it's worth mentioning a possibility that newer nvidia drivers may from time to time (depending what stuff bundled in with the driver has changed) require an updated ffmpeg build. Possibly vice versa as well, I'm not 100% sure on that.


    PS ffmpeg built with the NV headers means that the modern nvidia nvenc encode parameters become available on the ffmpeg commandline eg
    Code:
    -preset p7 -multipass fullres
    Please maybe see p.18 onward of this:
    http://developer.download.nvidia.com/video/gputechconf/gtc/2020/presentations/s21337-n...l-flow-sdk.pdf
    Last edited by hydra3333; 4th Aug 2021 at 08:21.
    Quote Quote  
  11. Where I get my ffmpeg executables is to go to the ffmpeg.org download page:

    https://ffmpeg.org/download.html

    and follow their links to the Windows pre-built executables. If that isn't reliable then we're all in trouble because I don't know of any more authoritative site for ffmpeg then ffmpeg.org . They also have links for MacOS and Linux.

    As for what's in my version of ffmpeg:

    ffmpeg -hide_banner -version
    ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
    built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
    configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml
    2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enab
    le-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --ena
    ble-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-lib
    zimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang -
    -enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine -
    -enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libv
    orbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
    libavutil 56. 70.100 / 56. 70.100
    libavcodec 58.134.100 / 58.134.100
    libavformat 58. 76.100 / 58. 76.100
    libavdevice 58. 13.100 / 58. 13.100
    libavfilter 7.110.100 / 7.110.100
    libswscale 5. 9.100 / 5. 9.100
    libswresample 3. 9.100 / 3. 9.100
    libpostproc 55. 9.100 / 55. 9.100

    So it says it has cuda, nvenc, vulkan, avisynth, amf, etc. I don't see "QSV" but I know this version has it as I regularly use QSV hardware acceleration and QSV enabled filters.

    The Intel support pages say you have to have their extra software packages to access the video acceleration on their QSV web pages. I know from experience that you will not have access to QSV without it. Other programs, such as GPU-Z will not show OpenCL as being accessible without the extra software.

    What I read on the Nvidia web site, such as https://developer.nvidia.com/cuda-zone and https://developer.nvidia.com/gpu-accelerated-libraries say you have to have extra software. My personal experience with an HP PC and an Nvidia video card was that the driver was sufficient to have the card display properly, but to access hardware acceleration using programs like HandBrake and ffmpeg you had to have the Nvidia Control Panel or Power Center or SDK or some other package before you can actually access the hardware video encoding acceleration. HandBrake will detect if you have the necessary hardware for accelerated encoding (AMD, Intel, or Nvidia), but unless you have the entire package installed (not just the driver) it won't actually be able to use the hardware. I have seen this for both QSV and Cuda.

    If you have a link that says how to use QSV with just the Intel driver and you don't have to install any of the support packages, I beg you to post it here. You will be making QSV available to a very large number of PC owners who have Intel graphics and no way to get the extra package. I have system where I can test this.

    The same thing goes for Nvidia. If you have an actually tested and verified method to get HandBrake and ffmpeg to use hardware encoding on an Nvidia graphics board (which has the encoders) using just the driver, especially on a Windows 7 system, please do also post it here and prove me wrong. Again, you would be doing everyone a service by telling us exactly how to do it: the information that Nvidia supplies is only for developers and not just for general users (again, unless you have found a much better web page at the Nvidia web site than any I can see).

    And if you can find a web page anywhere on the Nvidia web site, including their forum, which has ffmpeg examples that actually work with their features like -deinterlace, I urge you to share that with us as well. I've done a cut-and-paste of every Nvidia example I can find, and none of them actually work. They all result in errors.
    Quote Quote  
  12. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by BartZLederman View Post
    If that isn't reliable then we're all in trouble because I don't know of any more authoritative site for ffmpeg then ffmpeg.org . They also have links for MacOS and Linux.
    True. The sites that web page links to are 3rd parties though and ffmpeg.org is not responsible for them ? They should be OK one supposes.

    Originally Posted by BartZLederman View Post
    Other programs, such as GPU-Z will not show OpenCL as being accessible without the extra software.
    Yes I had that with Intel.
    Nvidia has OpenCL available out of the box, if ffmpeg is built with it and the normal nvidia driver is installed.

    Originally Posted by BartZLederman View Post
    My personal experience with an HP PC and an Nvidia video card was that the driver was sufficient to have the card display properly, but to access hardware acceleration using programs like HandBrake and ffmpeg you had to have the Nvidia Control Panel or Power Center or SDK or some other package before you can actually access the hardware video encoding acceleration. HandBrake will detect if you have the necessary hardware for accelerated encoding (AMD, Intel, or Nvidia), but unless you have the entire package installed (not just the driver) it won't actually be able to use the hardware. I have seen this for both QSV and Cuda.
    No. That is definitely 100% incorrect.
    I guarantee you that this is not the case when just using ffmpeg or for example the nvencc tool.
    Hardware nvidia nvenc encoding works 100% guaranteed out of the box with nothing further installed.
    I have been building ffmpeg for years and running ffmpeg nvenc encodes daily on multiple PCs with nvidia cards. All that is needed is the right modern driver installed and ffmpeg built right. edit: and a modern operating system where one supposes that enables modern drivers to be installed/used.
    I do not know what the dependencies for handbrake are, one supposes their website has something to say.

    Originally Posted by BartZLederman View Post
    If you have a link that says how to use QSV with just the Intel driver and you don't have to install any of the support packages, I beg you to post it here. You will be making QSV available to a very large number of PC owners who have Intel graphics and no way to get the extra package. I have system where I can test this.
    Someone else may know and could respond, I do not use QSV so I do not know about that. I use ffmpeg with nvdec/nvenc every day (nvdec and purevideo deinterlacing via vapoursynth and Donald Graft's beaut tools).

    Originally Posted by BartZLederman View Post
    If you have an actually tested and verified method to get HandBrake and ffmpeg to use hardware encoding on an Nvidia graphics board (which has the encoders) using just the driver, especially on a Windows 7 system, please do also post it here and prove me wrong. Again, you would be doing everyone a service by telling us exactly how to do it: the information that Nvidia supplies is only for developers and not just for general users (again, unless you have found a much better web page at the Nvidia web site than any I can see).
    More than tested it Win7 makes no difference ... ah, hang on, you may find the nvidia drivers for Win7 (an obsolete operating system, by a few versions too !) likely receives no updates with the latest technology ... maybe that's your actual issue ? You can't realistically expect for-profit companies to provide costly driver updates for well-obsolete operating systems. None of the motherboard manufacturers do that for obsolete motherboards after a couple of years. Perhaps a sailing ship can't make use of the propeller (IDK, maybe you could check the nvidia site if you liked, maybe the release notes for the nvidia driver which usually tell or at least hint at what is in it and what's changed, eg OpenCL version for one) ? There's a better than even chance I'm not right about Win7, but I do know what works for me with Win10x64.

    edit: https://www.theverge.com/2021/6/12/22530738/nvidia-windows-7-windows-8-driver-support-...d-october-2021
    Nvidia to drop Windows 7 and Windows 8 driver support in October.
    Nvidia is going Windows 10 exclusive later this year.
    Microsoft has already dropped support for Windows 7 and Windows 8.
    https://nvidia.custhelp.com/app/answers/detail/a_id/5201/related/1
    Effective October 2021, Game Ready Driver upgrades, including performance enhancements, new features, and bug fixes, will be exclusively available for systems utilizing Windows 10 as their operating system.


    I build ffmpeg myself with nv headers and opencl, and use it every day (automated batch processes) on 2 PCs, one with an nvidia 1050Ti and the other with an nvidia 2060 Super. I just reinstalled the o/s et al on the main PC and that's all I did (again) and it works just fine.

    Originally Posted by BartZLederman View Post
    And if you can find a web page anywhere on the Nvidia web site, including their forum, which has ffmpeg examples that actually work with their features like -deinterlace, I urge you to share that with us as well. I've done a cut-and-paste of every Nvidia example I can find, and none of them actually work. They all result in errors.
    May I suggest that you seem to be conflating ?three? quite separate things.
    One is NVENC/NVDEC hardware encoding/decoding (and any standard OpenCL filters ffmpeg understands, and even nvidia's purevideo deinterlacer is available eg via OpenCL) which ffmpeg can use directly without anything other than the nvidia driver. If ffmpeg is built with openCL it enables it to use any ffmpeg openCL filters.
    edit: a vague recollection from a long time ago, I may well be wrong, to build ffmpeg with the opencl nvidia purevideo deinterlacer one needs a "dev" kit of some kind installed, but not needed at runtime ? Per https://forum.videohelp.com/threads/392398-FFMPEG-and-new-GPU-based-YADIF_CUDA-deinter...er#post2544116 ; perhaps go look at MABS which may elaborate ?
    Re deinterlacing, for example, yadif is available or I for example use vapoursynth/avisynth to get access their range of deinterlacers (usually needing extra .DLL files) including nvidia's purevideo deinterlacer. There is also this: https://forum.videohelp.com/threads/392398-FFMPEG-and-new-GPU-based-YADIF_CUDA-deinter...er#post2544264
    The other separate thing is software libraries to do other things.
    The other separate thing is perhaps how ffmpeg is programmed/built ?

    You mention "-deinterlace" which I guess is an ffmpeg commandline switch ... if the ffmpeg program itself is programmed/built for "-deinterlace" to link into and use the nvidia purevideo deinterlacer it should work (I have not checked if that is the case, i.e. ffmpeg is built to do that), you could ask the ffmpeg question of someone that knows.
    edit: ffmpeg help yields "-deinterlace this option is deprecated, use the yadif filter instead"

    Perhaps post some of your commandlines and resulting error messages so that someone can recreate what's going on and provide assistance ?
    Last edited by hydra3333; 5th Aug 2021 at 21:25.
    Quote Quote  
  13. I may not have made it clear that all of my experience with Nvida / Cuda is on an up-to-date Windows 10 system. Installing the driver did not result in hardware enhanced encoding, that required additional software.

    On several Nvidia web pages examples are given that don't work. I will have to hunt up some of them, but we can start with this:

    https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/

    which has examples like this one:

    ffmpeg -vsync 0 –hwaccel cuvid -c:v h264_cuvid –resize 1280x720 -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4

    As I recall, this doesn't work. Somewhere there is a similar example with -deinterlace specified before the input file that also does not work.

    Regarding Intel: I just worked on a friend's laptop which needed to have Windows 10 re-installed. After manually updating the graphics driver, it used QSV for decoding, but according to Task Manager it does not appear to be doing hardware encoding. This is an HP laptop that is still in current inventory.

    There are literally millions of older Intel CPUs out there that have QSV, but since Intel and the various manufactuers never told their customers that they did hardware acceleration, most users never installed the extra software needed for Windows 7 (and 8, and maybe 10) to activate it. Now, when they learn they can make their computers run better, they can't go back and activate QSV because Intel deliberately won't let them. No, I'm not expecting Intel to support Windows 7 forever: but since Windows 7 is fixed in time, and Intel HAD the software that enabled it to run QSV, there is absolutely no good reason why it should not still be available.

    As for Intel supporting it's software, if you dig deep enough you will find a statement from Intel that says they don't actually support ANY of their utilites: not even the driver update software, or the system scan software utilities, or anything else. I will have to see if I still have the E-mail from Intel telling me this, but you can find it on the Intel forum. Or you can ask Intel why their SCC software isn't working and get the answer from them.
    Quote Quote  
  14. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by BartZLederman View Post
    I may not have made it clear that all of my experience with Nvida / Cuda is on an up-to-date Windows 10 system.
    Great !

    Originally Posted by BartZLederman View Post
    Installing the driver did not result in hardware enhanced encoding, that required additional software.
    Oh dear.
    I just checked my log from last night, and 41 (forty one) nvenc encodes were successfully performed using the driver, ffmpeg and vapoursynth.
    Something is very wrong at your end, then.
    Quote Quote  
  15. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    As an aside, you may not get as much benefit as you hope from nvdec decoding et al.
    I would not get hung up on that at this point, although that's up to you.

    As a suggestion, tackle things one at a time, chunk by chunk of the "problem" if you like, as a standard problem solving technique.
    How about, since I cannot do anything for you about QSV, you perhaps focus on nvidia first, eg maybe problem-solving just nvenc encoding ?

    Originally Posted by BartZLederman View Post
    On several Nvidia web pages examples are given that don't work. I will have to hunt up some of them, but we can start with this:
    https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/
    which has examples like this one:
    ffmpeg -vsync 0 –hwaccel cuvid -c:v h264_cuvid –resize 1280x720 -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
    OK, but that does not help solve the problem at this point.
    Post your actual commandline(s) and actual resulting log(s) as mentioned above; also post a small input file you test on, for others to test on.
    You will get nowhere until you do that, since it works for others but not for you.

    Originally Posted by BartZLederman View Post
    As I recall, this doesn't work. Somewhere there is a similar example with -deinterlace specified before the input file that also does not work.
    Don't know your card make/model nor your input file characteristics.
    That commandline is not for dealing with interlaced material so I'm unsurprised it does not "work" if your input is interlaced, depending on what you mean by work.
    Similarly, please see above,
    Originally Posted by BartZLederman View Post
    You mention "-deinterlace" which I guess is an ffmpeg commandline switch ... edit: ffmpeg help yields "-deinterlace this option is deprecated, use the yadif filter instead"
    why "-deinterlace" is not a good idea. Clearly the example you looked at with "-deinterlace" is an obsolete one. There are so many obsolete example Commandlines on the net (which may have worked with older ffmpeg versions) that is it not funny; one needs to check dates posted etc and be discerning.
    You have not posted YOUR input file, full commandline and full log, no one can help you yet.

    Originally Posted by BartZLederman View Post
    Regarding Intel: I just worked on a friend's laptop which needed to have Windows 10 re-installed. After manually updating the graphics driver, it used QSV for decoding, but according to Task Manager it does not appear to be doing hardware encoding. This is an HP laptop that is still in current inventory.

    There are literally millions of older Intel CPUs out there that have QSV, but since Intel and the various manufactuers never told their customers that they did hardware acceleration, most users never installed the extra software needed for Windows 7 (and 8, and maybe 10) to activate it. Now, when they learn they can make their computers run better, they can't go back and activate QSV because Intel deliberately won't let them. No, I'm not expecting Intel to support Windows 7 forever: but since Windows 7 is fixed in time, and Intel HAD the software that enabled it to run QSV, there is absolutely no good reason why it should not still be available.

    As for Intel supporting it's software, if you dig deep enough you will find a statement from Intel that says they don't actually support ANY of their utilites: not even the driver update software, or the system scan software utilities, or anything else. I will have to see if I still have the E-mail from Intel telling me this, but you can find it on the Intel forum. Or you can ask Intel why their SCC software isn't working and get the answer from them.
    I cannot help you with QSV, I do not know the specs of the stuff you are using, what things you have installed which make you think you need them, what commandlines and input files nor and versions of ffmpeg etc you have used and have not seen your resulting logs ... nor do I have/use QSV.

    Clearly : if ffmpeg/nvenc works for me and has for years, but does not work for you, something is amiss

    Here's a successful commandline and it's log from last night (filename changed) using nothing more than what you have been told (i.e. no extra software required other than the vapoursynth stuff which can be replaced by plain input if one does not need to filter eg with deinterlace/denoise/sharpen etc):
    Code:
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -hide_banner -v verbose -nostats ^
    -f vapoursynth ^
    -i "D:\VRDTVSP-SCRATCH\the_filename.QSF.vpy" ^
    -probesize 200M -analyzeduration 200M  ^
    -i "D:\VRDTVSP-SCRATCH\the_filename.QSF.mpg" ^
    -map 0:v:0 -map 1:a:0 ^
    -vf "setdar=16/9" -vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental ^
    -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres ^
    -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 ^
    -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 ^
    -b:v 2000000 -minrate:v 100000 -maxrate:v 4000000 -bufsize 4000000 ^
    -profile:v high -level 5.2 -movflags +faststart+write_colr ^
    -af "adelay=delays=28ms:all=1" -c:a libfdk_aac -cutoff 20000 -ab 256k -ar 48000 ^
    -y "T:\HDTV\VRDTVSP-Converted\the_filename.mp4"
    Routing option strict to both codec and muxer layer
    [vapoursynth @ 0000025695e61540] VS format YUV420P8 -> pixfmt yuv420p
    Input #0, vapoursynth, from 'D:\VRDTVSP-SCRATCH\the_filename.QSF.vpy':
      Duration: 02:04:28.76, start: 0.000000, bitrate: 0 kb/s
      Stream #0:0: Video: wrapped_avframe, 1 reference frame, yuv420p, 720x576, 25 tbr, 25 tbn
    [mpeg @ 0000025695f19a80] max_analyze_duration 200000000 reached at 200000000 microseconds st:0
    Input #1, mpeg, from 'D:\VRDTVSP-SCRATCH\the_filename.QSF.mpg':
      Duration: 02:04:28.79, start: 0.212389, bitrate: 5468 kb/s
      Stream #1:0[0x1e0]: Video: mpeg2video (Main), 1 reference frame, yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 5200 kb/s, 25 fps, 25 tbr, 90k tbn
        Side data:
          cpb: bitrate max/min/avg: 5200000/0/0 buffer size: 1835008 vbv_delay: N/A
      Stream #1:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
      Stream #1:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))
    Press [q] to stop, [?] for help
    [graph 0 input from stream 0:0 @ 00000256c2db1980] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:16/11
    [auto_scaler_0 @ 00000256c2db0d80] w:iw h:ih flags:'bicubic' interl:0
    [format @ 00000256c2db1880] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_setdar_0' and the filter 'format'
    [Parsed_setdar_0 @ 00000256c2db1080] w:720 h:576 dar:20/11 sar:16/11 -> dar:16/9 sar:64/45
    [auto_scaler_0 @ 00000256c2db0d80] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:nv12 sar:64/45 flags:0x4
    [h264_nvenc @ 00000256c11da040] Loaded Nvenc version 11.1
    [h264_nvenc @ 00000256c11da040] Nvenc initialized successfully
    [h264_nvenc @ 00000256c11da040] 1 CUDA capable devices found
    [h264_nvenc @ 00000256c11da040] [ GPU #0 - < NVIDIA GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
    [h264_nvenc @ 00000256c11da040] supports NVENC
    [h264_nvenc @ 00000256c11da040] AQ enabled.
    [h264_nvenc @ 00000256c11da040] Temporal AQ enabled.
    [h264_nvenc @ 00000256c11da040] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
    [graph_1_in_1_1 @ 00000256c2db0b80] tb:1/48000 samplefmt:s16p samplerate:48000 chlayout:0x3
    [format_out_0_1 @ 00000256c2db0880] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_adelay_0' and the filter 'format_out_0_1'
    [auto_resampler_0 @ 00000256c2db1d80] ch:2 chl:stereo fmt:s16p r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
    Output #0, mp4, to 'T:\HDTV\VRDTVSP-Converted\the_filename.mp4':
      Metadata:
        encoder         : Lavf59.4.101
      Stream #0:0: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), nv12(tv, progressive), 720x576 (0x0) [SAR 64:45 DAR 16:9], q=2-31, 2000 kb/s, 25 fps, 12800 tbn
        Metadata:
          encoder         : Lavc59.4.100 h264_nvenc
        Side data:
          cpb: bitrate max/min/avg: 4000000/0/2000000 buffer size: 4000000 vbv_delay: N/A
      Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048, 256 kb/s
        Metadata:
          encoder         : Lavc59.4.100 libfdk_aac
    No more output streams to write to, finishing.
    [mp4 @ 00000256c2371d00] Starting second pass: moving the moov atom to the beginning of the file
    no ICC profile found, will write nclx/nclc colour info instead
        Last message repeated 1 times
    [AVIOContext @ 00000256c1250540] Statistics: 2115284010 bytes read, 0 seeks
    no ICC profile found, will write nclx/nclc colour info instead
    frame=186719 fps=404 q=14.0 Lsize= 2066781kB time=02:04:28.60 bitrate=2267.0kbits/s speed=16.1x    
    video:1828482kB audio:233392kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.237990%
    Input file #0 (D:\VRDTVSP-SCRATCH\the_filename.QSF.vpy):
      Input stream #0:0 (video): 186719 packets read (82156360 bytes); 186719 frames decoded; 
      Total: 186719 packets (82156360 bytes) demuxed
    Input file #1 (D:\VRDTVSP-SCRATCH\the_filename.QSF.mpg):
      Input stream #1:0 (video): 0 packets read (0 bytes); 
      Input stream #1:1 (audio): 311186 packets read (179243136 bytes); 311186 frames decoded (358486272 samples); 
      Total: 311186 packets (179243136 bytes) demuxed
    Output file #0 (T:\HDTV\VRDTVSP-Converted\the_filename.mp4):
      Output stream #0:0 (video): 186719 frames encoded; 186719 packets muxed (1872365736 bytes); 
      Output stream #0:1 (audio): 350086 frames encoded (358487616 samples); 350088 packets muxed (238993409 bytes); 
      Total: 536807 packets (2111359145 bytes) muxed
    [AVIOContext @ 00000256c1250940] Statistics: 34 seeks, 16150 writeouts
    [h264_nvenc @ 00000256c11da040] Nvenc unloaded
    [AVIOContext @ 0000025695e69b80] Statistics: 1715 bytes read, 0 seeks
    [AVIOContext @ 0000025696d02040] Statistics: 5242034320 bytes read, 2 seeks
    (the double-input vapoursynth and .mpg and mapping stuff could be substituted with just "-i" and the original .mpg filename)
    Last edited by hydra3333; 8th Aug 2021 at 08:48.
    Quote Quote  
  16. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Also, post the log you get from ffmpeg commands 1 through 7 (use the path to your own ffmpeg.exe)
    Code:
    REM ---------------------------------------------------------------------------------------------------
    REM These use ffmpeg built with OpenCL
    
    REM 1.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device list
    
    REM note the Device Id (perhaps 0.0) and use it below
    REM 2.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device opencl
    
    REM 3.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device opencl:0.0
    
    REM 4.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h filter=yadif 
    
    REM 5.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h filter=unsharp_opencl 
    
    REM ---------------------------------------------------------------------------------------------------
    
    REM 6.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -h encoder=hevc_nvenc
    
    REM 7.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h encoder=h264_nvenc 
    
    REM ---------------------------------------------------------------------------------------------------
    REM ---------------------------------------------------------------------------------------------------
    REM these next use ffmpeg built WITHOUT OpenCL and so should fail with the OpenCl bits
    
    REM 8.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -init_hw_device list
    
    REM note the Device Id (perhaps 0.0) and use it below
    REM 9.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -init_hw_device opencl
    
    REM 10.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -init_hw_device opencl:0.0
    
    REM 11.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -h filter=yadif 
    
    REM 12.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -h filter=unsharp_opencl 
    
    REM ---------------------------------------------------------------------------------------------------
    
    REM 13.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -h encoder=hevc_nvenc
    
    REM 14.
    "C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -v debug -h encoder=h264_nvenc 
    REM ---------------------------------------------------------------------------------------------------
    Here's mine:
    Code:
    C:\Windows\system32>REM ---------------------------------------------------------------------------------------------------
    
    C:\Windows\system32>REM These use ffmpeg built with OpenCL
    
    C:\Windows\system32>
    C:\Windows\system32>REM 1.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device list
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'list'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option init_hw_device (initialise hardware device) with argument list.
    Supported hardware device types:
    cuda
    dxva2
    qsv
    d3d11va
    opencl
    
    
    C:\Windows\system32>
    C:\Windows\system32>REM note the Device Id (perhaps 0.0) and use it below
    
    C:\Windows\system32>REM 2.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device opencl
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option init_hw_device (initialise hardware device) with argument opencl.
    [AVHWDeviceContext @ 000002a11a8ed580] 1 OpenCL platforms found.
    [AVHWDeviceContext @ 000002a11a8ed580] 1 OpenCL devices found on platform "NVIDIA CUDA".
    [AVHWDeviceContext @ 000002a11a8ed580] 0.0: NVIDIA CUDA / NVIDIA GeForce RTX 2060 SUPER
    [AVHWDeviceContext @ 000002a11a8ed580] DXVA2 to OpenCL mapping function found (clCreateFromDX9MediaSurfaceKHR).
    [AVHWDeviceContext @ 000002a11a8ed580] DXVA2 in OpenCL acquire function found (clEnqueueAcquireDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 000002a11a8ed580] DXVA2 in OpenCL release function found (clEnqueueReleaseDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 000002a11a8ed580] The cl_khr_d3d11_sharing extension is required for D3D11 to OpenCL mapping.
    [AVHWDeviceContext @ 000002a11a8ed580] D3D11 to OpenCL mapping not usable.
    Successfully parsed a group of options.
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    
    Use -h to get full help or, even better, run 'man ffmpeg'
    
    C:\Windows\system32>
    C:\Windows\system32>REM 3.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -init_hw_device opencl:0.0
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl:0.0'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option init_hw_device (initialise hardware device) with argument opencl:0.0.
    [AVHWDeviceContext @ 000001c8796fd580] 1 OpenCL platforms found.
    [AVHWDeviceContext @ 000001c8796fd580] 1 OpenCL devices found on platform "NVIDIA CUDA".
    [AVHWDeviceContext @ 000001c8796fd580] 0.0: NVIDIA CUDA / NVIDIA GeForce RTX 2060 SUPER
    [AVHWDeviceContext @ 000001c8796fd580] DXVA2 to OpenCL mapping function found (clCreateFromDX9MediaSurfaceKHR).
    [AVHWDeviceContext @ 000001c8796fd580] DXVA2 in OpenCL acquire function found (clEnqueueAcquireDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 000001c8796fd580] DXVA2 in OpenCL release function found (clEnqueueReleaseDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 000001c8796fd580] The cl_khr_d3d11_sharing extension is required for D3D11 to OpenCL mapping.
    [AVHWDeviceContext @ 000001c8796fd580] D3D11 to OpenCL mapping not usable.
    Successfully parsed a group of options.
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    
    Use -h to get full help or, even better, run 'man ffmpeg'
    
    C:\Windows\system32>
    C:\Windows\system32>REM 4.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h filter=yadif
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-h' ... matched as option 'h' (show help) with argument 'filter=yadif'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option h (show help) with argument filter=yadif.
    Filter yadif
      Deinterlace the input image.
        slice threading supported
        Inputs:
           #0: default (video)
        Outputs:
           #0: default (video)
    yadif AVOptions:
      mode              <int>        ..FV....... specify the interlacing mode (from 0 to 3) (default send_frame)
         send_frame      0            ..FV....... send one frame for each frame
         send_field      1            ..FV....... send one frame for each field
         send_frame_nospatial 2            ..FV....... send one frame for each frame, but skip spatial interlacing check
         send_field_nospatial 3            ..FV....... send one frame for each field, but skip spatial interlacing check
      parity            <int>        ..FV....... specify the assumed picture field parity (from -1 to 1) (default auto)
         tff             0            ..FV....... assume top field first
         bff             1            ..FV....... assume bottom field first
         auto            -1           ..FV....... auto detect parity
      deint             <int>        ..FV....... specify which frames to deinterlace (from 0 to 1) (default all)
         all             0            ..FV....... deinterlace all frames
         interlaced      1            ..FV....... only deinterlace frames marked as interlaced
    
    This filter has support for timeline through the 'enable' option.
    
    C:\Windows\system32>
    C:\Windows\system32>REM 5.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h filter=unsharp_opencl
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-h' ... matched as option 'h' (show help) with argument 'filter=unsharp_opencl'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option h (show help) with argument filter=unsharp_opencl.
    Filter unsharp_opencl
      Apply unsharp mask to input video
        Inputs:
           #0: default (video)
        Outputs:
           #0: default (video)
    unsharp_opencl AVOptions:
      luma_msize_x      <float>      ..FV....... Set luma mask horizontal diameter (pixels) (from 1 to 23) (default 5)
      lx                <float>      ..FV....... Set luma mask horizontal diameter (pixels) (from 1 to 23) (default 5)
      luma_msize_y      <float>      ..FV....... Set luma mask vertical diameter (pixels) (from 1 to 23) (default 5)
      ly                <float>      ..FV....... Set luma mask vertical diameter (pixels) (from 1 to 23) (default 5)
      luma_amount       <float>      ..FV....... Set luma amount (multiplier) (from -10 to 10) (default 1)
      la                <float>      ..FV....... Set luma amount (multiplier) (from -10 to 10) (default 1)
      chroma_msize_x    <float>      ..FV....... Set chroma mask horizontal diameter (pixels after subsampling) (from 1 to 23) (default 5)
      cx                <float>      ..FV....... Set chroma mask horizontal diameter (pixels after subsampling) (from 1 to 23) (default 5)
      chroma_msize_y    <float>      ..FV....... Set chroma mask vertical diameter (pixels after subsampling) (from 1 to 23) (default 5)
      cy                <float>      ..FV....... Set chroma mask vertical diameter (pixels after subsampling) (from 1 to 23) (default 5)
      chroma_amount     <float>      ..FV....... Set chroma amount (multiplier) (from -10 to 10) (default 0)
      ca                <float>      ..FV....... Set chroma amount (multiplier) (from -10 to 10) (default 0)
    
    
    C:\Windows\system32>
    C:\Windows\system32>REM ---------------------------------------------------------------------------------------------------
    
    C:\Windows\system32>
    C:\Windows\system32>REM 6.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -h encoder=hevc_nvenc
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
        General capabilities: dr1 delay hardware
        Threading capabilities: none
        Supported hardware devices: cuda cuda d3d11va d3d11va
        Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 gbrp gbrp16le cuda d3d11
    hevc_nvenc AVOptions:
      -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)
         default         0            E..V.......
         slow            1            E..V....... hq 2 passes
         medium          2            E..V....... hq 1 pass
         fast            3            E..V....... hp 1 pass
         hp              4            E..V.......
         hq              5            E..V.......
         bd              6            E..V.......
         ll              7            E..V....... low latency
         llhq            8            E..V....... low latency hq
         llhp            9            E..V....... low latency hp
         lossless        10           E..V....... lossless
         losslesshp      11           E..V....... lossless hp
         p1              12           E..V....... fastest (lowest quality)
         p2              13           E..V....... faster (lower quality)
         p3              14           E..V....... fast (low quality)
         p4              15           E..V....... medium (default)
         p5              16           E..V....... slow (good quality)
         p6              17           E..V....... slower (better quality)
         p7              18           E..V....... slowest (best quality)
      -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)
         hq              1            E..V....... High quality
         ll              2            E..V....... Low latency
         ull             3            E..V....... Ultra low latency
         lossless        4            E..V....... Lossless
      -profile           <int>        E..V....... Set the encoding profile (from 0 to 4) (default main)
         main            0            E..V.......
         main10          1            E..V.......
         rext            2            E..V.......
      -level             <int>        E..V....... Set the encoding level restriction (from 0 to 186) (default auto)
         auto            0            E..V.......
         1               30           E..V.......
         1.0             30           E..V.......
         2               60           E..V.......
         2.0             60           E..V.......
         2.1             63           E..V.......
         3               90           E..V.......
         3.0             90           E..V.......
         3.1             93           E..V.......
         4               120          E..V.......
         4.0             120          E..V.......
         4.1             123          E..V.......
         5               150          E..V.......
         5.0             150          E..V.......
         5.1             153          E..V.......
         5.2             156          E..V.......
         6               180          E..V.......
         6.0             180          E..V.......
         6.1             183          E..V.......
         6.2             186          E..V.......
      -tier              <int>        E..V....... Set the encoding tier (from 0 to 1) (default main)
         main            0            E..V.......
         high            1            E..V.......
      -rc                <int>        E..V....... Override the preset rate-control (from -1 to INT_MAX) (default -1)
         constqp         0            E..V....... Constant QP mode
         vbr             1            E..V....... Variable bitrate mode
         cbr             2            E..V....... Constant bitrate mode
         vbr_minqp       8388612      E..V....... Variable bitrate mode with MinQP (deprecated)
         ll_2pass_quality 8388616      E..V....... Multi-pass optimized for image quality (deprecated)
         ll_2pass_size   8388624      E..V....... Multi-pass optimized for constant frame size (deprecated)
         vbr_2pass       8388640      E..V....... Multi-pass variable bitrate mode (deprecated)
         cbr_ld_hq       8388616      E..V....... Constant bitrate low delay high quality mode
         cbr_hq          8388624      E..V....... Constant bitrate high quality mode
         vbr_hq          8388640      E..V....... Variable bitrate high quality mode
      -rc-lookahead      <int>        E..V....... Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)
      -surfaces          <int>        E..V....... Number of concurrent surfaces (from 0 to 64) (default 0)
      -cbr               <boolean>    E..V....... Use cbr encoding mode (default false)
      -2pass             <boolean>    E..V....... Use 2pass encoding mode (default auto)
      -gpu               <int>        E..V....... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
         any             -1           E..V....... Pick the first device available
         list            -2           E..V....... List the available devices
      -delay             <int>        E..V....... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
      -no-scenecut       <boolean>    E..V....... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
      -forced-idr        <boolean>    E..V....... If forcing keyframes, force them as IDR frames. (default false)
      -spatial_aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)
      -spatial-aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)
      -temporal_aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)
      -temporal-aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)
      -zerolatency       <boolean>    E..V....... Set 1 to indicate zero latency operation (no reordering delay) (default false)
      -nonref_p          <boolean>    E..V....... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
      -strict_gop        <boolean>    E..V....... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
      -aq-strength       <int>        E..V....... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
      -cq                <float>      E..V....... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
      -aud               <boolean>    E..V....... Use access unit delimiters (default false)
      -bluray-compat     <boolean>    E..V....... Bluray compatibility workarounds (default false)
      -init_qpP          <int>        E..V....... Initial QP value for P frame (from -1 to 51) (default -1)
      -init_qpB          <int>        E..V....... Initial QP value for B frame (from -1 to 51) (default -1)
      -init_qpI          <int>        E..V....... Initial QP value for I frame (from -1 to 51) (default -1)
      -qp                <int>        E..V....... Constant quantization parameter rate control method (from -1 to 51) (default -1)
      -weighted_pred     <int>        E..V....... Set 1 to enable weighted prediction (from 0 to 1) (default 0)
      -b_ref_mode        <int>        E..V....... Use B frames as references (from 0 to 2) (default disabled)
         disabled        0            E..V....... B frames will not be used for reference
         each            1            E..V....... Each B frame will be used for reference
         middle          2            E..V....... Only (number of B frames)/2 will be used for reference
      -a53cc             <boolean>    E..V....... Use A53 Closed Captions (if available) (default true)
      -s12m_tc           <boolean>    E..V....... Use timecode (if available) (default true)
      -dpb_size          <int>        E..V....... Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)
      -multipass         <int>        E..V....... Set the multipass encoding (from 0 to 2) (default disabled)
         disabled        0            E..V....... Single Pass
         qres            1            E..V....... Two Pass encoding is enabled where first Pass is quarter resolution
         fullres         2            E..V....... Two Pass encoding is enabled where first Pass is full resolution
      -ldkfs             <int>        E..V....... Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)
      -extra_sei         <boolean>    E..V....... Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream (default true)
    
    
    C:\Windows\system32>
    C:\Windows\system32>REM 7.
    
    C:\Windows\system32>"C:\SOFTWARE\Vapoursynth-x64\ffmpeg_OpenCL.exe" -v debug -h encoder=h264_nvenc
    ffmpeg version git-2021-08-06-9f19fbb-Hydra3333/python_cross_compile_script_v100 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10.3.0 (GCC)
      configuration: --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray --enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp --enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl --enable-opengl --extra-cflags='-DFRIBIDI_LIB_STATIC -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-schannel --extra-cflags='-DLIBTWOLAME_STATIC -lssp' --extra-cflags='-DMODPLUG_STATIC -lssp' --extra-cflags='-DLIBXML_STATIC -lssp' --extra-cflags='-DGLIB_STATIC_COMPILATION -lssp' --extra-libs='-lpsapi -lintl -liconv -lssp' --enable-nonfree --enable-libfdk-aac --enable-decklink --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed --disable-shared --enable-static
      libavutil      57.  3.100 / 57.  3.100
      libavcodec     59.  4.100 / 59.  4.100
      libavformat    59.  4.101 / 59.  4.101
      libavdevice    59.  0.100 / 59.  0.100
      libavfilter     8.  1.103 /  8.  1.103
      libswscale      6.  0.100 /  6.  0.100
      libswresample   4.  0.100 /  4.  0.100
      libpostproc    56.  0.100 / 56.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-h' ... matched as option 'h' (show help) with argument 'encoder=h264_nvenc'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option h (show help) with argument encoder=h264_nvenc.
    Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
        General capabilities: dr1 delay hardware
        Threading capabilities: none
        Supported hardware devices: cuda cuda d3d11va d3d11va
        Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 gbrp gbrp16le cuda d3d11
    h264_nvenc AVOptions:
      -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)
         default         0            E..V.......
         slow            1            E..V....... hq 2 passes
         medium          2            E..V....... hq 1 pass
         fast            3            E..V....... hp 1 pass
         hp              4            E..V.......
         hq              5            E..V.......
         bd              6            E..V.......
         ll              7            E..V....... low latency
         llhq            8            E..V....... low latency hq
         llhp            9            E..V....... low latency hp
         lossless        10           E..V.......
         losslesshp      11           E..V.......
         p1              12           E..V....... fastest (lowest quality)
         p2              13           E..V....... faster (lower quality)
         p3              14           E..V....... fast (low quality)
         p4              15           E..V....... medium (default)
         p5              16           E..V....... slow (good quality)
         p6              17           E..V....... slower (better quality)
         p7              18           E..V....... slowest (best quality)
      -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)
         hq              1            E..V....... High quality
         ll              2            E..V....... Low latency
         ull             3            E..V....... Ultra low latency
         lossless        4            E..V....... Lossless
      -profile           <int>        E..V....... Set the encoding profile (from 0 to 3) (default main)
         baseline        0            E..V.......
         main            1            E..V.......
         high            2            E..V.......
         high444p        3            E..V.......
      -level             <int>        E..V....... Set the encoding level restriction (from 0 to 62) (default auto)
         auto            0            E..V.......
         1               10           E..V.......
         1.0             10           E..V.......
         1b              9            E..V.......
         1.0b            9            E..V.......
         1.1             11           E..V.......
         1.2             12           E..V.......
         1.3             13           E..V.......
         2               20           E..V.......
         2.0             20           E..V.......
         2.1             21           E..V.......
         2.2             22           E..V.......
         3               30           E..V.......
         3.0             30           E..V.......
         3.1             31           E..V.......
         3.2             32           E..V.......
         4               40           E..V.......
         4.0             40           E..V.......
         4.1             41           E..V.......
         4.2             42           E..V.......
         5               50           E..V.......
         5.0             50           E..V.......
         5.1             51           E..V.......
         5.2             52           E..V.......
         6.0             60           E..V.......
         6.1             61           E..V.......
         6.2             62           E..V.......
      -rc                <int>        E..V....... Override the preset rate-control (from -1 to INT_MAX) (default -1)
         constqp         0            E..V....... Constant QP mode
         vbr             1            E..V....... Variable bitrate mode
         cbr             2            E..V....... Constant bitrate mode
         vbr_minqp       8388612      E..V....... Variable bitrate mode with MinQP (deprecated)
         ll_2pass_quality 8388616      E..V....... Multi-pass optimized for image quality (deprecated)
         ll_2pass_size   8388624      E..V....... Multi-pass optimized for constant frame size (deprecated)
         vbr_2pass       8388640      E..V....... Multi-pass variable bitrate mode (deprecated)
         cbr_ld_hq       8388616      E..V....... Constant bitrate low delay high quality mode
         cbr_hq          8388624      E..V....... Constant bitrate high quality mode
         vbr_hq          8388640      E..V....... Variable bitrate high quality mode
      -rc-lookahead      <int>        E..V....... Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)
      -surfaces          <int>        E..V....... Number of concurrent surfaces (from 0 to 64) (default 0)
      -cbr               <boolean>    E..V....... Use cbr encoding mode (default false)
      -2pass             <boolean>    E..V....... Use 2pass encoding mode (default auto)
      -gpu               <int>        E..V....... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
         any             -1           E..V....... Pick the first device available
         list            -2           E..V....... List the available devices
      -delay             <int>        E..V....... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
      -no-scenecut       <boolean>    E..V....... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
      -forced-idr        <boolean>    E..V....... If forcing keyframes, force them as IDR frames. (default false)
      -b_adapt           <boolean>    E..V....... When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)
      -spatial-aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)
      -spatial_aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)
      -temporal-aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)
      -temporal_aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)
      -zerolatency       <boolean>    E..V....... Set 1 to indicate zero latency operation (no reordering delay) (default false)
      -nonref_p          <boolean>    E..V....... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
      -strict_gop        <boolean>    E..V....... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
      -aq-strength       <int>        E..V....... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
      -cq                <float>      E..V....... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
      -aud               <boolean>    E..V....... Use access unit delimiters (default false)
      -bluray-compat     <boolean>    E..V....... Bluray compatibility workarounds (default false)
      -init_qpP          <int>        E..V....... Initial QP value for P frame (from -1 to 51) (default -1)
      -init_qpB          <int>        E..V....... Initial QP value for B frame (from -1 to 51) (default -1)
      -init_qpI          <int>        E..V....... Initial QP value for I frame (from -1 to 51) (default -1)
      -qp                <int>        E..V....... Constant quantization parameter rate control method (from -1 to 51) (default -1)
      -weighted_pred     <int>        E..V....... Set 1 to enable weighted prediction (from 0 to 1) (default 0)
      -coder             <int>        E..V....... Coder type (from -1 to 2) (default default)
         default         -1           E..V.......
         auto            0            E..V.......
         cabac           1            E..V.......
         cavlc           2            E..V.......
         ac              1            E..V.......
         vlc             2            E..V.......
      -b_ref_mode        <int>        E..V....... Use B frames as references (from 0 to 2) (default disabled)
         disabled        0            E..V....... B frames will not be used for reference
         each            1            E..V....... Each B frame will be used for reference
         middle          2            E..V....... Only (number of B frames)/2 will be used for reference
      -a53cc             <boolean>    E..V....... Use A53 Closed Captions (if available) (default true)
      -dpb_size          <int>        E..V....... Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)
      -multipass         <int>        E..V....... Set the multipass encoding (from 0 to 2) (default disabled)
         disabled        0            E..V....... Single Pass
         qres            1            E..V....... Two Pass encoding is enabled where first Pass is quarter resolution
         fullres         2            E..V....... Two Pass encoding is enabled where first Pass is full resolution
      -ldkfs             <int>        E..V....... Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)
      -extra_sei         <boolean>    E..V....... Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream (default true)
    edit: apparently this command should list your available nvidia GPU's (even if it spits an error at the end)
    Code:
    ffmpeg -vsync 0 -i "an-input-file.mp4" -c:v h264_nvenc -gpu list -f null -
    Last edited by hydra3333; 8th Aug 2021 at 08:59.
    Quote Quote  
  17. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by BartZLederman View Post
    I may not have made it clear that all of my experience with Nvida / Cuda is on an up-to-date Windows 10 system. Installing the driver did not result in hardware enhanced encoding, that required additional software.
    It just occurred to me that I do not know what you mean by "hardware enhanced encoding".
    Do you mean h.264/h.265 encoding by the nvenc hardware encoder on the nvidia video card ?
    Or, doing things to the video before encoding eg deinterlacing, sharpening, etc ?
    Two VERY different things done by different software/chips.
    Quote Quote  
  18. It just occurred to me that I do not know what you mean by "hardware enhanced encoding".
    Do you mean h.264/h.265 encoding by the nvenc hardware encoder on the nvidia video card ?
    Or, doing things to the video before encoding eg deinterlacing, sharpening, etc ?
    Two VERY different things done by different software/chips.

    Yes, Yes, and NO!

    Using hardware enhanced encoding can mean using a video encoding codec that has been enhanced so that most of the work is done by the hardware. Intel, AMD, and Nvidia all have cards or processors (usually made after a specific date some years ago, the oldest hardware doesn't have this) that will use hardware to do encoding: usually AVC (x.264 or nv12) or HEVC. For example, there are QSV enhanced codes from (I assume) Intel that encode AV1, h264, HEVC, MJPEG, MPEG2, VC1, VP8, and VP9. NVENC codecs are available for h264 and HEVC. AMF (AMD) is available for h264 and HEVC. At least, this is what my version of ffmpeg says it has available in the release, there may be more. These have often been mentioned in various forums and websites.

    There are also hardware enhanced Filters that use the very same graphics processor / hardware to perform various types of transformations on the video before the final encoding. These filters do not use the general CPU for all processing as most filters do, they do in fact use the very same hardware on the graphics card (or built into the Intel CPU) to perform functions like re-sizing and deinterlacing. This is also mentioned in a variety of forums and manufacturer's websites. According to my version of ffmpeg, it currently has built into it deinterlace_qsv, overlay_qsv, scale_qsv, and vpp_qsv; overlay_cuda, scale_cuda, thumbnail_cuda and yadif_cuda.

    According to various sources, and what I can see when I use these on two versions of Windows, utilities like Task Manager and GPU-Z clearly indicate that these filters do in fact use the graphics hardware, not different chips. I've done one test where the video decoding and encoding were with the default (CPU only) codecs and resizing was with the vpp_qsv enhanced filter, and I believe GPU-Z showed that the graphics processor was being used to do the resize.

    It is quite possible that some of the older graphics processors that can do video decoding but not video encoding may be able to do some filter processing. It was possible in the past to write your own programs that used features of a graphics card to do any sort of processing you wanted to: but this wouldn't have come from any of the manufacturers. So far I have only done h264 encoding with Intel and Nvidia, and some filtering (mostly cropping and resizing) with Intel. I don't remember if I tried a resize with Cuda, but I think I did at least once. Nvidia's web pages and documentation very strongly suggest that Nvenc / Cuda (just like them to use different names instead of choosing one name for both codecs and filters) can do more filtering than the four I've listed above, but as I've said many times, if you do a cut and paste of their examples to your system, they do not work: you get a variety of errors instead.

    This is the crux of the problem. There apparently is a great potential here to speed up video processing and encoding by using filters that use the graphics hardware as well as the codec for the final encoding. But just try and get the documentation for ANY of these filters anywhere. As I said before, if you can do that, you will be performing a very great service to the entire community. The manufacturers apparently don't really want "ordinary" customers such as ourselves to know how any of this stuff can be used, despite there being some bit advertising pushes by the various manufacturers (especially Intel right now) to inform customers how wonderful their graphics and video processing enhancements are.

    I have also learned that there are a variety of OpenCL enabled filters which should be faster than the "regular" ones, or would at least off-load some processing to the graphics processor regardless of the manufacturer. I haven't tried any of these, but "deshake" looks promising. Again, these are the ones that ffmpeg says are built-in now, and so far I haven't found the opencl versions: but it appears they may be identical to the "normal" ones built into ffmpeg (deshake vs deshake_opencl) so they may be easier to use if you can decode the sometimes obscure documentation on ffmpeg.org .

    avgblur_opencl, boxblur_opencl, colorkey_opencl, convolution_opencl, deshake_opencl, dilation_opencl, erosion_opencl, nlmeans_opencl, overlay_opencl, pad_opencl, prewitt_opencl, program_opencl, roberts_opencl, sobel_opencl, tonemap_opencl, transpose_opencl, unsharp_opencl, xfade_opencl openclsrc

    I do have a couple of Linux systems where I could try some of these various codecs and filters if that would help anyone, but I'll have to check if it has the necessary hardware.
    Quote Quote  
  19. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    "Yes, Yes, and NO!" and then a LOT of words.

    Oh dear. You appear to not have grasped what is happening and have painted a misleading/incorrect picture.

    Please consider googling the ASIC chip on the nvidia card which does the encoding on the nvidia cards and which is QUITE separate to the other hardware on the card which does other things include running filters.

    These 2 separate hardware "bits" on the card can be accessed/used by separate pieces of software, eg (a) the codec as you put it which does encoding, and (b) other things like filters etc.
    Each does require different software to access it, and filters can sometimes require additional separate libraries.

    Hence why nvenc encoding works out of the box as that function does not require additional libraries to be installed - same for some filters. Other filters do require additional libraries. What needs to be installed depends on what you are doing.

    What you think of as the crux of the problem is not - at face value, it is your current understanding and attempted usage; match your usage to the software configuration you need to operate that usage (i.e. what software needs to be installed, if any) and things will go well.

    You have not posted commandlines nor logs nor a sample file, as requested multiple times. (I posted results which shows nvenc does work without additional software.)

    Please do some reading about software dependencies and do not confuse people further.

    Good luck with your efforts, I'm done here as it appears possible that you may be trolling.
    Last edited by hydra3333; 9th Aug 2021 at 15:31.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!