Add support for software video encoding with '-encoder cpu' option, currently h264 only

This commit is contained in:
dec05eba
2024-07-04 01:35:03 +02:00
parent ea7b58d7f9
commit 62d61fda12
21 changed files with 686 additions and 171 deletions

13
TODO
View File

@@ -139,3 +139,16 @@ Support selecting which gpu to use. This can be done in egl with eglQueryDevices
Maybe on glx (nvidia x11 nvfbc) we need to use __NV_PRIME_RENDER_OFFLOAD_PROVIDER and __GLX_VENDOR_LIBRARY_NAME instead.
Remove is_damaged and clear_damage and return a value from capture function instead that states if the image has been updated or not.
Test install intel-hybrid-codec-driver-git for vp8 encoding on intel.
When adding support for steam deck, add option to send video to another computer.
New gpu screen recorder gui should have the option to cut the video directly, maybe running an ffmpeg command or implementing that ourselves. Only support gpu screen recorder video files.
Add hdr metadata to encoder settings metadata.
Check if is software renderer by using eglQueryDisplayAttribEXT(egl_display, EGL_DEVICE_EXT..) eglQueryDeviceStringEXT(egl_device, EGL_EXTENSIONS) and check for "EGL_MESA_device_software".
Use MapTexture2DINTEL for software encoding on intel.
To test vulkan encode on amd set the environment variable RADV_PERFTEST=video_encode before running a program that uses vulkan encode (or queries for it, such as vulkaninfo).
Support hevc/av1 for software encoder and hdr support at the same time. Need support for yuv420p shader for that. Use libx265 for hevc and libsvtav1 for av1 (libsvtav1 is the fastest software av1 video encoder). Also support vp8/vp9 since we are not limited by hardware.