AnJoiner / FFmpegCommand

FFmpegCommand适用于Android的FFmpeg命令库,实现了对音视频相关的处理,能够快速的处理音视频,大概功能包括:音视频剪切,音视频转码,音视频解码原始数据,音视频编码,视频转图片或gif,视频添加水印,多画面拼接,音频混音,视频亮度和对比度,音频淡入和淡出效果等
https://juejin.cn/user/1046390797512814/posts
Apache License 2.0
816 stars 153 forks source link

How to attach an image either at the beginning or at the end of a video? #8

Closed NanyangTaiji closed 4 years ago

AnJoiner commented 4 years ago

You can first convert the picture into a video, and then splice the two videos, but you must pay attention to the encoding format of the two videos.

ffmpeg -loop 1 -i img.jpg -c:v libx264 -t 30 -pix_fmt yuv420p 1.mp4
ffmpeg -i contact:1.mp4|2.mp4 -c copy out.mp4