-
-
Save lextra2/f40641bdb3385ec7a986eed74f45c564 to your computer and use it in GitHub Desktop.
| https://github.com/GPUOpen-LibrariesAndSDKs/AMF/tree/master/amf/public/include/components | |
| https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/doc/AMF_Video_Encode_HEVC_API.md | |
| https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/doc/AMF_Video_PreAnalysis_API.md | |
| OBS | |
| https://github.com/obsproject/obs-studio/blob/master/plugins/obs-ffmpeg/texture-amf.cpp | |
| --------------------------------------------------------------------------------------------------------- | |
| https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/439#issuecomment-1917886326 | |
| https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/417#issuecomment-2040289753 | |
| { | |
| "description": "VirtualDub external encoder profile collection", | |
| "externalEncoders": { | |
| "sets": { | |
| "ProRes": { | |
| "videoEncoder": "ProRes", | |
| "audioEncoder": "", | |
| "multiplexer": "", | |
| "description": "", | |
| "extension": "", | |
| "processPartial": true, | |
| "useOutputAsTemp": false | |
| }, | |
| "ProRes Q4": { | |
| "videoEncoder": "ProRes Q4", | |
| "audioEncoder": "", | |
| "multiplexer": "", | |
| "description": "", | |
| "extension": "", | |
| "processPartial": true, | |
| "useOutputAsTemp": false | |
| } | |
| }, | |
| "profiles": { | |
| "ProRes": { | |
| "name": "ProRes", | |
| "program": "ffmpeg.exe", | |
| "commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v prores_ks -pix_fmt yuv420p10le %(tempvideofile)", | |
| "outputFilename": "%(outputname).mov", | |
| "type": 0, | |
| "pixelFormat": "yuv444p16le", | |
| "inputFormat": 0, | |
| "checkReturnCode": true, | |
| "logStdout": true, | |
| "logStderr": true, | |
| "bypassCompression": false, | |
| "predeleteOutputFile": false | |
| }, | |
| "ProRes Q4": { | |
| "name": "ProRes Q4", | |
| "program": "ffmpeg.exe", | |
| "commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v prores_ks -q:v 4 -pix_fmt yuv420p10le %(tempvideofile)", | |
| "outputFilename": "%(outputname).mov", | |
| "type": 0, | |
| "pixelFormat": "yuv444p16le", | |
| "inputFormat": 0, | |
| "checkReturnCode": true, | |
| "logStdout": true, | |
| "logStderr": true, | |
| "bypassCompression": false, | |
| "predeleteOutputFile": false | |
| } | |
| } | |
| } | |
| } |
Important NVenc settings
AVC
lookaheadDepth=32 useBFramesAsRef=1
HEVC
lookaheadLevel=3 lookaheadDepth=32
Note: NV_ENC_LOOKAHEAD_LEVEL_0 has the highest performance,
while NV_ENC_LOOKAHEAD_LEVEL_3 has the highest quality. It increases bitrate significantly and should not be used.
useBFramesAsRef=
=1 Any B-frame can be a reference frame
=2 Halved - Uses the following logic:
4 B-frames = 2 reference frames
3 B-frames = 1 reference frame
2 B-frames = 1 reference frame
1 B-frame = 1 reference frame <-- untested, but should be logical to clamp to 1
Show all supported encoders in FFMPEG:
ffmpeg -encoders
Show all encoder options:
ffmpeg -h encoder=hevc_nvenc
Lossless: NVenc
ffmpeg -y -benchmark -i INPUT.mkv -c:v hevc_nvenc -tune lossless -pix_fmt p010le -an OUTPUT.mkv
Almost Lossless: Apple ProRes 422 High Quality
ffmpeg -y -benchmark -i INPUT.mkv -c:v prores_ks -q:v 0 -profile:v 3 -bits_per_mb 1024 -vendor apl0 -pix_fmt yuv422p10le 1024.mov
Note:-bits_per_mb can go up to 8192. Higher = less lossy.
Lossless: UT Video
ffmpeg -y -benchmark -i INPUT.mkv -c:v utvideo -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range tv OUTPUT.mkv
AV1 Basically lossless settings:
ffmpeg -y -benchmark -i INPUT.mkv -c:v libsvtav1 -svtav1-params "enable-tf=0:mbr=10M:tile-columns=2:tile-rows=0" -g 240 -qp 14 -preset 4 -pix_fmt yuv420p10le SVT_AV1.mkv
Libaom AV1 settings:
ffmpeg -y -benchmark -i TEST.mkv -c:v libaom-av1 -pix_fmt yuv420p10le -g 240 -cpu-used 4 -auto-alt-ref 0 -aq-mode 0 -tile-columns 2 -tile-rows 0 -row-mt 1 -crf 16 -pass 1 libaom-pass1.webm
ffmpeg -y -benchmark -i TEST.mkv -c:v libaom-av1 -pix_fmt yuv420p10le -g 240 -cpu-used 4 -auto-alt-ref 0 -aq-mode 0 -tile-columns 2 -tile-rows 0 -row-mt 1 -crf 16 -pass 2 libaom-pass2.webm
High Quality Example:
NVEncC64.exe --codec hevc --cqp 18 --preset p7 --output-depth 10 --lookahead 32 --ref 8 --split-enc forced_2 --colormatrix bt709 --colorprim bt709 --transfer bt709 --colorrange limited -i INPUT.mkv -o OUTPUT.mkv
190 FPS with 2560x1440 input from the RTX 5070 Ti
Lossless:
NVEncC64.exe --lossless --colormatrix bt709 --colorprim bt709 --transfer bt709 --colorrange limited -i INPUT.mkv -o OUTPUT_Lossless-avc.mkv
ffmpeg -y -benchmark -i TEST.mkv -c:v libx264 -x264-params "ref=8:keyint=240:bframes=3:b-adapt=2:rc-lookahead=60:aq-mode=3:me=umh:merange=24:subme=9:trellis=2:lookahead-threads=2:threads=16" -crf 14 -pix_fmt yuv420p10le AVC_14.mkv
Important AMD encoder settings
PASceneChangeDetectionEnable=false PALookAheadBufferDepth=41 MaxNumRefFrames=4PASceneChangeDetectionEnable=false(default=true) - adaptive I-frames, Scenecut, requires LookaheadAdaptiveMiniGOP=true(default=true) - adaptive B-frames, B-adapt, requires LookaheadBReferenceEnable=true(default=true) - Use B-frames as Reference framesMaxNumRefFrames=4=4 for High 4.2 Profile (1920x1080@60)