Skip to content

Instantly share code, notes, and snippets.

@quxiaowei
Last active February 23, 2017 01:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save quxiaowei/cb8c377f64e5907b69cc739aeed94c34 to your computer and use it in GitHub Desktop.
Save quxiaowei/cb8c377f64e5907b69cc739aeed94c34 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
@vus520
Copy link

vus520 commented May 24, 2016

youtube-dl get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment