Created
September 19, 2024 12:36
-
-
Save nico-lab/b0128d195c985d72f4ecde153cd52021 to your computer and use it in GitHub Desktop.
ffmpeg -h encoder=h264_vulkan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Encoder h264_vulkan [H.264/AVC (Vulkan)]: | |
General capabilities: dr1 delay hardware | |
Threading capabilities: none | |
Supported hardware devices: vulkan | |
Supported pixel formats: vulkan | |
h264_vulkan AVOptions: | |
-idr_interval <int> E..V....... Distance (in I-frames) between key frames (from 0 to INT_MAX) (default 0) | |
-b_depth <int> E..V....... Maximum B-frame reference depth (from 1 to INT_MAX) (default 1) | |
-async_depth <int> E..V....... Maximum processing parallelism. Increase this to improve single channel performance. (from 1 to 64) (default 2) | |
-qp <int> E..V....... Use an explicit constant quantizer for the whole stream (from -1 to 255) (default -1) | |
-quality <int> E..V....... Set encode quality (trades off against speed, higher is faster) (from 0 to INT_MAX) (default 0) | |
-rc_mode <int> E..V....... Select rate control type (from 0 to UINT32_MAX) (default auto) | |
auto 4294967295 E..V....... Choose mode automatically based on parameters | |
driver 0 E..V....... Driver-specific rate control | |
cqp 1 E..V....... Constant quantizer mode | |
cbr 2 E..V....... Constant bitrate mode | |
vbr 4 E..V....... Variable bitrate mode | |
-tune <int> E..V....... Select tuning type (from 0 to INT_MAX) (default default) | |
default 0 E..V....... Default tuning | |
hq 1 E..V....... High quality tuning | |
ll 2 E..V....... Low-latency tuning | |
ull 3 E..V....... Ultra low-latency tuning | |
lossless 4 E..V....... Lossless mode tuning | |
-usage <flags> E..V....... Select usage type (default 0) | |
default E..V....... Default optimizations | |
transcode E..V....... Optimize for transcoding | |
stream E..V....... Optimize for streaming | |
record E..V....... Optimize for offline recording | |
conference E..V....... Optimize for teleconferencing | |
-content <flags> E..V....... Select content type (default 0) | |
default E..V....... Default content | |
camera E..V....... Camera footage | |
desktop E..V....... Screen recording | |
rendered E..V....... Game or 3D content | |
-profile <int> E..V....... Set profile (profile_idc and constraint_set*_flag) (from -99 to 65535) (default -99) | |
constrained_baseline 578 E..V....... | |
main 77 E..V....... | |
high 100 E..V....... | |
high444p 110 E..V....... | |
-level <int> E..V....... Set level (level_idc) (from -99 to 255) (default -99) | |
1 10 E..V....... | |
1.1 11 E..V....... | |
1.2 12 E..V....... | |
1.3 13 E..V....... | |
2 20 E..V....... | |
2.1 21 E..V....... | |
2.2 22 E..V....... | |
3 30 E..V....... | |
3.1 31 E..V....... | |
3.2 32 E..V....... | |
4 40 E..V....... | |
4.1 41 E..V....... | |
4.2 42 E..V....... | |
5 50 E..V....... | |
5.1 51 E..V....... | |
5.2 52 E..V....... | |
6 60 E..V....... | |
6.1 61 E..V....... | |
6.2 62 E..V....... | |
-coder <int> E..V....... Entropy coder type (from 0 to 1) (default cabac) | |
cabac 1 E..V....... | |
vlc 0 E..V....... | |
-units <flags> E..V....... Set units to include (default aud+identifier+timing+recovery+a53_cc) | |
aud E..V....... Include AUD units | |
identifier E..V....... Include encoder version identifier | |
timing E..V....... Include timing parameters (buffering_period and pic_timing) | |
recovery E..V....... Include recovery points where appropriate | |
a53_cc E..V....... Include A/53 caption data |
Sometimes the same command produces an error, sometimes it does not.
Keyframes can be specified with -force_key_frames
-hwaccel vulkan
can be used for HW decoding assistance.
ffmpeg -init_hw_device vulkan=vkdev:0 -filter_hw_device vkdev -f lavfi -i testsrc2 -t 10 -filter:v "format=nv12,hwupload" -c:v h264_vulkan -qp 20 -g 100 out.mp4
ffmpeg -init_hw_device vulkan=vkdev:0 -filter_hw_device vkdev -f lavfi -i testsrc2 -t 10 -filter:v "format=nv12,hwupload" -c:v h264_vulkan -qp 20 -force_key_frames "expr:gte(t,n_forced*5)" out.mp4
ffmpeg -hwaccel vulkan -init_hw_device vulkan=vkdev:0 -filter_hw_device vkdev -i "h264.mp4" -filter:v "format=nv12,hwupload" -c:v h264_vulkan -qp 20 -g 100 -c:a copy out.mp4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you share one example? I'm only getting errors