ffmpeg操作

#不转换将flv转为mp4
ffmpeg -i input.flv -vcodec copy -acodec copy output.mp4

# 截取视频片段
ffmpeg -i bj.mp4 -ss 0:00 -t 12 bjnew.mp4

# 合并视频
ffmpeg -f concat -safe 0 -i filelis1t.txt -c copy djt.mp4

  # filelis1t.txt示例
    file 'C:\vdown\20220211085421.mp4'
    file 'C:\vdown\20220211085452.mp4'
    file 'C:\vdown\20220211085530.mp4'
    file 'C:\vdown\20220211085609.mp4'

# 查看视频信息
ffprobe -i piant.mp4 -show_streams -select_streams a

# 无声音的视频添加一段空白音轨,解决以无声音视频为首段进行视频合并而无声音的问题
ffmpeg -i piant.mp4 -f lavfi -i anullsrc=cl=mono:r=44100 -shortest -y piantnew.mp4
ffmpeg -i menu.mp4 -f lavfi -i anullsrc=cl=mono:r=44100 -shortest -y menunew.mp4

# 将图片转换为固定时长的视频(-t参数指定时长)
ffmpeg -f image2 -r 25 -loop 1 -i C:\vdown\erhu\piant.jpg -t 8 piant.mp4
ffmpeg -f image2 -r 25 -loop 1 -i C:\vdown\erhu\menu.jpg -t 10 menu.mp4

发表回复

您的电子邮箱地址不会被公开。