Skip to content

Instantly share code, notes, and snippets.

@rubnet
Last active May 19, 2019 14:08
Show Gist options
  • Save rubnet/c56edfe1e65428ed24fd95dfaff78c6f to your computer and use it in GitHub Desktop.
Save rubnet/c56edfe1e65428ed24fd95dfaff78c6f to your computer and use it in GitHub Desktop.
合并 bilibili 安卓 客户端 下载文件 cd 到要合并的av号目录下运行
#!/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