VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Looking at the nvenc parameters:
    Code:
    hevc_nvenc AVOptions:
      -preset            <int>        E..V.... Set the encoding preset (from 0 to 11) (default medium)
         default                      E..V.... 
         slow                         E..V.... hq 2 passes
         medium                       E..V.... hq 1 pass
         fast                         E..V.... hp 1 pass
         hp                           E..V.... 
         hq                           E..V.... 
         bd                           E..V.... 
         ll                           E..V.... low latency
         llhq                         E..V.... low latency hq
         llhp                         E..V.... low latency hp
         lossless                     E..V.... lossless
         losslesshp                   E..V.... lossless hp
      -profile           <int>        E..V.... Set the encoding profile (from 0 to 4) (default main)
         main                         E..V.... 
         main10                       E..V.... 
         rext                         E..V.... 
      -level             <int>        E..V.... Set the encoding level restriction (from 0 to 186) (default auto)
         auto                         E..V.... 
         1                            E..V.... 
         1.0                          E..V.... 
         2                            E..V.... 
         2.0                          E..V.... 
         2.1                          E..V.... 
         3                            E..V.... 
         3.0                          E..V.... 
         3.1                          E..V.... 
         4                            E..V.... 
         4.0                          E..V.... 
         4.1                          E..V.... 
         5                            E..V.... 
         5.0                          E..V.... 
         5.1                          E..V.... 
         5.2                          E..V.... 
         6                            E..V.... 
         6.0                          E..V.... 
         6.1                          E..V.... 
         6.2                          E..V.... 
      -tier              <int>        E..V.... Set the encoding tier (from 0 to 1) (default main)
         main                         E..V.... 
         high                         E..V.... 
      -rc                <int>        E..V.... Override the preset rate-control (from -1 to INT_MAX) (default -1)
         constqp                      E..V.... Constant QP mode
         vbr                          E..V.... Variable bitrate mode
         cbr                          E..V.... Constant bitrate mode
         vbr_minqp                    E..V.... Variable bitrate mode with MinQP
         ll_2pass_quality              E..V.... Multi-pass optimized for image quality (only for low-latency presets)
         ll_2pass_size                E..V.... Multi-pass optimized for constant frame size (only for low-latency presets)
         vbr_2pass                    E..V.... Multi-pass variable bitrate mode
      -rc-lookahead      <int>        E..V.... Number of frames to look ahead for rate-control (from -1 to INT_MAX) (default -1)
      -surfaces          <int>        E..V.... Number of concurrent surfaces (from 0 to INT_MAX) (default 32)
      -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                          E..V.... Pick the first device available
         list                         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 auto)
      -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)
      -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                <int>        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)
    I get got a few questions:
    1. What does 'hp' stand for? (used as preset and in the description of some of the presets)
    2. What does 'rext' stand for? (used as profile)
    3. Is the profile mapping like this? (If not, how is it?)
      0 <> none
      1 <> main
      2 <> main10
      3 <> rext
    4. Which level is mapped to which integer? (seeing that the integers go from 0 to 186)
    5. What is the rate control mapping? (seeing that it's mapped from -1 to INT_MAX)
    6. What does '-surfaces' do? (No clue what a surface is in the context of H.264 encoding.)
    7. Is there a way to specify whether to use 8bit or 10bit? (or does it only support 8bit encoding ?)
    8. How to specify the color sampling of the output? (or does it only support 4:2:0 ?)

    Does anyone use the nvenc support of ffmpeg and can answer some of these questions?

    Cu Serlut
    Last edited by Selur; 26th Dec 2016 at 08:05.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  2. Originally Posted by Selur View Post
    Does anyone use the nvenc support of ffmpeg and can answer some of these questions?
    Sorry for no answering for your questions but perhaps you can find answers here https://developer.nvidia.com/ffmpeg .
    Quote Quote  
  3. Still hoping that someone here knows some of it, otherwise I would probably have to spend lots of time on testing and reading source code,...
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  4. Originally Posted by Selur View Post
    Still hoping that someone here knows some of it, otherwise I would probably have to spend lots of time on testing and reading source code,...
    Seem this is best approach - i've used NVENC under ffmpeg but have no answers for most of your questions - was interested only in limited subset of NVENC H.265 functionality - never tried to full map all options exposed by ffmpeg.
    Quote Quote  
  5. "hp" is high performance profile ; not sure if it's implemented in ffmpeg nvenc
    Quote Quote  
  6. 'hp'='high performance' (fast)
    'hq'='high quality' (slow)
    ...etc.

    That much I knew; the rest I had to dig for. I found no help at the nvidia site, so I went to the ffmpeg source code.

    >Which level is mapped to which integer?
    >What is the rate control mapping?
    Profile integers are defined here.
    Rate control integers here.
    (you don't need the integers for command-line use, you know; use the names given)

    >What does 'rext' stand for?
    It says here it's Range Extension profile bitstream.
    I don't know what that means. It seems to be used on the decode side only, anyway.

    >What does '-surfaces' do?
    Don't know, but it sounds like memory allocation. Surfaces in DirectX are blocks of memory you render bitmaps to.
    Last edited by raffriff42; 26th Dec 2016 at 16:34. Reason: rephrase
    Quote Quote  
  7. Thanks raffriff42 Found some info about rext -> http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=9466.

    Does anyone know what the presets do? (atm. I'm inclined to stick with 'hq' or couldn't one use vbr_2pass with it)

    Also is there a way to know which features are supported by the current graphic card (like NVEncC --check-features)?

    vbr_minqp E..V.... Variable bitrate mode with MinQP
    How does one set the minimum quantizer? (I don't see a parameter for it)
    Last edited by Selur; 31st Dec 2016 at 02:44.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  8. I´m trying to stream my desktop with RPT and this command doesn´t work.

    ffmpeg -re -f dshow -i video="screen-capture-recorder" -vcodec nvenc -preset llhq -an -f rtp rtp://192.168.0.1

    It shows

    [nvenc @ 0000007c731bc4a0] No NVENC capable devices found.

    But I´m sure it was working fine last week.
    Quote Quote  
  9. Did you (or Windows) update the GPU driver or did you update to a newer ffmpeg version? Nvidia recently introduced Codec SDK 8.0. Try newer ffmpeg or older GPU driver.
    Quote Quote  
  10. Originally Posted by sneaker View Post
    Did you (or Windows) update the GPU driver or did you update to a newer ffmpeg version? Nvidia recently introduced Codec SDK 8.0. Try newer ffmpeg or older GPU driver.
    If it did, it was during the weekend.

    I´m using a laboratory PC.

    I than updated both windows and nvidia drivers. But nothing changed.

    The 8.0 SDK was already installed.

    Having to go back and forth with drivers and versions would be a real paine...

    Are you sure the command line I used is correct?
    Code:
    ffmpeg -re -f dshow -i video="screen-capture-recorder" -map_metadata -1 -filter:v yadif=0:0:0,setdar=dar=16/9 -r 25 -c:v h264_nvenc -preset hq -profile:v high -level 4.1 -pixel_format yuv420p -movflags +faststart -c:a libmp3lame -ab 256k -y "test_nvenc.mp4"
    or this one?

    Code:
     ffmpeg -re -f -y -rtbufsize 2000M -f gdigrab -framerate 60 -offset_x 0 -offset_y 0 -video_size 1280x1080 -i desktop -c:v nvenc -preset:v fast -an -f  rtp rtp://200.18.98.201
    Since I forgot to save them last week. It might be something wrong.

    The curious part is that this comand line works fine.

    Code:
    ffmpeg -y -rtbufsize 2000M -f gdigrab -framerate 60 -offset_x 0 -offset_y 0 -video_size 1280x1080 -i desktop -c:v nvenc -preset:v fast -pix_fmt nv12 out2.mp4
    Last edited by ThadeuMelo; 22nd May 2017 at 10:18. Reason: Aditional information
    Quote Quote  
  11. Try something like this UHD example - AFAIR it works correctly with gtx1080ti card i've had in my former workplace.
    Code:
    ffmpeg -re -y -hide_banner -loglevel 32 -i %source% -an -c:v nvenc_hevc -preset:v fast -profile:v main -level:v 5.1 -tier:v main -cbr 0 -flags +cgop -b:v 38M -maxrate:v 40M-1 -minrate:v 1K -bufsize:v 20M-1 -qmin:v 4 -qmax:v 69 -refs:v 5 -g 50 -vf "pad=3840:2160:(ow-iw)/2:(oh-ih)/2,fps=fps=50,setpts=N/(50*TB)" -f mpegts - | ffplay -hide_banner -loglevel 32 -i -
    Quote Quote  
  12. Originally Posted by pandy View Post
    Try something like this UHD example - AFAIR it works correctly with gtx1080ti card i've had in my former workplace.
    Code:
    ffmpeg -re -y -hide_banner -loglevel 32 -i %source% -an -c:v nvenc_hevc -preset:v fast -profile:v main -level:v 5.1 -tier:v main -cbr 0 -flags +cgop -b:v 38M -maxrate:v 40M-1 -minrate:v 1K -bufsize:v 20M-1 -qmin:v 4 -qmax:v 69 -refs:v 5 -g 50 -vf "pad=3840:2160:(ow-iw)/2:(oh-ih)/2,fps=fps=50,setpts=N/(50*TB)" -f mpegts - | ffplay -hide_banner -loglevel 32 -i -
    I cross compiled another version and it seems to be working fine again.

    The curious part is that the performance is not matching what I could get with libx264.

    Also, -preset llhq is faster than -preset ll

    Code:
    ffmpeg -re -f dshow -i video="screen-capture-recorder" -vcodec nvenc_h264 -preset llhq -an -f rtp rtp://192.168.0.1:20000
    Quote Quote  
  13. Originally Posted by ThadeuMelo View Post

    I cross compiled another version and it seems to be working fine again.
    That`s why you should always check ffmpeg build capabilities.

    Originally Posted by ThadeuMelo View Post
    The curious part is that the performance is not matching what I could get with libx264.

    Also, -preset llhq is faster than -preset ll

    Not sure what you expected - gk104 is quite old and this is first rev of the nvenc engine, newer nvenc are usually significantly faster than older.
    IMHO fastest should be fixed quantizer mode and intra only but not if it works correctly trough nvidia api.
    Quote Quote  
  14. Originally Posted by pandy View Post
    Originally Posted by ThadeuMelo View Post

    I cross compiled another version and it seems to be working fine again.
    That`s why you should always check ffmpeg build capabilities.

    Originally Posted by ThadeuMelo View Post
    The curious part is that the performance is not matching what I could get with libx264.

    Also, -preset llhq is faster than -preset ll

    Not sure what you expected - gk104 is quite old and this is first rev of the nvenc engine, newer nvenc are usually significantly faster than older.
    IMHO fastest should be fixed quantizer mode and intra only but not if it works correctly trough nvidia api.
    Thank you.

    We will probably be using Tesla M60 in production (Azure or AWS). But we should try to squeezy every drop of performance.

    I´m a little new to this tool and encoders.

    Are there any parameters I could change for even faster encoding?

    I´m trying to reduce the resolution that is captured but I can´t find the right syntax.

    However, the ideal solution is to capture the game (unreal 4) frame buffer or its window - just like OBS.
    Quote Quote  
  15. Originally Posted by raffriff42 View Post
    'hp'='high performance' (fast)
    'hq'='high quality' (slow)
    ...etc.

    That much I knew; the rest I had to dig for. I found no help at the nvidia site, so I went to the ffmpeg source code.

    >Which level is mapped to which integer?
    >What is the rate control mapping?
    Profile integers are defined here.
    Rate control integers here.
    (you don't need the integers for command-line use, you know; use the names given)

    >What does 'rext' stand for?
    It says here it's Range Extension profile bitstream.
    I don't know what that means. It seems to be used on the decode side only, anyway.

    >What does '-surfaces' do?
    Don't know, but it sounds like memory allocation. Surfaces in DirectX are blocks of memory you render bitmaps to.

    LLQP is only 10% faster than LLHQ and wierd enough LL has the biggest latency in my setup - GTX 760.
    Image Attached Thumbnails Click image for larger version

Name:	Captura_cross_NVENC_LL.png
Views:	578
Size:	296.9 KB
ID:	41711  

    Click image for larger version

Name:	Captura_cross_NVENC_LLHP.png
Views:	844
Size:	344.5 KB
ID:	41712  

    Click image for larger version

Name:	Captura_cross_NVENC_LLHQ.png
Views:	785
Size:	273.9 KB
ID:	41713  

    Last edited by ThadeuMelo; 25th May 2017 at 19:36. Reason: Removing attached images that are too big
    Quote Quote  



Similar Threads

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