Coder Social home page Coder Social logo

bilibili's Introduction

Bilibili

下载B站视频到本地

2018-11-2

由于原先使用多线程下载仍然感觉有点慢,且时常会卡住,因此修改为多进程版本进行下载,速度明显提升。
默认使用5个进程进行下载,可以根据需要下载的视频总数和电脑性能自行修改。 下载过程可能偶尔会出现卡住现象,按回车键即可唤醒进程。

2018-11-8

增加合并flv片段为mp4文件的方法

代码完整的运行方法:

  1. 修改bilibili.py中的 aid 参数为你想要下载的视频编号,视频编号可在对应视频url尾部找到,
    https://www.bilibili.com/video/av6538245
    对应的视频编号为6538245。

  2. 运行 bilibili.py 文件,该文件会在当前文件夹下创建对应的视频存储目录,并且将aid对应的
    视频的所有视频片段下载到本地。默认启用5个进程进行下载,可以修改bilibili.py文件中的process_count
    参数进行调整。

  3. 待所有视频都已下载完成之后,修改merge_flv.py文件中的 root_dir 参数为你刚刚下载视频时自动
    创建的那个根目录文件名,然后运行merge_flv.py文件。该文件会把同为一个视频的flv视频片段文件合并
    成mp4文件并保存在同一文件夹下。

bilibili's People

Contributors

1033020837 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.