Announcement

Collapse
No announcement yet.

Using NVIDIA's NVENC On Linux With FFmpeg

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Brainiarc7
    replied
    Originally posted by tuke81 View Post
    Does anyone have 2nd generation maxwell(gtx980/970/960), nvenc 5.0 sdk have now h265 support. Well I'm quite sure it won't work with ffmpeg yet but I'm a bit curious how it works with samples bundled with sdk.

    I've tested the latest ffmpeg version (git) with a Maxwell Gen 2 GTX 980M and NVENC for H.264 and H.265/HEVC is working just fine.

    Leave a comment:


  • tuke81
    replied
    Does anyone have 2nd generation maxwell(gtx980/970/960), nvenc 5.0 sdk have now h265 support. Well I'm quite sure it won't work with ffmpeg yet but I'm a bit curious how it works with samples bundled with sdk.

    Leave a comment:


  • pinguinpc
    replied
    As commented before this is some tests using low latency high quality and high quality preset compared to actual bitrate used 5750k


    NVENC 5750k


    NVENC High Quality Preset




    NVENC Low Latency High Quality Preset


    Leave a comment:


  • pinguinpc
    replied
    Originally posted by tuke81 View Post
    Have you tried different presets? i.e. -c:v nvenc -preset llhq. Presets are
    hq = high quality (I think libnvenc uses this)
    hp = high performance
    bd = Bluray Disk
    ll = low latency
    llhq = low latency high quality
    llhp = low latency high performance
    default = between llhq and llhp, I suppose it's same as ll

    You can also use 2 pass with low latency presets too, with option -2pass 1. I'm not sure are all presets supported by kepler cards though.
    I test llhp and hp and quality still very similar, however nvenc go up bitrate meanwhile time are passed for example begins around 3000k but at 10 to 15 bitrate up considerably normally stay around 5000k to 6000k

    Quality stay similar to actual bitrate 5750k for lastest videos

    Maybe more later upload some videos about this

    Leave a comment:


  • tuke81
    replied
    Have you tried different presets? i.e. -c:v nvenc -preset llhq. Presets are
    hq = high quality (I think libnvenc uses this)
    hp = high performance
    bd = Bluray Disk
    ll = low latency
    llhq = low latency high quality
    llhp = low latency high performance
    default = between llhq and llhp, I suppose it's same as ll

    You can also use 2 pass with low latency presets too, with option -2pass 1. I'm not sure are all presets supported by kepler cards though.

    Leave a comment:


  • pinguinpc
    replied
    Something more when record in 60fps with ffmpeg libnvenc, NVENC unit stay around 22 to 28% of use in 64bit Mint

    https://www.youtube.com/watch?v=Cpy3uEeoPTE

    And with ffmpeg 2.5 nvenc, NVENC unit stay around 27 to 34% (depend game) of use in 64bit



    Also have specific NVENC videos on my theme on gamersonlinux

    Leave a comment:


  • pinguinpc
    replied
    Originally posted by tuke81 View Post
    Hmh there's seems to be new nvenc encoder on ffmeg github:
    http://ffmpeg.org/doxygen/trunk/nvenc_8c.html
    https://github.com/FFmpeg/FFmpeg/blo...vcodec/nvenc.c

    Is this somewhat different than libnvenc?
    Hi i tested FFMPEG master and nvenc works similar to libnvenc with some diferences


    For example before use this command

    ffmpeg -f x11grab -r 60 -s 1024x768 -i :0.0 -vcodec libnvenc -b:v 5750k /media/linuxdesktopx86/CA98D46898D45513/Por-Encodificar/mmfxt5750k.mkv

    and now

    ffmpeg -f x11grab -r 60 -s 1024x768 -i :0.0 -vcodec nvenc -b:v 5750k /media/linuxdesktopx86/CA98D46898D45513/Por-Encodificar/mmfxt5750k.mkv


    In tests with libnvenc at 30fps normally use NVENC unit around 12% in 64bit Mint

    https://www.youtube.com/watch?v=Uw8CHnByxs8


    With ffmpeg nvenc, NVENC unit up use to 15 to 18% (depend game) in 64bit Mint




    But main change in my tests is this, when use libnvenc on 32bit Mint appears slowdown error related swscaler but now with ffmpeg nvenc this error gone and have better performance in 32bit Mint

    https://www.youtube.com/watch?v=ytnIzVet8Y4

    In my youtube channel appears more test with this FFMPEG nvenc (actually used for screencasting)

    All videos uploaded after FFMPEG 2.5 nvenc test stay recorded with this FFMPEG 2.5 nvenc

    Leave a comment:


  • tuke81
    replied
    Hmh there's seems to be new nvenc encoder on ffmeg github:
    http://ffmpeg.org/doxygen/trunk/nvenc_8c.html
    https://github.com/FFmpeg/FFmpeg/blo...vcodec/nvenc.c

    Is this somewhat different than libnvenc?

    Leave a comment:


  • kenjitamura
    replied
    Originally posted by stqn View Post
    Too bad that NVENC, at least on a GTX 680, seems to produce extremely low quality encodes…
    (Based on this article in French: http://www.hardware.fr/focus/67/enco...quicksync.html and more specifically this comparison: http://www.hardware.fr/marc/h264nven...?inception720a (you can click on the buttons at the bottom to compare NVENC with x264 veryfast for example))
    Wow, the only one of the non source outputs that looked like anywhere near an acceptable loss in quality was the 2 pass x264 veryfast. Everything else just looked atrocious. Looks like all these hardware based encoding API's still fall flat which is the same verdict I remember the tech sites came to when I read up on the results a few years ago.

    Leave a comment:


  • Brainiarc7
    replied
    Notes

    Originally posted by ubuntuaddicted View Post
    I'm trying to get ffmpeg to compile with libnvenc enabled but i'm failing miserably. as per instructions i found on the dark net (joke) i downloaded the "windows" NVENC SDK which was available at https://developer.nvidia.com/nvidia-video-codec-sdk. (note i read that i needed the windows version of the sdk for whatever reason) I extract the nvEncodeAPI.h header file and make my PKGBUILD see it but ffmpeg is choking on opencl portion of the ffmpeg libraries. It probably doesn't help that I am very new to Arch linux, this is the first PKGBUILD I've ever created and the fact that I don't know C+ makes this all very complex. I was getting some help from someone over IRC but basically we think that the person here https://github.com/Brainiarc7/ffmpeg_libnvenc got it to work in Ubuntu 14.04 because his opencl libraries are out of date so it works. I'm trying to build it in Arch which has mostly up to date packages. If anyone is able to assist me in getting my PKGBUILD to work I would great appreciate it. Thanks..

    here's my makepkg -L log: https://clbin.com/bIeUI

    and here's the PKGBUILD: https://clbin.com/NNno7

    NOTE: the end goal is to use ffmpeg w/ libnvenc enabled to encode video for either local recordings and or livestreaming to a rtmp server using simplescreenrecorder or even make obs-studio use libnvenc as well. Not sure about kdenlive using it since melt is involved there and as I said I'm not a programmer
    Hey dude,

    It worked out of the box because I installed NVIDIA CUDA 6.5 toolkit which comes with OpenCL headers that are installed globally -)

    Secondly, you'll need to install OpenCL-1.2 headers from the AUR. Search for the package and you'll see that ffmpeg-full (On AUR, comes with --enable-opencl turned on by default) lists it as a build dependency.

    Good luck, man.

    Leave a comment:

Working...
X