Skip to content

Instantly share code, notes, and snippets.

@wjch
Forked from quxiaowei/bilibili.zsh
Created May 24, 2016 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wjch/06c1f838d03255c044754c5840e8d568 to your computer and use it in GitHub Desktop.
Save wjch/06c1f838d03255c044754c5840e8d568 to your computer and use it in GitHub Desktop.
从哔哩哔哩下载剧,并将视屏片段合并 需要:youtube-dl, ffmpeg
for i in {1..12}
do
url=http://www.bilibili.com/video/av3794937/index_$i.html
echo $url
youtube-dl -o "SeGmEnT-$i-%(playlist_index)s.%(ext)s" $url
rm -f buffer_list
touch buffer_list
for file in $(ls SeGmEnT-$i-*.flv)
do
echo file "'$file'" >> buffer_list
done
ffmpeg -f concat -i buffer_list -c copy $i.mkv
done
rm -f buffer_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment