Aurora-Hunters / timelapse-maker

Simple application for assembling time lapses. Choose a directory with photos, set FPS and resolution and get a video. Available for Mac, Windows and Linux.
https://auroralights.ru/Программы-для-работы-с-фотографиями/time-lapse-maker-создание-видео-из-фотографий/
16 stars 1 forks source link

Hardware acceleration options #3

Open justdanpo opened 1 year ago

justdanpo commented 1 year ago

Hardware acceleration allows to dramatically reduce encoding time. Please add an option to choose encoder or autodetection of working one (not all encoders ffmpeg reports of actually work on a target machine). List of available encoders may be got from ffmpeg (depends on ffmpeg build):

$ ffmpeg -hide_banner -encoders | grep '(codec h264)'
 V..... libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V..... libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_omx             OpenMAX IL H.264 video encoder (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
 V..... h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
justdanpo commented 11 months ago

Here is how certain encoder may be tested: ffmpeg -f lavfi -i nullsrc=s=320x128:d=0 -c:v h264_amf -f null -

justdanpo commented 3 weeks ago

Пример скрипта, который собирает видео с автодетектом енкодера. Проблема - у разных енкодеров разные наборы опций. Для трёх опробованных (аппаратные Intel/Nvidia + программный) они в скрипте захардкожены, а на остальных скрипт отвалится (так задумано) вместо того, чтоб кодировать с дефолтными настройками https://gist.github.com/justdanpo/da4a046ea587728e2d164957efe7f6ca