Looking at the nvenc parameters:
I get got a few questions: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)
- What does 'hp' stand for? (used as preset and in the description of some of the presets)
- What does 'rext' stand for? (used as profile)
- Is the profile mapping like this? (If not, how is it?)
0 <> none
1 <> main
2 <> main10
3 <> rext- Which level is mapped to which integer? (seeing that the integers go from 0 to 186)
- What is the rate control mapping? (seeing that it's mapped from -1 to INT_MAX)
- What does '-surfaces' do? (No clue what a surface is in the context of H.264 encoding.)
- Is there a way to specify whether to use 8bit or 10bit? (or does it only support 8bit encoding ?)
- 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
+ Reply to Thread
Results 1 to 15 of 15
-
Last edited by Selur; 26th Dec 2016 at 08:05.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Sorry for no answering for your questions but perhaps you can find answers here https://developer.nvidia.com/ffmpeg .
-
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 -
'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
-
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 MinQPLast edited by Selur; 31st Dec 2016 at 02:44.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
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. -
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"
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
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
-
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
-
That`s why you should always check ffmpeg build capabilities.
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. -
Last edited by ThadeuMelo; 25th May 2017 at 19:36. Reason: Removing attached images that are too big
Similar Threads
-
Use NVENC & FFMPEG on Premiere Pro
By haneef95 in forum EditingReplies: 3Last Post: 7th Nov 2016, 09:31 -
ffmpeg nvidia-gpu-accelerated encoding using NVENC - commandline settings
By hydra3333 in forum Video ConversionReplies: 3Last Post: 7th Sep 2016, 09:11 -
Blackmagic UltraStudio SDI & ffmpeg + Nvenc
By vedroide2e4 in forum Video ConversionReplies: 25Last Post: 7th Apr 2016, 01:39 -
nvenc hevc
By madhatr in forum Video ConversionReplies: 4Last Post: 19th Dec 2015, 18:07 -
ffmpeg with '--enable-nvenc'
By Selur in forum Video ConversionReplies: 1Last Post: 13th Jan 2015, 06:45