stazhu / fix-webm-meta Goto Github PK
View Code? Open in Web Editor NEWbased on ts-ebml and support large file (larger than 2GB files)
License: MIT License
based on ts-ebml and support large file (larger than 2GB files)
License: MIT License
报错了
mediaRecorder.start() 使用timeslice后在ondataavailable里面用 fixWebmMetaInfo有问题。
建议直接读取已经完整生成的webm文件后修改文件头
E:\project\electron-egg\node_modules\ebml-block\lib\vint.js:10 Uncaught (in promise) Error: Unrepresentable length: 9 000080000000010910
at module.exports (E:\project\electron-egg\node_modules\ebml-block\lib\vint.js:10)
at BufferReader.nextIntV (E:\project\electron-egg\node_modules\ebml-block\lib\buffer-reader.js:29)
at readLacedData (E:\project\electron-egg\node_modules\ebml-block\index.js:66)
at Object.module.exports [as ebmlBlock] (E:\project\electron-egg\node_modules\ebml-block\index.js:24)
at EBMLReader.read (E:\project\electron-egg\node_modules\ts-ebml\lib\EBMLReader.js:141)
at E:\project\electron-egg\node_modules\fix-webm-metainfo\dist\index.js:46
at Array.forEach ()
at E:\project\electron-egg\node_modules\fix-webm-metainfo\dist\index.js:46
at Generator.next ()
at fulfilled (E:\project\electron-egg\node_modules\fix-webm-metainfo\dist\index.js:5)
只录屏幕,不录制声音时
Some times the recorder can create unknown entries . . . just need to change
decoder
.decode(bufSlices)
.forEach((elm) => reader.read(elm));
to
decoder
.decode(bufSlices)
.filter((el) => el.type !== 'unknown')
.forEach((elm) => reader.read(elm));
fixed "Buffer is not defined" in ebml(2.2.x)/lib/ebml/tools.js line 44 "var buffer = new Buffer(length);" #2
请merge 一下这个 最新版本依然有buffer is not defined 问题
// "fix-webm-metainfo": "1.0.8"
// "electron": "19.0.6"
console.warn('fixWebmFile', filePath)
const fs = await import('fs-extra')
let buffer = await fs.readFile(filePath)
const fixWebm = await import('fix-webm-metainfo').then(js => js.default)
// https://stackoverflow.com/questions/61731218/conversion-of-buffer-data-to-blob-in-nodejs
let blob = new Blob([buffer], { type: 'video/webm;codecs=h264' })
buffer = null
blob = await fixWebm(blob)
buffer = Buffer.from(await blob.arrayBuffer())
blob = null
await fs.writeFile(filePath + '-fixed.webm', buffer)
console.warn('fixWebmFile end')
the -fixed.webm file also not have duration on video player.
help, thanks.
webm 录制完的视频其时长需要随着视频的播放才能逐步显示全部,未能像正常视频那样一进来就显示整个完整时长
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.