Ste*_*hRT 1 video ffmpeg image image-processing video-processing
嘿,我现在能够通过执行以下命令行从我的MP4视频中获取缩略图:
[Sets Per-file main options time_off start time offset]
|| [The # of start time offsets]
|| || [Sets input video file option]
|| || || [Video file name here]
|| || || || [Sets video option to # of video frames to record]
|| || || || || [Asking for the first frame]
|| || || || || || [Name of the captured video frame]
|| || || || || || ||
\/ \/ \/ \/ \/ \/ \/
ffmpeg -ss 0 -i vidfile.mp4 -vframes 1 frame.png
Run Code Online (Sandbox Code Playgroud)
现在正如我上面所说,这个命令可以很好地生成我的MP3视频第一帧的缩略图.但是,我需要在新创建的帧图像的顶部放置"播放"按钮的叠加图像.
是否有另一个命令,我可以告诉它覆盖另一个图像在frame.png的顶部?
我想要覆盖在框架顶部的图像看起来像这样(一个透明的PNG):
任何帮助都会很棒!谢谢!
这个命令应该为你做的工作:
ffmpeg -ss 30 -i movie.mp4 -i play.png -filter_complex \
"[0:v][1:v]overlay=main_w/2-overlay_w/2:main_h/2-overlay_h/2" \
-vframes 1 output.png
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参阅叠加视频过滤器文档.