Last active
December 14, 2020 15:14
-
-
Save prinsss/1bc29da99b238d68e87af874f898f435 to your computer and use it in GitHub Desktop.
使用 ffmpeg 拼接 Bilibili 客户端所下载的分段 flv 视频,https://blessing.studio/use-ffmpeg-to-concat-flv-videos-downloaded-by-bilibili-client/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @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; | |
done | |
# 调用 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