Blob视频持续时间元数据 [英] Blob video duration metadata
问题描述
我正在编写一个在firefox中处理相机流视频的软件。
I am writing a software that manipulates camera stream video in firefox.
我正在生成 Blob ,其视频类型记录为 MediaRecorder API 。
I am generating a Blob with video type recorded with MediaRecorder API.
我正在做的是将blob保存为本地存储中的视频使用 FileSaver 库:
What i am doing to save the blob as video in local storage is using FileSaver library :
FileSaver.saveAs(BlobVideo,"video.mp4");
视频似乎没有任何最长持续时间,因此我无法在新生成的视频中导航时间轴例如,在VLC中。
It seems the video doesnt have any max duration, so i cannot navigate in timeline in my newly generated video in VLC, for example.
有没有办法在blob视频上设置持续时间metadatas?
Is there a way to set duration metadatas on a blob video?
推荐答案
这个问题几乎与另一个。 (但因为有奖金,我们不能投票结束)
这是一个已知的 chrome bug 。
您可以通过加载视频从浏览器本身获得此持续时间,将其 currentTime
设置为某个额外值,然后读取持续时间,但你不会将它附加到文件本身,至少在错误修复之前不会。
You can have this duration from the browser itself by loading the video, setting its currentTime
to some extra-value, then reading the duration, but you won't have it attached to the file itself, at least not until the bug has been fixed.
这篇关于Blob视频持续时间元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!