

Interestingly, DXVA2 always slows it down. Source: 3hr 1080i mpeg2, unsharp without and with OpenCL and DXVA2 - elapsed time, fps, speed.Ĥ.0 OpenCL=0 homebuilt ffmpeg_圆4 NOOpenCL_unsharp + nvenc + standard_ffmpeg_decoding - 01:29:38, fps= 50, speed=2.01xĤ.1 OpenCL=1 homebuilt ffmpeg_圆4 OpenCL_unsharp + nvenc + standard_ffmpeg_decoding - 00:35:27, fps=127, speed=5.08xĤ.2 OpenCL=1 homebuilt ffmpeg_圆4 OpenCL_unsharp + nvenc + DXVA2_GPU_decoding - 00:48:32, fps= 93, speed=3.71x Some of the test results below from conversion of a 1080i mpeg2 video into h264.

nvidia's PureVideo GPU deinterlacer) and then piped into ffmpeg for unsharp-OpenCL/encoding, beat the ffmpeg-only combination by an absolutely whopping margin, end-to-end rate 19.5x vs 5.49x GPU deinterlacing/resizing with VapourSynth/dgdecode_NV (i.e. ffmpeg deinterlacing with yadif was pretty reasonable (the only way I could readily find to GPU deinterlace was to open with VapourSynth/dgdecode_NV and then pipe into ffmpeg for unsharp-OpenCL/encoding) Using OpenCL in ffmpeg's unsharp mask can make a huge difference for larger dimensioned sources like 1080i, end-to-end rate 5.08x vs 2.01x Vanilla ffmpeg internal mpeg2 decoding was pretty reasonable speed, it didn't appear to be worth doing fancy GPU decoding by itself DXVA2 for decoding mpeg2 was not quicker than vanilla ffmpeg decoding (it was consistently slower for me) after a bit of testing, once-off results seemed to indicate Errors thrown and sometimes crashing, I wonder what I did wrong. I ended up giving up on ffmpeg CUVID GPU decoding(-hwaccel cuvid -c:v h264_cuvid), apparently called "nvdec" by Nvidia now, as too unreliable.

So, with a lot of assistance I built an ffmpeg 圆4 with OpenCL as well as the usual bits, and then did some testing. Many videos just aren't worth enhancing beyond a tad of sharpening anyway. Maybe you have better suggestions (I hope so). Having wondered that - there's not much choice of filters inbuilt in ffmpeg for denoising sharpening and whatnot, having been spoiled by AviSynth and VapourSynth, and much less choice in GPU/OpenCL filters. To GPU, or not to GPU, that was the question. I had a temporary fixation on GPU based decoding/resizing/sharpening/encoding, using ffmpeg, for standardising non-vital videos to mp4/avc/aac for playback across a range of my home devices.
