# webm

Published articles for webm.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Scrubbing videos using JavaScript

DevFeed: [Scrubbing videos using JavaScript](<https://devfeed.tech/articles/scrubbing-videos-using-javascript-37347.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/scrubbing-videos-using-javascript/>)

Author: Stanko

Published: 2022-10-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Code](<https://devfeed.tech/topics/code.md>), [FFmpeg (Fast Forward Moving Picture Experts Group)](<https://devfeed.tech/topics/ffmpeg.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [code](<https://devfeed.tech/tags/code.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [ffmpeg](<https://devfeed.tech/tags/ffmpeg.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [videos](<https://devfeed.tech/tags/videos.md>), [webm](<https://devfeed.tech/tags/webm.md>)

### AI overview

A tutorial on scrubbing HTML videos with JavaScript. It explains how keyframe frequency affects scrubbing smoothness and file size, compares browser behavior, and discusses providing MP4 and WebM versions.

### Source excerpt

JavaScript part is actually pretty easy, it is more about preparing the video file correctly. If you just want the code for converting videos using ffmpeg, jump to the last section. Otherwise, let's start scrolling down to see these two videos scrubbing: Every 5 framesEvery 100 frames Code used looks like this, it just updates currentTime based on window scroll. But the left video should work smoother than the right one. Depending on your browser, it can be more or less noticeable. The answer why it happens is keyframes. const video = document.querySelector('#video'); window.addEventListener('scroll', function() { video.currentTime = window.scrollY * 0.01; }); Keyframes # In video encoding, the keyframe is the full frame of the image in a video. Frames that are in between these keyframes (aka delta frames), contain only the difference between the previous (or the next) frame. Number of keyframes will vary depending on how the video was created and encoded. Having each frame encoded as a keyframe would be very inefficient and the video file would be huge. To display delta frames, video players decode the information and piece them together. Some players only do this when video is playing, but not when you are scrubbing through it. Because of that, and because it has way less keyframes, the right video feels much choppier than the left one. The video on the right contains a keyframe every one hundred frames, while the one on the left has one keyframe every five frames. That is twenty times more keyframes. Naturally, it reflects on the file size. For this specific video, it is about five times more. line-100.mp4 146 Kb line-5.mp4 845 Kb # ~5 times more line-100.webm 195 Kb line-5.webm 1038 Kb # ~5 times more Browser support # Browsers behave radically differently. But if you provide them a correct video format with enough keyframes, you should be pretty well covered. You'll have to provide the video in at least two formats - mp4 and webm. On desktop, Safari seems to ha

## Reading MediaRecorder's webm/opus output

DevFeed: [Reading MediaRecorder's webm/opus output](<https://devfeed.tech/articles/reading-mediarecorder-s-webm-opus-output-35451.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/reading-mediarecorders-webm-opus-output/>)

Author: Graham King

Published: 2018-07-27T19:34:18Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [file](<https://devfeed.tech/topics/file.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [audio](<https://devfeed.tech/tags/audio.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [codec](<https://devfeed.tech/tags/codec.md>), [container](<https://devfeed.tech/tags/container.md>), [ebml](<https://devfeed.tech/tags/ebml.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [python](<https://devfeed.tech/tags/python.md>), [software](<https://devfeed.tech/tags/software.md>), [webm](<https://devfeed.tech/tags/webm.md>)

### AI overview

A tutorial on inspecting MediaRecorder's audio/webm;codecs=opus output. It explains the WebM container, its relationship to Matroska and EBML, and how EBML elements encode IDs, lengths, and values using a hex editor and Python REPL.

### Source excerpt

Making like Theseus in the WEBM/MATROSKA/EBML audio maze