2020年7月5日日曜日

FFmpeg スタビライザー

FFmpeg スタビライザー -vf オプション

基本の例 ffmpegヘルプから
ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
ffmpeg -i input -vf vidstabdetect=show=1  dummy.avi

[ve1f8] Fieldsize: 112, Maximal translation: 154 pixel
[ve1f8] Number of used measurement fields: 65 out of 65
[ve1f8] Fieldsize: 32, Maximal translation: 32 pixel
[ve1f8] Number of used measurement fields: 392 out of 392
[P002524782ad40] Video stabilization settings (pass 1/2):
[P002524782ad40]      shakiness = 5
[P002524782ad40]       accuracy = 15
[P002524782ad40]       stepsize = 6
[P002524782ad40]    mincontrast = 0.250000
[P002524782ad40]         tripod = 0
[P002524782ad40]           show = 0
[P002524782ad40]         result = transforms.trf


他の例
ffmpeg -i i.mp4 -c:v hevc_qsv -vf vidstabdetect=shakiness=5:show=1  o.mp4
ffmpeg -i i.mp4 -c:v hevc_qsv -b:v 15984K -vf vidstabdetect  o.mp4

end

2020年7月3日金曜日

FFmpeg NVIDIA NVENC -b_ref_mode

NVIDIA NVENC -b_ref_mode 確認

ffmpeg -i input.mp4 -c:v hevc_nvenc -b_ref_mode 2 out.mp4


https://developer.nvidia.com/video-encode-decode-gpu-support-matrix


GTX1650 TU117 HEVC B Frame support なし
-b_ref_mode 1  エラー あり
Each B frame as referencd is not supported


-b_ref_mode 2  エラー あり
Each B frame as referencd is not supported


GTX1660 TU116 HEVC B Frame support あり
-b_ref_mode 1  エラー
Each B frame as referencd is not supported
-b_ref_mode 2  エラーなし


GTX1660TI TU116 HEVC B Frame support あり
-b_ref_mode 1  エラーあり
Each B frame as referencd is not supported

-b_ref_mode 2  エラーなし



参考
ffmpeg -encoders | find "NVIDIA"

hevc_nvenc AVOptions: 確認
ffmpeg -h encoder=hevc_nvenc



end