Question / Help Encoders: X264 vs ffmpeg

Since Nvidia released linux kernel module version 346.16 (Nov 13th) which now enables the ability to use the encoding chip on kepler and up based GPU's. I've been looking into using NVENC in linux. Someone has forked ffmpeg (https://github.com/agathah/ffmpeg_libnvenc) , when compiled correctly with the nvEncodeAPI.h header file from the windows (you read that correctly, the windows version) nvenc sdk this new ffmpeg can now use libnvenc as an encoder.

I've been reading many posts on the internet comparing NVENC against X264 and many are saying that the quality just isn't as good and I actually can attest to this as that's what I noticed when I was trying NVENC out when I was using Shadowplay in Windows and even OBS (original) in Windows 7. According to this post here https://forums.geforce.com/default/topic/711231/obs-can-now-use-nvidia-gpu-encoder/ NVENC only really benefits when you start getting up much higher than the allowable livestreaming bitrates (most non-partnered should use anywhere from 1,000 to 3,500 but this is situational and highly opinionated of of course), i'm talking 30Mbps encoding here. After all NVENC is capable of encoding 1080p video at 4X real-time, ie at 120FPS but that's with no B-Frames. The encoding latency is currently only 1 frame as well(without B-frames). Would you really want to chew up your CPU to encode that Bluray movie into a .mkv file so you have a backup in case your child decides to put the disc in the toaster when you could actually utilize the chip that's sitting on your expensive ass Nvidia GPU not doing anything anyway?

Nvida's own documentation (which may be portrayed as marketing material) states
"NVENC hardware has been designed to provide quality comparable to x264 [5] (an open
source H.264 encode library) with much higher performance. The comparable x264
preset used for quality comparison between NVENC, x264 and other competitive
solutions is as follows"
Code:
--keyint 30 --no-scenecut --no-chroma-me --fps 30 --preset faster --ref 1 --trellis 0 --
weightp 0 --b-pyramid normal –bframe n

Linux only supports synchronous mode; supports external (applicationdriven)
or internal picture type decision; supports multiple rate control options (CBR,
VBR, 2-pass, low-latency, with ability to switch RC mode) etc.

So according to ffmpeg installed on my machine

Code:
ffmpeg -h encoder=libnvenc

Output:

Encoder libnvenc [libnvenc H.264 / MPEG-4 AVC]:
Threading capabilities: no
Supported pixel formats: nv12 yuv420p yuvj420p
NVIDIA NVENC AVOptions:
-preset E..V.... Set x264 encoding preset (default "medium")
-tune E..V.... Set x264 encoding tuning
-profile E..V.... Set H.264 profile restrictions.
-fastfirstpass E..V.... Ignored. (from 0 to 1) (default 1)
-level E..V.... Set H.264 level
-passlogfile E..V.... Ignored.
-wpredp E..V.... Ignored.
-crf E..V.... Ignored. (from -1 to FLT_MAX) (default -1)
-crf_max E..V.... Ignored. (from -1 to FLT_MAX) (default -1)
-qp E..V.... Constant quantization parameter (from -1 to INT_MAX) (default -1)
-aq-mode E..V.... Ignored. (from -1 to INT_MAX) (default -1)
-aq-strength E..V.... Ignored. (from -1 to FLT_MAX) (default -1)
-psy E..V.... Ignored. (from -1 to 1) (default -1)
-psy-rd E..V.... Ignored.
-rc-lookahead E..V.... Ignored. (from -1 to INT_MAX) (default -1)
-weightb E..V.... Ignored. (from -1 to 1) (default -1)
-weightp E..V.... Ignored. (from -1 to INT_MAX) (default -1)
-ssim E..V.... Ignored. (from -1 to 1) (default -1)
-intra-refresh E..V.... Use Periodic Intra Refresh. (from -1 to 1) (default -1)
-bluray-compat E..V.... Ignored. (from -1 to 1) (default -1)
-b-bias E..V.... Ignored. (from INT_MIN to INT_MAX) (default INT_MIN)
-b-pyramid E..V.... Ignored. (from -1 to INT_MAX) (default -1)
-mixed-refs E..V.... Ignored. (from -1 to 1) (default -1)
-8x8dct E..V.... High profile 8x8 transform. (from -1 to 1) (default -1)
-fast-pskip E..V.... Ignored. (from -1 to 1) (default -1)
-aud E..V.... Insert access unit delimiters. (from -1 to 1) (default -1)
-mbtree E..V.... Ignored. (from -1 to 1) (default -1)
-deblock E..V.... Loop filter, in alpha:beta.
-cplxblur E..V.... Ignored. (from -1 to FLT_MAX) (default -1)
-partitions E..V.... Ignored.
-direct-pred E..V.... Direct MV prediction mode (from -1 to INT_MAX) (default -1)
-slice-max-size E..V.... Ignored. (from -1 to INT_MAX) (default -1)
-stats E..V.... Ignored.
-nal-hrd E..V.... Insert HRD info NALUs (from -1 to INT_MAX) (default -1)
-x264opts E..V.... Apply x264-style options using a :-separated list of key=value pairs
-x264-params E..V.... Apply x264-style options using a :-separated list of key=value pairs

But currently obs doesn't even use ffmpeg for encoding you say, Ubu why are you doing all this research? Well I'm trying to find out how to get the best possible, highest quality captures for local recordings, not livestreaming. Ya see now?

Then we have other software that's available to us linuxer's called simplescreenrecorder which was designed for local recording in mind first and foremost. He was fed up with how slow ffmpeg libswscale feature was so he wrote his own convertors and scalers, and in doing so he saw a 4X speed improvement.

Just thought I would create a thread for us linuxer's to discuss this new option available to us for encoding. What are your thoughts?
 
Top