Skip to content

Instantly share code, notes, and snippets.

@lextra2
Last active October 21, 2025 08:42
Show Gist options
  • Select an option

  • Save lextra2/f40641bdb3385ec7a986eed74f45c564 to your computer and use it in GitHub Desktop.

Select an option

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
}
}
}
}
@lextra2
Copy link
Author

lextra2 commented Sep 9, 2025

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

@lextra2
Copy link
Author

lextra2 commented Sep 16, 2025

NVEnc by rigaya
Docs

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

@lextra2
Copy link
Author

lextra2 commented Oct 9, 2025

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

@lextra2
Copy link
Author

lextra2 commented Oct 21, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment