Skip to content

Instantly share code, notes, and snippets.

@printempw printempw/
Last active May 18, 2020

What would you like to do?
使用 ffmpeg 拼接 Bilibili 客户端所下载的分段 flv 视频,
# @Author: printempw
# @Date: 2017-05-13 17:54:48
# @Last Modified by: printempw
# @Last Modified time: 2017-05-13 21:37:41
cat /dev/null > ff.txt
# 防止变成 1、10、2、3 这样的顺序
for i in `ls -1 *.flv | sort -n`; do
echo "file '${i}'" >> ff.txt;
# 调用 ffmpeg 生成拼接后的视频
ffmpeg -f concat -i ff.txt -c copy ../output.mp4
rm ff.txt
printf "success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.