<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Monisha</title>
    <description>The latest articles on DEV Community by Monisha (@monisha_90).</description>
    <link>https://dev.to/monisha_90</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4223650%2Fb7cb79e4-1c39-4e4a-b732-f3c006d1983f.png</url>
      <title>DEV Community: Monisha</title>
      <link>https://dev.to/monisha_90</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/monisha_90"/>
    <language>en</language>
    <item>
      <title>RTMP live streaming with OBS, explained: from your encoder to the viewer's player</title>
      <dc:creator>Monisha</dc:creator>
      <pubDate>Tue, 24 Nov 2026 05:43:53 +0000</pubDate>
      <link>https://dev.to/monisha_90/rtmp-live-streaming-with-obs-explained-from-your-encoder-to-the-viewers-player-4djk</link>
      <guid>https://dev.to/monisha_90/rtmp-live-streaming-with-obs-explained-from-your-encoder-to-the-viewers-player-4djk</guid>
      <description>&lt;p&gt;Disclosure: I work at TPStreams. This post explains how RTMP live streaming works in general; the concepts apply to whichever platform you use.&lt;/p&gt;

&lt;p&gt;If you've ever gone live from OBS, you've pasted two things into a settings box: a server URL and a stream key. You click "Start Streaming" and a few seconds later people are watching. Here's what happens in between, and the OBS settings that matter most.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline in four steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ingest (RTMP).&lt;/strong&gt; OBS encodes your camera or screen into H.264 video and AAC audio and pushes it over RTMP (Real-Time Messaging Protocol) to an ingest server. The stream key tells the server which live session the stream belongs to, so treat it like a password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transcode.&lt;/strong&gt; The platform takes your single input (say 1080p at 4.5 Mbps) and produces a ladder of renditions: 1080p, 720p, 480p and so on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Package (HLS).&lt;/strong&gt; Each rendition is cut into short segments and listed in playlists (&lt;code&gt;.m3u8&lt;/code&gt;). This is the same adaptive bitrate idea used for on-demand video: the player picks the rendition that fits the viewer's bandwidth and switches as conditions change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deliver (CDN).&lt;/strong&gt; Segments are cached on edge servers close to viewers, so ten viewers and ten thousand viewers put very different load on the CDN, not on your origin.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;RTMP survives as an ingest protocol because almost every encoder supports it. It's no longer used for playback, since browsers dropped Flash. That's why most services, including YouTube Live, Mux, Cloudflare Stream, Amazon IVS and TPStreams, take RTMP (or RTMPS) in and deliver HLS or a similar HTTP format out.&lt;/p&gt;

&lt;h2&gt;
  
  
  OBS settings that actually matter
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;Settings → Stream&lt;/strong&gt;, pick the "Custom..." service and paste the server URL and stream key from your platform.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Settings → Output&lt;/strong&gt; (Advanced mode):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Encoder:&lt;/strong&gt; a hardware encoder (NVENC, AMD, Apple VT) if you have one, otherwise x264. Hardware encoding leaves your CPU free for slides, browser tabs and everything else in the class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate control:&lt;/strong&gt; CBR. Constant bitrate keeps ingest predictable; variable bitrate can spike when you switch from a static slide to a moving camera.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bitrate:&lt;/strong&gt; roughly 4,500–6,000 Kbps for 1080p30, or 2,500–4,000 Kbps for 720p30. A common rule of thumb is to use no more than about half of your measured upload speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyframe interval:&lt;/strong&gt; 2 seconds. Packagers cut HLS segments on keyframes; leaving this on "auto" can produce irregular segments and playback stalls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio:&lt;/strong&gt; AAC, 48 kHz, 128–160 Kbps. For a lecture, audio matters more than video. Viewers forgive a soft picture, not crackly speech.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;strong&gt;Settings → Video&lt;/strong&gt;, set the output resolution and frame rate you actually want to send. 30 fps is plenty for slides and a talking head.&lt;/p&gt;

&lt;p&gt;Always check your platform's recommended values too; some cap input bitrate or resolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency is a trade-off
&lt;/h2&gt;

&lt;p&gt;Standard HLS live streams commonly run several seconds to around half a minute behind real time, because the player buffers a few segments before it starts. Shorter segments and low-latency HLS reduce that, at the cost of more requests and less buffer against network hiccups. For a lecture with chat-based Q&amp;amp;A, a few seconds of delay is fine. For a real two-way conversation, use a WebRTC-based meeting tool rather than an RTMP-to-HLS pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  DVR and recording come almost for free
&lt;/h2&gt;

&lt;p&gt;A live HLS stream is just a growing playlist of segments. If the platform keeps the older segments available, viewers can pause and rewind while the stream is still live (DVR). A student who joins 20 minutes late can go back to the start. The same segments can be stitched into an on-demand recording when the stream ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Protecting a paid live class
&lt;/h2&gt;

&lt;p&gt;A public stream URL can be shared in seconds. The usual controls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token-based or signed playback URLs&lt;/strong&gt; that are issued per viewer after login and expire.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain restrictions&lt;/strong&gt;, so the player only works when embedded on your own site or app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encryption or DRM&lt;/strong&gt; (Widevine, FairPlay), so segments can't simply be pulled and replayed by a downloader.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A private stream key.&lt;/strong&gt; Anyone with it can broadcast into your session, so rotate it if it leaks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dropped frames (network) in OBS's status bar:&lt;/strong&gt; your bitrate is too high for your upload. Lower it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Encoding overloaded":&lt;/strong&gt; switch to a hardware encoder or a faster x264 preset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Viewers buffering while OBS looks clean:&lt;/strong&gt; the problem is probably on the delivery side. Check that adaptive renditions are enabled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stream won't connect:&lt;/strong&gt; re-copy the server URL and key, and check that your network allows outbound port 1935 (RTMP) or 443 (RTMPS).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How this looks in TPStreams
&lt;/h2&gt;

&lt;p&gt;In TPStreams you create a live session in the dashboard and get an RTMP URL and stream key to paste into OBS, vMix, Wirecast or a hardware encoder. The platform delivers adaptive HLS over a global CDN, supports DVR during the stream, protects playback with token-based access and encrypted delivery, and records every session automatically so it's available as on-demand video when the stream ends.&lt;/p&gt;

&lt;p&gt;More on how it works: &lt;a href="https://tpstreams.com/live-streaming/" rel="noopener noreferrer"&gt;https://tpstreams.com/live-streaming/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>streaming</category>
      <category>obs</category>
      <category>livestreaming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Adaptive bitrate streaming with HLS, explained for web developers</title>
      <dc:creator>Monisha</dc:creator>
      <pubDate>Tue, 10 Nov 2026 05:59:04 +0000</pubDate>
      <link>https://dev.to/monisha_90/adaptive-bitrate-streaming-with-hls-explained-for-web-developers-3ao8</link>
      <guid>https://dev.to/monisha_90/adaptive-bitrate-streaming-with-hls-explained-for-web-developers-3ao8</guid>
      <description>&lt;p&gt;Disclosure: I work at TPStreams, a video hosting and streaming platform. This post explains the general technique, which applies whichever provider (or none) you use.&lt;/p&gt;

&lt;p&gt;If you've ever put an MP4 behind a &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; tag and watched it stall on a phone over 4G, you've hit the problem adaptive bitrate (ABR) streaming solves. Here's how it works with HLS, the format you'll meet most often.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with a single file
&lt;/h2&gt;

&lt;p&gt;A single MP4 has one resolution and one bitrate. Encode it at 1080p and 5 Mbps and viewers on slow connections buffer; encode it at 480p and everyone on fibre gets a blurry picture. The network a viewer has at minute one is also not the network they have at minute ten.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: many renditions, small segments
&lt;/h2&gt;

&lt;p&gt;ABR fixes this with two moves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Encode several renditions&lt;/strong&gt; of the same video, for example 240p, 360p, 480p, 720p and 1080p, each at a different bitrate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cut each rendition into short segments&lt;/strong&gt; (typically 2 to 6 seconds) aligned at the same timestamps, so the player can switch rendition at any segment boundary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The player measures how fast segments are downloading and picks the best rendition the connection can sustain, switching up or down as conditions change.&lt;/p&gt;

&lt;h2&gt;
  
  
  What HLS looks like on disk
&lt;/h2&gt;

&lt;p&gt;HLS (HTTP Live Streaming) describes all this with plain-text playlists (&lt;code&gt;.m3u8&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;multivariant (master) playlist&lt;/strong&gt; lists the renditions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
360p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=854x480,CODECS="avc1.4d401f,mp4a.40.2"
480p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2"
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
1080p/index.m3u8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each &lt;strong&gt;media playlist&lt;/strong&gt; lists that rendition's segments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="init.mp4"
#EXTINF:6.0,
seg_0001.m4s
#EXTINF:6.0,
seg_0002.m4s
#EXT-X-ENDLIST
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything is served over ordinary HTTP, so any CDN can cache it. That is a big reason HLS won: no special streaming server is needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Producing renditions yourself with FFmpeg
&lt;/h2&gt;

&lt;p&gt;A minimal two-rendition ladder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffmpeg -i input.mp4 \
  -filter_complex &lt;span class="s2"&gt;"[0:v]split=2[v1][v2];[v1]scale=-2:720[v720];[v2]scale=-2:360[v360]"&lt;/span&gt; \
  -map &lt;span class="s2"&gt;"[v720]"&lt;/span&gt; -c:v:0 libx264 -b:v:0 2800k -maxrate:v:0 3000k -bufsize:v:0 5600k \
  -map &lt;span class="s2"&gt;"[v360]"&lt;/span&gt; -c:v:1 libx264 -b:v:1 800k -maxrate:v:1 900k -bufsize:v:1 1600k \
  -map a:0 -map a:0 -c:a aac -b:a 128k \
  -g 48 -keyint_min 48 -sc_threshold 0 \
  -f hls -hls_time 6 -hls_playlist_type vod \
  -hls_segment_type fmp4 \
  -master_pl_name master.m3u8 \
  -var_stream_map &lt;span class="s2"&gt;"v:0,a:0 v:1,a:1"&lt;/span&gt; \
  out/%v/index.m3u8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The flags that matter most for ABR:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-g&lt;/code&gt;, &lt;code&gt;-keyint_min&lt;/code&gt; and &lt;code&gt;-sc_threshold 0&lt;/code&gt; give a fixed keyframe interval (2 seconds at 24 fps here), so every rendition has keyframes at the same points. Without aligned keyframes, switching causes visible glitches.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-maxrate&lt;/code&gt; and &lt;code&gt;-bufsize&lt;/code&gt; cap bitrate spikes, so the &lt;code&gt;BANDWIDTH&lt;/code&gt; value the player relies on is honest.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-hls_time&lt;/code&gt; sets segment length. Shorter segments react faster to network changes but mean more requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Playing it in the browser
&lt;/h2&gt;

&lt;p&gt;Safari plays HLS natively. Elsewhere, use a library such as hls.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;video&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"v"&lt;/span&gt; &lt;span class="na"&gt;controls&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/video&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/hls.js@1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;video&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'v'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/out/master.m3u8'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;canPlayType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'application/vnd.apple.mpegurl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Hls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSupported&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Hls&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;hls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loadSource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;hls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attachMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;hls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Hls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LEVEL_SWITCHED&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Now playing level'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open DevTools, go to the Network tab, throttle to "Slow 4G", and you'll see the player drop to the 360p segments, then climb back up when you remove the throttle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unaligned keyframes&lt;/strong&gt; across renditions (see above).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A ladder that's too sparse.&lt;/strong&gt; Jumping straight from 360p to 1080p makes every switch obvious. Add steps in between.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No low rung.&lt;/strong&gt; A 240p rendition at a few hundred kbps keeps mobile viewers watching instead of buffering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting CORS&lt;/strong&gt; on the CDN when the player page and the segments live on different domains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treating HLS as security.&lt;/strong&gt; Splitting a video into segments does not stop downloading; tools reassemble HLS easily. Protection needs encryption, DRM (Widevine and FairPlay) and access tokens, which is a separate topic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build or buy?
&lt;/h2&gt;

&lt;p&gt;Running FFmpeg yourself is fine for a handful of videos. At scale you'll also need a job queue, storage, a CDN, captions, analytics and possibly DRM. Managed services such as Mux, Cloudflare Stream, Bunny Stream, Gumlet, VdoCipher, AWS Elemental MediaConvert and TPStreams generate the rendition ladder for you; compare them on output formats, DRM support, pricing model and where your viewers are.&lt;/p&gt;

&lt;p&gt;If you want to see how we handle multi-rendition transcoding (240p to 4K, HLS and DASH), it's described here: &lt;a href="https://tpstreams.com/transcoding-video/" rel="noopener noreferrer"&gt;https://tpstreams.com/transcoding-video/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>video</category>
      <category>streaming</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How DRM actually protects course videos (and what it doesn't)</title>
      <dc:creator>Monisha</dc:creator>
      <pubDate>Tue, 03 Nov 2026 07:11:56 +0000</pubDate>
      <link>https://dev.to/monisha_90/how-drm-actually-protects-course-videos-and-what-it-doesnt-34mb</link>
      <guid>https://dev.to/monisha_90/how-drm-actually-protects-course-videos-and-what-it-doesnt-34mb</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I work at TPStreams, a video hosting platform for course businesses. This post is about how the technology works, not about any one product.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you sell video courses, sooner or later someone asks: "Can people download my videos?" The honest answer depends on how the video is delivered. Here's what each layer of protection actually does.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A private link isn't protection
&lt;/h2&gt;

&lt;p&gt;Many setups hide the video from public listings and only allow embeds on your own domain. That stops casual link sharing, and it's worth doing. But if the browser can fetch the video file or the HLS segments directly, browser extensions and download tools can usually save them.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. HLS with AES-128: better, but the key is reachable
&lt;/h2&gt;

&lt;p&gt;Plain HLS encryption (AES-128) encrypts each segment, but the player has to fetch the key over HTTP to play the video. Anyone who can play the video can usually get the key too, so tools that understand HLS can decrypt and save it. Protecting the key URL with tokens raises the bar, but the key still ends up in the browser's memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. DRM: the key never reaches your JavaScript
&lt;/h2&gt;

&lt;p&gt;DRM (Google Widevine on Chrome, Android and many smart TVs; Apple FairPlay on Safari, iPhone, iPad and Apple TV) changes the model:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Each video is encrypted with its own content key, which is stored on a license server, not next to the video.&lt;/li&gt;
&lt;li&gt;When a viewer presses play, the player asks the license server for a license. Your backend attaches a short-lived token proving that this user is allowed to watch.&lt;/li&gt;
&lt;li&gt;The license server checks the token and the device, then returns a license with the key and the playback rules (for example, maximum resolution).&lt;/li&gt;
&lt;li&gt;The device's DRM module decrypts the video inside a protected path. Your page's JavaScript never sees the key or the decrypted frames.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's why ordinary download tools stop working. On devices with hardware-backed DRM (Widevine L1, FairPlay), screen-capture tools often record a black rectangle instead of the video.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Tokens: stop link sharing
&lt;/h2&gt;

&lt;p&gt;Generate a short-lived token for every playback request on your server, after you've checked the user's login and purchase. Without a valid token, the license request fails. This is what stops people from pasting an embed code or stream URL into a Telegram group.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Watermarking: for what DRM can't stop
&lt;/h2&gt;

&lt;p&gt;DRM can't stop someone pointing a phone at the screen, and software-only DRM (Widevine L3 on some desktop setups) is weaker against screen recording. A visible watermark with the viewer's name, email or user ID, placed differently for each session, doesn't prevent recording, but it makes leaked copies traceable. In practice, that deters most sharing.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Low-priced or free content:&lt;/strong&gt; domain-restricted embeds are often enough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paid courses, test prep, anything people resell:&lt;/strong&gt; DRM (Widevine + FairPlay), per-playback tokens issued by your backend, and a per-viewer watermark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile apps:&lt;/strong&gt; use the platform's native DRM SDKs (ExoPlayer/Media3 with Widevine on Android, AVPlayer with FairPlay on iOS) rather than a WebView.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Before you commit,&lt;/strong&gt; test your provider's player on Chrome, Safari, an Android phone and an iPhone, and try a couple of common download extensions against it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Providers that handle DRM, tokens and watermarking for you include VdoCipher, Gumlet, Bunny Stream and TPStreams. A longer write-up of how the license flow works is &lt;a href="https://tpstreams.com/drm-and-content-security/" rel="noopener noreferrer"&gt;on the TPStreams blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>video</category>
      <category>security</category>
      <category>webdev</category>
      <category>streaming</category>
    </item>
  </channel>
</rss>
