Last active
May 19, 2019 14:08
-
-
Save rubnet/c56edfe1e65428ed24fd95dfaff78c6f to your computer and use it in GitHub Desktop.
合并 bilibili 安卓 客户端 下载文件 cd 到要合并的av号目录下运行
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
#!/bin/bash | |
# ffmpeg -safe 0 -f concat -i list.txt -c copy ../lua.flv.bili2api.80_remux.mp4 | |
for num in $(pwd)/*; do | |
if [ -d $num ]; then | |
cd "$num/lua*" | |
if [ -f list.txt ]; then | |
unlink list.txt | |
fi | |
for file in ./*lv ; do | |
if [ -f $file ] ; then | |
echo "file $file" >> list.txt | |
fi | |
done | |
cat list.txt|sort > list.txt | |
ffmpeg -safe 0 -f concat -i ./list.txt -c copy "../${PWD##*/}_remux.mp4" | |
if ! [ -f "../${PWD##*/}_remux.mp4" ]; then | |
echo "no $num" | |
if [ -f list.txt ]; then | |
unlink list.txt | |
fi | |
for file in ./*lv ; do | |
if [ -f $file ] ; then | |
echo "file $file" >> list.txt | |
fi | |
done | |
ffmpeg -safe 0 -f concat -i ./list.txt -c copy "../${PWD##*/}_remux.mp4" | |
fi | |
#unlink list.txt | |
cd ../../ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment