[fix-webm-duration] Duration section is present
See original GitHub issueI’m recording a webm from a video element with HTMLMediaElement.mozCaptureStream
and, long story short, the resulting duration is N/A according to ffmpeg. File explorer (nautilus) reports the duration as 0 seconds as well.
As the title implies, I get the “Duration section is present” error anyway. Can I get around this? Maybe remove the duration section first, if that’s possible?
I also tried removing the return false
from that part. ffmpeg gave a proper duration after that, but Nautilus still says 0 seconds, and firefox reports that the file is corrupt.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
yusitnikov/fix-webm-duration - GitHub
This library appends missing metadata section right to the file blob. - GitHub - yusitnikov/fix-webm-duration: navigator.mediaDevices.
Read more >npm:webm-fix-duration - Skypack
getUserMedia + MediaRecorder create WEBM files without duration metadata. This library appends missing metadata section right to the file blob.
Read more >fix-webm-duration - npm
This library appends missing metadata section right to the file blob. ... Start using fix-webm-duration in your project by running `npm i ...
Read more >webm duration is set to Infinity when no duration is specified in ...
When loading a 'video/webm' media generated by the MediaRecorder API, the `duration` property of the video returns Infinity.
Read more >Fix missing duration in audio file - webm - Stack Overflow
Is there a way to fix the missing duration? i.e. inserting the time metadata back into the file without transcoding (or otherwise losing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@losnappas , issue fixed in the main branch. FF records a file with a “Duration” section, but the value there is 0. The new version of the script sets the right duration value in that case.
I made an example. Can’t run it on jsfiddle because the video needs to be 1st party.
I don’t know why your fiddle worked, but this example doesn’t…
Just pasting it. page.html:
main.js
Download it, then using ffmpeg to check the metadata:
ffmpeg -i RecordedVideo.webm -f ffmetadata
“Duration: N/A”