Back to Blog

How Online Video Actually Plays: From Click to Frame

A pillar guide to how online video streaming works in 2026 — from camera to encoder to manifest to CDN to player — explained step by step, in plain English.

By

You press play on a YouTube video and within a second something is on your screen. What happened in that second? A truly extraordinary amount, considering the video isn’t on your device, the file you’re watching doesn’t exist as a single file anywhere, and the bytes lighting up your display didn’t even come from YouTube’s servers. They came from a cache somewhere in the same metropolitan area as your home — a copy made just in case you, or a thousand other viewers, asked for that exact slice of that exact movie.

Here’s the sequence. Your browser talks to a server that hands it a tiny text file describing the video. The player reads that file, picks one of several quality options, and starts asking a CDN for short chunks of audio and video — typically two to six seconds each. The chunks arrive over the same HTTPS connections that serve regular web pages. The player decodes them on hardware your phone or laptop already has, and paints frames to the screen. While you watch the first chunk, the player is already fetching the next three. If your Wi-Fi wobbles, it quietly drops to a lower-quality version of the next chunk so playback never stalls. That whole loop — fetch manifest, fetch segments, decode, paint, measure, adapt — is what’s running invisibly behind every Netflix, YouTube, Twitch, Disney+, and TikTok video on the web.

This is the pillar article for our streaming series. We’ll walk through the entire pipeline, from a camera at one end to a frame on your screen at the other, in plain English. We’ll cover the technical layers in enough depth to be precise but without drowning in jargon, look at which services use which combinations of these layers, and end with the practical question that brought a lot of readers here in the first place: when you’ve watched the video, can you keep a copy of it?

Video streaming is the delivery of video to your device as a continuous series of short, sequentially numbered file segments fetched over HTTPS, guided by a small manifest file, decoded on the fly, and discarded as soon as the next segment is in flight.

Key Takeaways

  • Streaming is not a special protocol — it’s a clever pattern on top of plain HTTP. Manifests and segments are just files on a CDN.
  • The video you “watch” doesn’t exist as a single file. It’s reconstructed in your player from a manifest plus a few hundred small segments.
  • Encoding produces multiple bitrate variants of the same content. The player picks among them based on real-time bandwidth measurements.
  • Most segments come from a CDN edge near you, not from the origin server. Edge caches are why streaming feels instant.
  • Adaptive bitrate streaming is why quality silently shifts mid-playback — the player switches variants between segments to keep the buffer healthy.
  • Three encryption layers can stack independently: HTTPS for transport, AES-128 for segment content, and DRM for license-gated commercial streams.
  • HLS and DASH dominate. HLS is Apple’s spec (RFC 8216, .m3u8); DASH is the ISO/IEC standard (23009-1, .mpd XML). Most major services ship both.
  • Saving a stream means parsing the manifest, fetching every segment, handling encryption, and remuxing — not right-click and Save As.

The Simple Explanation

Pretend you’re shipping a feature film to a hundred million viewers around the world. The film is enormous — a single 2-hour 1080p H.264 movie is around 4 to 8 gigabytes — and your viewers are on every connection from gigabit fiber to flaky 4G in a moving train. You can’t send the same giant file to everyone. You can’t even send the right file: the train viewer needs a low-bitrate copy, the fiber viewer wants the high-bitrate one, and if the train viewer switches to Wi-Fi mid-movie you need to bump them up without restarting.

The pattern the industry settled on is so simple it sounds anticlimactic. Cut the movie into hundreds of short clips, encode each clip at several quality levels, store all the clips on servers around the world, and let the viewer’s player decide which clip to play next. That’s it. The thing called “streaming” is, underneath, just files in folders being fetched over the web in a particular order.

Here’s the lifecycle from one end to the other:

  1. A camera or rendering engine captures raw frames. For live, this is a real camera. For video-on-demand, this is a finished master file the studio hands over.
  2. An encoder compresses the raw frames into a codec — H.264, H.265, or AV1 for video; AAC or Opus for audio. The encoder typically produces several outputs at different bitrates from one input.
  3. A packager cuts the encoded streams into short segments and writes a manifest. Each variant becomes its own folder of segments plus a per-variant manifest; the variants are listed in a top-level master manifest.
  4. The segments and manifests are uploaded to an origin and replicated to a CDN. Cloudflare, Akamai, Fastly, AWS CloudFront — whichever CDN the service uses — caches the files on edge nodes worldwide.
  5. You press play. Your player downloads the manifest, picks a variant, fetches the first segments from a nearby CDN edge, and starts decoding.
  6. The player decodes each segment and paints frames to your screen, keeping a buffer of a few seconds ahead of what you’re watching.
  7. The player measures bandwidth as segments arrive and adjusts the variant between segments so quality matches your real-time connection.

That’s the entire pipeline. Nothing else is happening — no special server, no proprietary protocol on the wire, no magic. Every step uses tools and formats you could write a script against if you were patient enough. The cleverness is in the design: each segment is short enough to switch variants between them, the manifest is tiny so the round-trip is fast, the segments cache like any other static file, and the player runs on the same hardware that already decodes Blu-rays and FaceTime calls. The whole streaming web is built out of HTTPS, files, and timing. The protocols and codecs we’ll cover next are just the conventions that let these pieces interoperate at scale.

How Streaming Video Actually Works

This is the pillar’s technical core. We’ll walk the whole pipeline end to end. By the time we’re done you should be able to look at a network tab on any streaming site and identify which stage each request belongs to.

Camera → Encoder → Packager → Origin → CDN edge → Player → Decoder → Screen

That diagram is the entire path. Every concept below — bitrate ladders, manifests, segments, ABR, encryption — fits somewhere on that arrow.

Origin and Encoding

It starts with raw video. For a live broadcast that’s a camera (or a screen capture in the case of game streaming) producing uncompressed frames at, say, 1920×1080 at 60 frames per second. Uncompressed, that’s roughly 3 gigabits per second. Nobody ships raw video over the public internet. The first job is compression.

A video encoder turns raw frames into a compressed bitstream by exploiting temporal redundancy (most pixels look like the last frame’s pixels) and spatial redundancy (most regions of an image look like their neighbors). The dominant codecs in 2026 are:

  • H.264 (AVC) — Standardized in 2003. Old, but still the most broadly supported codec on the internet. Every device made in the last 15 years can hardware-decode it.
  • H.265 (HEVC) — Roughly 50% more efficient than H.264 at the same quality. Royalty-encumbered, which slowed web adoption, but ubiquitous on phones, smart TVs, and Apple platforms.
  • AV1 — Royalty-free, open, and slightly more efficient than HEVC. YouTube, Netflix, and Vimeo are the big AV1 publishers. Hardware decode support is finally everywhere as of 2025–2026.
  • AAC and Opus — The audio codecs. AAC is mandatory in HLS; Opus dominates WebRTC and is increasingly common in DASH.

The same content is almost always encoded into multiple bitrate variants. A typical encode ladder might look like this:

VariantResolutionBitrateCodec
1080p1920×10805.0 MbpsH.264 high
720p1280×7203.0 MbpsH.264 main
480p854×4801.5 MbpsH.264 main
360p640×3600.8 MbpsH.264 baseline
audio128 kbpsAAC-LC

Each row in that table is a separate encode of the same source. They’re aligned in time so a player can switch between them at the same wall-clock moment without restarting the decoder. For more detail on what’s actually inside each variant — codec versus container — see containers like MP4 vs codecs like H.264.

Packaging — Segments and Manifests

After encoding comes packaging: cutting each variant’s bitstream into short chunks called segments and writing a manifest that lists them.

Segments are typically 2 to 10 seconds of video and audio each. They’re cut on keyframe boundaries (an I-frame in the bitstream) so the player can begin decoding from the start of any segment. When the manifest declares EXT-X-INDEPENDENT-SEGMENTS (HLS) or the equivalent in DASH, every segment is guaranteed playable on its own; without that declaration, some segments depend on data carried in earlier ones.

The segment container format varies:

  • MPEG-TS (.ts) — Legacy HLS. Originally a satellite/cable broadcast format from the 1990s, robust against bit errors. Still in use but being phased out.
  • Fragmented MP4 (.m4s, sometimes .mp4) — Modern HLS and all of DASH. Same MP4 container as a regular file, but cut into fragments with their own headers so each is independently playable.
  • CMAF — The Common Media Application Format (ISO/IEC 23000-19) is a fragmented-MP4 profile and packaging constraint, not a merger of .ts and fMP4. It defines exactly how fMP4 segments should be structured so the same set of fMP4 files can be referenced by both an HLS .m3u8 and a DASH .mpd. Modern services ship CMAF rather than duplicating bytes per protocol; legacy .ts segments still exist alongside it for older HLS clients that can’t take fMP4.

The manifest itself comes in two flavors:

  • HLS manifests are .m3u8 text files. A master playlist lists variants and their bandwidth; each variant has a media playlist listing segment URLs and durations. See what an m3u8 file actually contains for the full anatomy.
  • DASH manifests are .mpd XML files. One file describes the whole presentation — adaptation sets, representations, segment timelines, BaseURLs — in a tree structure. See DASH and its .mpd manifest for the comparison with HLS.

Both designs are doing the same job: the manifest tells the player what variants exist, where each segment lives, and how long each segment is. Everything else is up to the player.

CDN Distribution

Once segments and manifests exist as files, the streaming service uploads them to an origin server — usually an object store like S3 or R2 — and lets a content delivery network replicate them to edge nodes around the world. CDNs you’ll see in network requests include Akamai, Cloudflare, Fastly, AWS CloudFront, Google’s edge network, and the private CDNs that Netflix (Open Connect) and YouTube run inside ISPs.

The reason CDNs matter so much for streaming is cacheability. A segment is a static file with a URL that doesn’t change. The first viewer in a region pulls the segment from the origin; the edge caches it; every viewer in that region for the next hour or two gets it from a server tens of milliseconds away. For a popular YouTube video, the vast majority of segment requests never touch YouTube’s origin — they’re served from a cache box physically inside your ISP.

This is also why streaming scales so well. Adding a million simultaneous viewers in Tokyo doesn’t add a million round-trips to California — it adds load to a Tokyo edge node that already had the file. The math is forgiving in a way that no pre-2010 streaming protocol allowed.

Player Workflow

Now we’re back at your device. Your browser loads a page, the page boots a JavaScript player (usually shaka-player, hls.js, video.js, or a vendor’s custom build on top of one of those), and the player asks the page’s <video> element to start playback. From there the player runs a tight loop:

  1. Fetch the manifest. One HTTPS GET. The response is a few kilobytes of text.
  2. Parse the manifest and pick an initial variant. Players pick based on a bandwidth estimate (seeded by recent history or the device’s network info), the device’s screen resolution, and a safety margin so the first segment is unlikely to stall.
  3. Fetch the first few segments. Modern players parallelize these over a single HTTP/2 or HTTP/3 connection. Segments arrive simultaneously.
  4. Push segment bytes into the browser’s Media Source Extensions buffer. MSE is the W3C API that lets JavaScript feed video data into the <video> element programmatically. The browser’s built-in decoder takes it from there.
  5. Decode and paint. The decoder — hardware-accelerated on essentially every device made in the last decade — converts compressed frames to raw pixels, and the GPU paints them at the video’s frame rate.
  6. Keep the buffer full. While the user watches segment N, the player is fetching segments N+1, N+2, N+3.
  7. Re-evaluate every segment. After each download, the player has fresh data on how fast the connection is. It uses that to decide whether to switch variants for the next segment.

Most of the player code is bookkeeping: tracking buffer health, retrying failed segment fetches, handling seek and pause, splicing in ad segments, switching audio tracks, rendering subtitles. The streaming part is conceptually small — fetch, decode, repeat — and the engineering complexity lives in all the edge cases around it.

Adaptive Bitrate (ABR)

Adaptive bitrate is the feature that makes the whole arrangement worth using. Without ABR a player would pick one quality, stick to it, and rebuffer the moment your connection couldn’t sustain it. With ABR the player measures bandwidth on every segment and switches variants in flight.

The basic loop looks like this. After each segment download, the player computes effective bandwidth: segment size divided by download time. It compares that to a moving average of recent measurements. If bandwidth is trending down, the next segment request goes to a lower-bitrate variant. If bandwidth is trending up and the buffer is healthy, the player climbs up. The decisions are made between segments, never mid-segment, so the switch is seamless.

Real ABR implementations are more nuanced. They track buffer occupancy (a healthy buffer can risk a higher variant; a draining buffer must drop fast), they account for screen resolution (no point streaming 4K to a 720p laptop), and they use prediction models — moving averages, low-pass filters, sometimes machine-learning estimators — to avoid oscillating between variants. The two dominant ABR algorithms in 2026 are BOLA (buffer-based) and MPC (model predictive control), both of which appear in open-source players. For a full breakdown, see the ABR logic inside every modern player.

The user-visible upshot is: you don’t have to choose a quality. The player does, second by second, and the switches are usually invisible. When they’re not invisible — when you notice a sudden softness on a Netflix screen — that’s the ABR picking a lower variant to keep playback continuous.

Encryption: Three Layers That Often Get Conflated

Encryption in streaming is more than people realize, and the three independent layers are routinely mashed together. They aren’t the same thing.

HTTPS = transport security. Every modern stream is served over TLS. This protects the bytes from eavesdroppers on the network: an ISP, a Wi-Fi attacker, or a corporate proxy can’t read what’s flowing past them. HTTPS does not stop the receiving browser from reading the bytes — it’s strictly about the wire.

AES-128 segment encryption = content layer. HLS and DASH both support encrypting the segments themselves with AES-128 in CBC or CTR mode. The manifest carries a key URL; the player fetches the key over HTTPS and decrypts each segment before decoding. This is a content-layer protection: it makes the bytes useless even if someone obtains them, but the key URL itself is the gate. Anyone who can reach the key URL can decrypt the segments. Many live and creator platforms use AES-128 segment encryption as a basic protection layer.

DRM = license-server-gated, hardware-backed decryption. Widevine (Google), FairPlay (Apple), and PlayReady (Microsoft) wrap a layer of policy on top of segment encryption. The segments are still AES-encrypted (under MPEG Common Encryption, ISO/IEC 23001-7), but the content key is wrapped so only a trusted execution environment on your device can unwrap it. The license server checks subscription, device trust, and region before issuing the license. Decryption happens in a hardware-backed secure module — the GPU receives decrypted frames directly without them passing through application memory. This is what protects Netflix, Disney+, Apple TV+, and most paid streaming. See how Widevine and FairPlay gate premium streams for the deep dive.

These layers stack. A premium Netflix stream uses HTTPS for transport, CMAF segments encrypted under CENC, and Widevine or FairPlay for license-gated key delivery. A Twitch live stream uses only HTTPS. A paid course platform might use HTTPS plus AES-128 segment encryption but no DRM. Knowing which layers are in play tells you what the technical bar to access the bytes actually is — and where the boundaries of legitimate use sit.

Saving even an unencrypted stream requires speaking all of those protocols correctly, in order, and dealing with edge cases the player handles silently. VidMost was built to do that work in the background — manifest parsing, segment fetching, AES handling, DRM via embedded Widevine L3, container remuxing — so the user-visible step is paste a URL, get an MP4.

Where You See This in the Real World

The pipeline above describes basically every commercial streaming service in 2026. The differences are in which protocols, codecs, and DRM each service picks, and how they negotiate with your device.

  • YouTube. Primary protocol is MPEG-DASH on web and Android, with HLS served to Safari, iOS, AirPlay, and most smart TVs. Almost all content is CMAF — one set of fMP4 segments serves both manifests. Codecs: H.264 for compatibility, VP9 for most playbacks, AV1 for high-resolution streams on supported devices. Widevine and FairPlay DRM for movies/TV rentals; unencrypted for user-uploaded videos.
  • Netflix, Disney+, Apple TV+, HBO Max, Prime Video. All use a mix of HLS and DASH depending on the client, with CMAF as the common segment format. DRM is mandatory — Widevine, FairPlay, or PlayReady chosen by the device. Codecs include H.264, H.265, AV1, and Dolby Vision/Atmos overlays. License servers enforce region, subscription, and device trust on every playback. Netflix runs its own CDN (Open Connect) inside many ISPs.
  • Twitch. HLS only, with .ts segments still common alongside CMAF. Live streams have 2 to 5 seconds of latency on the low-latency variants and 15 to 30 seconds on standard. Segments are unencrypted — Twitch’s protection model is identity and account-level, not content encryption.
  • Bigo Live, OnlyFans live, Chaturbate, Fansly. HLS-based live streaming, typically with unencrypted segments and short (2-second) chunks for low latency. Browser-side playback uses hls.js or Safari’s native HLS support.
  • Vimeo, Mux, Cloudflare Stream, JW Player. Hosted video platforms. They package uploads into both HLS and DASH automatically and deliver via their own CDNs. Cloudflare Stream ships CMAF; Mux defaults to HLS. DRM is opt-in for paid plans.
  • Sports and news — ESPN, DAZN, BBC iPlayer, Sling TV. HLS or DASH with DRM, often Widevine + FairPlay + PlayReady packaged together so the same encoded segments serve every device. Low-latency HLS (LL-HLS) is the trend here — sub-3-second latency for live events that used to run 30 seconds behind broadcast.
  • TikTok, Instagram Reels, YouTube Shorts. Short-form video uses MP4 progressive download for the smallest clips and HLS or DASH for anything over a minute. The same CDN and codec choices as the long-form services.

Different surfaces, same machinery. The story is repetition with variation: every service picks a manifest format, a codec ladder, and a DRM combination, then runs the same fetch-decode-paint loop across billions of viewers.

What This Means If You Want to Save a Video

Knowing the pipeline makes one practical fact obvious: there is no single file to save. The “video” you’re watching is reconstructed by your player from a manifest plus a few hundred small segments, fetched in real time, decoded in flight, and discarded as the next ones arrive. Browser “Save As” gets you the manifest — a tiny text file with no video bytes in it.

The manual path to a watchable file is a long one. Fetch and parse the manifest (HLS .m3u8 or DASH .mpd). Pick the right variant — usually the highest-bandwidth one your storage can absorb. Enumerate every segment URL. Fetch them all (300+ requests for a 30-minute video at 6-second segments) before the signed URLs expire. If EXT-X-KEY is present, fetch the AES-128 key and decrypt each segment. If the stream is DRM-protected, none of this works at all without a CDM that can issue a license — and even then the decrypted bytes never leave the secure module. Once you have plain segments, remux audio and video into a single MP4 or MKV container. Hope you got the variant selection right; otherwise repeat with a different one.

The right tool collapses that pipeline into one user action. VidMost parses HLS and DASH manifests, selects the highest-quality variant available, downloads segments in parallel from the same CDN your browser was already talking to, handles AES-128 segment encryption automatically, supports Widevine L3 for DRM-protected streams where L3 playback is available (quality may be capped by the service and DRM level — premium platforms typically cap L3 at 480p–720p), and remuxes everything into a clean MP4 ready to play in any media player. The protocol layer disappears. You paste a URL; you get a file.

For content you have a legitimate right to view — lectures you paid for, livestreams you want to archive, your own broadcasts, freely licensed videos — that’s the entire workflow. The pipeline this article describes is what the tool is built to navigate on your behalf.

Common Pitfalls and Misconceptions

A handful of beliefs about streaming come up repeatedly. Worth correcting.

  • “Streaming uses a special protocol.” It doesn’t. Modern adaptive streaming runs over plain HTTPS — the same protocol that serves HTML and JPEGs. Manifests and segments are static files on a CDN. The “protocol” in HLS or DASH is just the convention for what those files contain.
  • “The file is downloading as I watch.” Not exactly. Segments are downloaded just in time to play them and discarded once the next is in flight. Your device never holds the whole video. This is what makes “stop the session” effective and why a streaming session breaks the moment bytes stop arriving.
  • “Higher bandwidth equals better quality.” Only if your bandwidth is stable. A 100 Mbps link that drops to 2 Mbps for ten seconds gives you a worse experience than a steady 8 Mbps connection. The encode ladder also caps you — if the highest variant is 5 Mbps, any bandwidth beyond that doesn’t buy more quality.
  • “Buffering means the internet is slow.” Sometimes. Just as often it’s the encode ladder being too sparse (no variant matches the current bandwidth), a CDN edge missing a cache, peering congestion, or the player’s ABR algorithm being slow to react. Buffering is the player asking for time — not a definitive verdict on your line speed.
  • “DRM is the same as encryption.” No. Encryption is a mathematical operation — scrambled bytes that need a key. DRM is the policy system around that encryption: a license server that controls who gets the key, a trusted execution environment that uses the key, and a contract enforcement layer that decides what device can play what content. Encryption is the lock; DRM is the alarm system, key distribution, and revocation policy combined.
  • “MP4 is a streaming format.” No. MP4 is a container — a file format that wraps audio, video, and metadata. HLS and DASH are streaming protocols, and they can carry fragmented MP4 segments. A regular .mp4 file is not streamed; it’s downloaded progressively. The CMAF segments you see in HLS and DASH are MP4-derived but structured very differently.

Most of the confusion goes away once you internalize the pipeline. Streaming is files plus timing — everything else is a detail.

Closing Thoughts

The internet started shipping video the way it ships everything else: as files over HTTP. Then it got clever about which files, in which order, at which quality, from which edge cache, and decoded with which hardware. That clever pattern — manifest plus segments plus adaptive bitrate plus CDN caching — is the entire reason streaming feels instant, scales to billions of viewers, and survives the messy reality of real-world networks. There’s no secret protocol, no proprietary server, no special magic. Just files, timing, and very good engineering across the whole stack.

If you’d rather skip the protocol layer entirely and just save a video, VidMost handles HLS, DASH, fMP4, AES-128, and Widevine L3 in the background — manifests parsed, segments fetched, encryption handled, MP4 written.

Related reading

Frequently Asked Questions

How does online video streaming work?
Online video streaming sends video to your device as a series of short, sequentially numbered segments over ordinary HTTPS, guided by a small text manifest the player downloads first. The manifest lists every available quality variant and the URLs of each segment. Your player picks a variant, fetches segments a few at a time from a CDN edge near you, decodes them with hardware acceleration, and paints frames to the screen. The whole loop — fetch, decode, paint — repeats continuously for the entire video.
What's the difference between streaming and downloading?
Downloading saves the complete file to your device before you watch it; streaming downloads short segments just in time to play them and discards each one once the next is in flight. You never have the whole file. Streaming also lets the player switch quality mid-playback by choosing different segments from different variants, and lets the service stop serving you instantly when a session ends. A downloaded file works offline forever; a streaming session only works while bytes keep arriving.
Why does video sometimes buffer even on fast internet?
Buffering happens whenever the player's buffer drains faster than segments arrive. Fast peak bandwidth doesn't guarantee stable throughput — congestion at peering points, Wi-Fi interference, or a CDN edge missing a cache can each spike a single segment's download time past its duration. The encode ladder also matters: if a service only offers a 1080p variant at 8 Mbps and your link briefly dips below that, the player has to drop to 720p or wait. Buffering is the player asking for time to refill, not a verdict on your line speed.
Why can't I just right-click and save a streaming video?
Because there's no single file to save. The page hands the player a manifest URL — usually an .m3u8 or .mpd — and that file is only a list of segment URLs. Right-clicking saves the manifest, not the video. To rebuild a watchable file you'd need to fetch every segment in order, decrypt any with AES-128 or DRM-wrapped keys, and remux the audio and video streams into a single MP4 or MKV container. That's a multi-step pipeline browsers don't ship.
Does streaming use special servers?
No. Modern adaptive streaming runs entirely over HTTPS — the same protocol that serves HTML pages and JPEGs. Segments and manifests are just files on a CDN, cacheable at the edge like any other static asset. Older protocols like RTMP, RTSP, and MMS did need dedicated servers and ports, but HLS and DASH deliberately use plain HTTP so they work through firewalls, scale on existing CDN infrastructure, and benefit from improvements in HTTP/2 and HTTP/3 with no protocol changes.
What's the difference between live streaming and video-on-demand?
Both use the same protocols and segment formats. The difference is the manifest. A video-on-demand manifest lists every segment from start to end and declares the stream finite — HLS uses an EXT-X-ENDLIST tag for this. A live manifest only lists segments published so far, omits the end marker, and is re-fetched by the player every few seconds to discover new entries. Latency on live streams ranges from 30 seconds for traditional HLS to under 3 seconds for low-latency HLS or low-latency DASH.
How does video quality switch automatically?
Modern streams ship the same content at multiple bitrates — 1080p, 720p, 480p, and so on — each as a separate set of segments. After every segment download, the player compares how long the download took to how much wall-clock time it consumed, computing an effective bandwidth. If the trend points down, the next segment is requested from a lower variant; if it points up and the buffer is healthy, the player climbs back. Because segments share aligned boundaries across variants, the switch happens cleanly between segments.
Is streaming legal?
Watching a stream you have a right to view — a service you subscribe to, a freely licensed video, your own broadcast — is straightforwardly legal. Downloading streams is more nuanced. Saving content you own or freely licensed material is generally fine. Downloading DRM-protected commercial streams usually violates the platform's terms of service and may trigger anti-circumvention laws like DMCA §1201 in the US. Always check the law in your jurisdiction and the terms you agreed to when you signed up.