Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help, not work, also no duration at potplayer&chrome video tag #8

Open
En777 opened this issue Sep 19, 2022 · 1 comment
Open

help, not work, also no duration at potplayer&chrome video tag #8

En777 opened this issue Sep 19, 2022 · 1 comment

Comments

@En777
Copy link

En777 commented Sep 19, 2022

// "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.

@En777
Copy link
Author

En777 commented Sep 19, 2022

the fixed.webm file can play well, but no video duration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant