Git Product home page Git Product logo

bili-video-merger's Introduction

bili-video-merger

此工具用于将B站缓存视频的video.m4s和audio.m4s整合为一个文件,使用FFmpeg.wasm开发

简介

BiliBili(以下简称B站)为了防止通过缓存的方式盗取视频,是将视频画面文件(video.m4s)和视频音轨文件(audio.m4s)分开传输的。
而现如今,更多的人在移动端上使用B站,有在B站软件外观看B站离线视频的需求,却没有一个便捷的方式整合两个文件,FFmpeg上手门槛又相对较高,故而有了本项目。

示例页面:https://bilitool.lie.moe

依赖

此项目基于FFmpeg.wasm开发,已适配绝大多数现代浏览器。

使用方法

仅需部署本项目后,打开网站,根据提示操作即可,就算是菜鸟小白亦可轻易使用。

一些说明

本项目使用 Vercel* 搭建,您可以Fork本仓库后访问 Vercel 使用GitHub登录并导入您的Fork仓库在根目录创建Project。

为什么要使用Vercel?

@ffmpeg/core在编译FFmpeg时,配置了pthreads,导致产生的js胶水代码中使用了SharedArrayBuffer。
ShardArrayBuffer由于安全问题,仅可用在cross-origin isolated环境下,故需要配置以下响应头:

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

但,Vercel不是必须的。在本项目中,使用了Python脚本为其添加以上响应头,同时为了利(bai)用(piao)Serverless服务,综合考虑下使用了Vercel。
若您需要自行部署,也可以在您自己的服务器上利用诸如Nginx、Apache、Caddy等Web服务器软件添加响应头。(您可能需要将main.html重命名为index.html)

参考和使用的一些开源项目

FFmpeg FFmpeg.wasm Download.js Poppins字体


Made with ♡ by 梓漪(ZiAzusa)

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.