Giter VIP home page Giter VIP logo

web-tss-merge2mkv's Introduction

Web 版 ts 文件合并工具

基于 ffmpeg.wasm 实现。

效果同 tss-merge-to-mkv 一样,但由于 WebAssambly 的限制,目前文件大小不能超过 2GB(未来可能会 4GB),速度方面和 PC 的也有差别(当然这可能并不影响你的使用,毕竟免安装省事)。

界面

image

image

image

测试

可以下载 ts测试 文件,解压后,尝试合并。

部署

由于使用到 SharedArrayBuffer 的问题(详情),所以部署上需要额外添加一些 Http Header。

下面以比较简单的两种方式实现。

NodeJS Express 方式

在构建好的文件目录,创建 server.js,内容如下:

const express = require("express");

const app = express();

app.use((_, res, next) => {
  res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
  res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
  next();
});
app.use(express.static(__dirname));

app.listen(3000, () => {
  console.log("listening on port 3000");
});

安装一下 express,执行 npm i express

然后执行 node server.js 就可以了。

PHP 方式

index.html 重命名为 index.php,在文件的最上方添加如下代码即可:

<?php
header('Cross-Origin-Embedder-Policy: require-corp');
header('Cross-Origin-Opener-Policy: same-origin');
?>

web-tss-merge2mkv's People

Contributors

lecepin avatar

Stargazers

HeisenBerg? avatar

Watchers

 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.