Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk7 min

How to Scrub Huge Video Files in the Browser Without Blowing Up RAM

Browsers set their own video memory limits, but your code can avoid whole-file copies, serve byte ranges, and seek deliberately to keep scrubbing lean.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

No web page can set a RAM ceiling for video playback. Browsers decide how much media they buffer and decode, and that depends on the browser, the device, the codec, and how the file is organized. What you control is narrower but still matters: whether your own code makes copies of the file, whether hosted files can be fetched in byte ranges, how much the browser is told to preload, and how you request seeks. Getting those four right removes the most avoidable memory growth when someone scrubs through a large video. It does not guarantee a fixed memory budget.

Where the memory actually goes

When a large video becomes sluggish or memory climbs during scrubbing, the usual sources fall into four groups. Each one has a different fix.

As an Amazon Associate I earn from qualifying purchases.

  • Application copies of the whole file. Reading a video into a JavaScript ArrayBuffer duplicates the entire file in script memory before the browser even starts playing it.
  • Media bytes the browser keeps. The browser downloads and holds media data so it can play and seek. How much it keeps is the browser’s decision, influenced by the preload hint and by the server’s response behavior.
  • Decoded frames. Decoding produces frame data that the browser manages internally. You cannot read or cap this directly from page code.
  • Stale object URLs and abandoned media elements. In long-lived interfaces that open many files, URLs and elements that are never released keep their resources alive.

Local files: point the video at the File, not a copy

For a file the user picks from their own disk, you do not need to read the bytes at all to preview it. URL.createObjectURL(file) returns a URL that identifies the file, and the <video> element can use that URL as its source. Nothing is converted into a string or a full-size array in your script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Add a picker to the page: <input type="file" accept="video/*" id="picker">.
  2. On the input’s change event, take input.files[0], create the URL, and assign it: video.src = URL.createObjectURL(file);.
  3. When the user opens a different file or the element is removed, release the previous URL with URL.revokeObjectURL(previousUrl), then clear the source with video.removeAttribute("src"); video.load();.

The expected result is that the video plays and scrubs from the file on disk with no file.arrayBuffer() call anywhere in the code. If memory still rises after switching files several times, the most likely cause is a URL you created but never revoked.

#1 Best Overall
Vansuny 500GB Portable External SSD, USB 3.1 Gen2 450MB/s High-Speed Data Transfer, Metal USB C Mini Portable External Solid State Drive for PC, Laptop, Phones and More
  • Ultra-Fast Transfer Speed - Read and write speed can respectively reach up to 450MB/s and 400MB/s, which enables you to fast back up massive data to the SSD or read data from it
  • Mini Design & Lightweight - The SSD is very mini and lightweight, smaller than your palm, and easy to carry around with you; metal-made design makes it more solid and durable, and features fast heat dissipation
  • Excellent Performance - The SSD features ultra-fast, stable and secure data transfer, waterproof, shockproof, wear resistant; and it has more excellent performance than common mobile solid state drive, perfect for photographers, gamer, video editors and music producers
  • Strong Compatibility - The external SSD is compatible with Windows, Mac OS and Android systems, and supports all kinds of PC with USB port, and latest laptops and smartphones with Type-C port
  • What You Get - 1 * 500GB Mini SSD, 1 * Type-A to Type-C Data Adapter, 1* Type-A to Type-C Data Cable, 1 * Storage bag

Custom reads from a Blob URL

A Blob URL also accepts fetch() requests with a Range header, so you can read a slice of the file. This is useful for reading a file header or building a custom inspection tool. It does not give you a timestamp-to-byte index, and it does not provide a complete frame-seeking or decoding pipeline. For ordinary preview and scrubbing, native media playback from the object URL is the simpler and more reliable path. Reach for slice reads only when the product genuinely needs custom demuxing or processing.

Hosted files: make byte ranges work

For a video served over HTTP, the key condition for scrubbing without downloading the whole file is byte-range support. The browser asks for a portion of the file, and the server answers with only those bytes. A video URL that serves the full response every time forces the browser to take in far more data than a seek needs.

What a correct range response looks like

Test the server directly before testing the page. A valid single-range request should receive a 206 Partial Content status, the requested bytes, and a Content-Range header that states the location of those bytes and the total size of the resource. You can check this with a command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Lexar 1TB Go Portable SSD w/Hub, 1050MB/s Read, USB 3.2 Gen2, Ultracompact | Compatible w/ Smartphone, iPhone 15/16 (Not 17), PC, Mac, IP65 Dust/Water Resistant, Apple Pro Res, LSL400S001T-RNSNU
  • Ultra-compact so you can always keep it with you for spontaneous creativity anytime, anywhere
  • Wireless plug-and-play Type-C connector frees you from tangled, cumbersome cables (press firmly to ensure drive is completely inserted before use)
  • Capture brilliant Apple ProRes footage and store with ease
  • The portable SSD plus the hub, which has its own four USB Type-C ports, along with included adapters and cables, gives you the ultimate flexibility to customize your setup to suit the shoot
  • Blazing-fast performance up to 1050MB/s read and 1000MB/s write for seamless 4K recording, no dropped frames, and swift backups

curl -I -H "Range: bytes=0-1023" https://example.com/video.mp4

  • Expected: status 206 Partial Content, a Content-Range: bytes 0-1023/<total size> header, and an Accept-Ranges: bytes header.
  • Replace the example URL with your own file. A -I request returns headers only, so the check does not download the video.
  • If your files sit behind a CDN or object storage layer, confirm that the Range header reaches the origin and that the 206 response comes back through the CDN, not only from the origin.

When the server ignores Range

If the server ignores the Range header, it can respond with 200 OK and send the entire file. The browser then has to treat the response as one large stream, and the page gains nothing from the seek request. The existence of a video URL alone does not guarantee efficient scrubbing. Confirm the response status and headers for the exact URL your page uses, since a different path, a redirect, or a proxy can change the behavior.

Preload: a hint, not a memory limit

The preload attribute tells the browser how much to fetch before the user presses play. It is a hint. Browsers may ignore it, and none of its values is an enforceable ceiling on memory.

Rank #3
Sale
Netac ZSlim 500GB Portable SSD, Up to 550MB/s Read and 450MB/s Write, USB 3.2 Gen 2 USB-C External Solid State Drive, 30g Aluminum Alloy Storage for Windows PC, Mac and Android
  • 500GB — BALANCED SPACE FOR EVERYDAY MEDIA — The 500GB capacity offers a practical balance of space and portability for photo collections, videos, work files and active projects.
  • UP TO 550MB/S READ AND 450MB/S WRITE — Transfer photos, videos, documents and project files with read speeds up to 500MB/s and write speeds up to 450MB/s through a compatible USB 3.2 Gen 2 connection.
  • SLIM AND LIGHTWEIGHT — Measuring only 100 × 29.4 × 9mm and weighing approximately 30g, the Z Slim fits easily into a pocket, laptop bag or travel pouch for storage wherever your day takes you.
  • ONE DRIVE, MULTIPLE DEVICES — Use the included USB Type-C-to-A cable and USB-A-to-C adapter with compatible USB-A and USB-C computers, phones and tablets. Supports compatible Windows, macOS, Linux and Android systems.
  • ALUMINUM ALLOY ENCLOSURE — The lightweight aluminum-alloy housing provides a solid, comfortable feel for everyday carrying and handling. The Z Slim is backed by a 3-year limited warranty.
Value What it asks the browser to do Practical note
none Do not preload anything in advance. Lowest up-front fetching. Duration and the first frame may appear only after the user acts.
metadata Fetch only metadata such as duration and dimensions. A common choice for scrub-heavy pages, since it avoids pulling media data before it is needed.
auto Allows the browser to download the whole file. Highest preloading. The browser may still fetch less, so do not rely on it for a specific amount of memory.

For a large file on a page with many players, metadata is usually the safer default. Set the value deliberately and then measure, rather than assuming that a label controls memory use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Seeking: set currentTime and check what is seekable

To seek, assign a time in seconds to video.currentTime. The browser may adjust the requested position to one the media actually supports, so the value you read back afterward is the one to trust.

  1. When the user moves the scrubber, set video.currentTime = seconds;.
  2. Listen for seeking to show a loading state and for seeked to clear it. Those two events mark the start and end of the seek; they do not promise that the frame is instantly available.
  3. To see which ranges the browser can currently seek to, read video.seekable. It returns a snapshot of ranges, so loop over it with video.seekable.length, start(i), and end(i).

Expected result: the scrubber moves the playhead, the spinner appears during the seek, and the seekable ranges for a range-capable server cover more than the first downloaded segment. If the scrubber targets a time outside every seekable range, expect the browser to clamp or delay the seek.

Rank #4
Sandisk 2TB Creator PRO Portable SSD, Up to 2000MB/s Read Speeds - Blue | External Solid State Drive, IP65 Water & Dust Resistance, Up to 3M Drop Protection, 1 Month Adobe Creative Cloud, USB-C 3.2
  • FOR CREATORS WITH A VISION. Amplify your creative voice with a collection of products that elevate every step of your workflow.
  • FOR REVOLUTIONARY CONTENT. With up to 2000MB/s[2] read speeds, you can easily back up and access your content.
  • PURSUE YOUR INSPIRATION. Embark on your creative journeys with up to three-meter drop protection[3] and IP65 water and dust resistance[4].
  • ADOBE CREATIVE CLOUD. To empower content creators like you, SanDisk is gifting you one month of Adobe Creative Cloud[3].

Update the UI from timeupdate events rather than reading currentTime in a tight loop. Event-driven updates are enough for a scrubber and avoid unnecessary work.

currentTime versus fastSeek

Method Precision Browser support Use it when
currentTime assignment Seeks to the requested time as closely as the media supports. Available across the browsers that support HTML video. Precision matters, such as stepping to a specific moment or marking a cue.
fastSeek(time) Lower precision, traded for speed. As of October 2026, MDN’s reference lists it as not Baseline because some widely used browsers do not support it. Rough scrubbing where a slightly imprecise landing point is acceptable, with support checked first.

Use feature detection before calling fastSeek, and fall back to currentTime when it is absent:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

if ("fastSeek" in video) { video.fastSeek(t); } else { video.currentTime = t; }

Best Value
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s | Reliable External Solid State Drive Storage for Gaming, Students, Professionals (MU-PC1T0T/AM)
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Encoding: keyframe spacing trades seek speed for file size

The source file’s structure also shapes seek behavior. A seek often requires the decoder to start from a keyframe before the target time and decode forward. If keyframes are far apart, the decoder may have more frames to work through before the target appears, which makes seeks slower. Adding keyframes shortens that distance but increases file size.

MDN’s guidance on this trade-off uses Ogg as its example: widely spaced keyframes can increase seek time, and more frequent keyframes increase file size. Treat that as the mechanism, not as a universal rule for every container and codec. For MP4 or WebM files, check your encoder’s keyframe or GOP settings and test seek latency on the files you actually serve.

When native playback is not enough: Media Source Extensions

For most pages, a plain <video> element with a URL is adequate. Media Source Extensions (MSE), exposed through MediaSource and SourceBuffer, become worth considering when your application needs explicit control over:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • the rate at which media segments are fetched,
  • which segments stay in the buffer and which are removed,
  • how quality changes between segments.

MSE moves that work into your code. You then own segment management, buffer eviction, and browser compatibility checks, so it adds complexity rather than removing memory use on its own.

Verifying memory on your target browser

Memory behavior depends on the browser and device, so verify it in the environment your readers use.

  1. Open the browser’s developer tools and go to the Network panel. Filter for media requests and scrub the video. Confirm that seeks produce 206 responses for hosted files.
  2. In Chrome, open the Task Manager with Shift+Esc on Windows or Linux and watch the memory column for the tab while you scrub.
  3. Repeat the same scrub sequence several times on the same file. Memory that levels off suggests the buffer is being reused. Memory that climbs with every pass points to something your code retains.
  4. Record the browser name and version, the device, the file’s container and codec, and the preload value. Results from one combination do not transfer to another.

Troubleshooting when memory keeps growing

  • The page reads the whole file into an ArrayBuffer. Replace it with an object URL for local files, or with a hosted URL for remote files.
  • Memory rises each time a new file is opened. Call URL.revokeObjectURL on the previous URL and clear the element’s source.
  • Network shows 200 responses for every seek. The server or CDN is ignoring the Range header. Fix the server or CDN configuration and retest the headers.
  • Seeks feel slow even with range responses. Check keyframe spacing in the encoder settings. Sparse keyframes can be the cause.
  • Memory keeps climbing with MSE. Your code is appending segments without removing old ones. Add buffer eviction for ranges behind the playhead.

“

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.