ffmpeg로 동영상의 움직이는 GIF 썸네일을 추출하는 방법

ffmpeg로 동영상의 움직이는 썸네일 만들기

동영상에서 특징적인 정적 썸네일들 추출

ffmpeg -y -ss 3 -i <input_video_path> -vf 'select=gt(scene\\,0.1)' -frames:v 10 -vsync vfr -vf fps=fps=1/200 <output_images_path_with_format>

추출한 썸네일을 gif로 인코딩

ffmpeg -y -f image2 -i <output_images_path_with_format> -framerate 1 -vf scale=480:-1:flags=lanczos,setpts=8*PTS <output_gif_path>

위와 중복되는 옵션은 생략합니다.

comments powered by Disqus