<?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: Alexander Obidnov</title>
    <description>The latest articles on DEV Community by Alexander Obidnov (@obidnov).</description>
    <link>https://dev.to/obidnov</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%2F4240997%2F8651abb5-df8c-426f-949a-50ec696cb23a.jpg</url>
      <title>DEV Community: Alexander Obidnov</title>
      <link>https://dev.to/obidnov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/obidnov"/>
    <language>en</language>
    <item>
      <title>Building a 24/7 HLS channel from VOD files: what breaks the stream</title>
      <dc:creator>Alexander Obidnov</dc:creator>
      <pubDate>Thu, 19 Nov 2026 16:02:05 +0000</pubDate>
      <link>https://dev.to/dodocast/building-a-247-hls-channel-from-vod-files-what-breaks-the-stream-2ib8</link>
      <guid>https://dev.to/dodocast/building-a-247-hls-channel-from-vod-files-what-breaks-the-stream-2ib8</guid>
      <description>&lt;p&gt;A linear channel built from a VOD library is a common request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a film club wants an evening stream on its website&lt;/li&gt;
&lt;li&gt;an online school wants lectures to replay around the clock&lt;/li&gt;
&lt;li&gt;a brand wants its videos to loop on in-store screens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of them has a live encoder. They only have uploaded files. They still want these things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every viewer sees the same thing at the same moment&lt;/li&gt;
&lt;li&gt;a show starts at 8:00 PM&lt;/li&gt;
&lt;li&gt;a "now / next" box sits next to the player&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HLS is just playlists of segments. So the first idea is simple: take the segments of the first video, then the second, then the third. Serve them as one live playlist that keeps growing and never gets &lt;code&gt;#EXT-X-ENDLIST&lt;/code&gt;. The player doesn't care where segments come from, as long as they keep coming.&lt;/p&gt;

&lt;p&gt;That works while every video is alike and nobody touches the program. Below is where it broke for us with a real library, and what we did about it in the 24/7 channel in dodocast.&lt;/p&gt;

&lt;p&gt;Our demo channel, Open Movies 24/7, runs on dodocast: six short films (Blender Foundation open movies under CC BY and a NASA clip) play in a 22-minute loop, and a "Caminandes marathon" show starts every day at 8:00 PM UTC. The stream is public, and the examples below use it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://watch.dodocast.com/ch/cBlTOROrQI" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frxwqmvo3aq8fyi6mcsbb.webp" alt="The demo channel page: now playing, up next, a loop of 6 videos (22:04) and the Caminandes marathon show at 20:00 UTC" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The master playlist is a contract for the whole session
&lt;/h2&gt;

&lt;p&gt;In a live stream, the player keeps re-reading the media playlists. It reads the master playlist only once, when playback starts. From then on, it trusts what the master playlist declares: the renditions, resolutions, codecs, audio groups and subtitle groups. An illustrative example:&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-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANGUAGE="en",NAME="English",DEFAULT=YES,URI="audio/en.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANGUAGE="es",NAME="Español",URI="audio/es.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="en",NAME="English",URI="subs/en.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",AUDIO="aud",SUBTITLES="subs"
1080p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2",AUDIO="aud",SUBTITLES="subs"
720p/index.m3u8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a single video, you never notice this. With a channel, every video that goes on air during playback must match what the master playlist declared. A real library doesn't match:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;some videos were uploaded in 1080p, some only in 720p&lt;/li&gt;
&lt;li&gt;one film is 2.39:1, and the rest are 16:9&lt;/li&gt;
&lt;li&gt;another has no Spanish track&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the player plays 1080p and the next video has no 1080p, the player has nothing to download.&lt;/p&gt;

&lt;p&gt;So a dodocast channel has a fixed format. The format sets which qualities the channel broadcasts (240p to 1080p) and one aspect ratio for all of them. A video that doesn't fit stays out of the program. That is better than a broken stream for everyone who is already watching. The console shows the reason:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Label&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;"missing 1080p"&lt;/td&gt;
&lt;td&gt;The video lacks a quality that the channel declared.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"1080p encoding…"&lt;/td&gt;
&lt;td&gt;The video was just uploaded, and its 1080p encode isn't finished yet. It fits once encoding is done.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"too wide"&lt;/td&gt;
&lt;td&gt;Its frame is wider than the channel's frame, for example a 2.39:1 film in a 16:9 channel.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In &lt;code&gt;CODECS&lt;/code&gt;, &lt;code&gt;avc1.640028&lt;/code&gt; means H.264 High profile at level 4.0. The browser reads this string to decide if its decoder can handle the video. If the channel declares only the level of the videos in the program now, a heavier video added later can fail on some devices. So the channel declares an upper limit with some headroom (the console calls it "Codec level headroom"). A video added on air stays within that limit. Very old devices refuse a high declared level. If they matter to you, you can turn the headroom off, but then the risk with heavier videos comes back.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;AUDIO&lt;/code&gt; and &lt;code&gt;SUBTITLES&lt;/code&gt; groups work the same way. Say the channel declared English and Spanish, and the next video has only English. Someone must decide what a viewer who picked Spanish will hear. We left that decision to the channel owner. The owner sets which languages the channel promises. For videos without those languages, the owner picks one of two options: fall back to the video's default track, or keep the video off the air. If you declare no subtitles, the player shows none, even when the videos have them.&lt;/p&gt;

&lt;p&gt;For the same reason, you can change the format, the subtitle languages and the encryption key only while the channel is off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Editing the program without a cut
&lt;/h2&gt;

&lt;p&gt;The program changes too. People add new videos, remove old ones and reorder the rest, and they want to do it on air. If an edit applies instantly, a viewer in the middle of one video lands at a random point in another.&lt;/p&gt;

&lt;p&gt;In dodocast, an edit publishes a new version of the program. The new version takes effect at the next boundary between videos. Until then, the previous version keeps playing. The console shows "Edit takes effect at 9:36 PM" and marks videos as "added" or "removed". The viewer just sees the next video start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7becfd43edsrif81u7oj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7becfd43edsrif81u7oj.webp" alt="The Program tab of the demo channel on air: six videos, a 22:04 loop, the next air time of each video" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A schedule on top of the loop
&lt;/h2&gt;

&lt;p&gt;The program is a loop that runs forever. But TV runs on the clock: a marathon at 8:00 PM, lectures on weekdays at 9:00 AM. So shows sit on a schedule above the loop.&lt;/p&gt;

&lt;p&gt;A show is a video or a whole playlist at a set time: once, every day or on chosen weekdays. A show lasts from 1 to 1,440 minutes. If the material is longer, the channel cuts it. If it is shorter, the channel fills the rest with filler. Shows can't overlap.&lt;/p&gt;

&lt;p&gt;Show times use the channel's time zone. So "every day at 8:00 PM" stays at 8:00 PM after daylight saving changes. It doesn't drift by an hour twice a year.&lt;/p&gt;

&lt;p&gt;We also had to decide what the loop does when a show ends. There was no single right answer, so it's a channel setting:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;After a show&lt;/th&gt;
&lt;th&gt;Good for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;From the start&lt;/td&gt;
&lt;td&gt;The loop starts over.&lt;/td&gt;
&lt;td&gt;a short filler program that you want shown in full&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continue&lt;/td&gt;
&lt;td&gt;The loop continues from the point where the show interrupted it.&lt;/td&gt;
&lt;td&gt;a long program where a repeat of the start would be annoying&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Background air&lt;/td&gt;
&lt;td&gt;The loop kept running the whole time. The show just played over it.&lt;/td&gt;
&lt;td&gt;a "real TV" channel whose background runs on its own clock&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can edit the schedule on air as well. The channel recalculates the schedule within a minute. Viewers see the change from the next showing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0nq3lceyk9dnjh7j22p.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0nq3lceyk9dnjh7j22p.webp" alt="The Schedule tab of the demo channel: UTC time zone, Continue between shows, the Caminandes marathon show" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  EPG and encryption
&lt;/h2&gt;

&lt;p&gt;A channel on a website almost always needs a "now playing" box or a program guide next to it. The channel publishes its current state and its guide as JSON with open CORS. So you can query them straight from the browser, and you don't need to scrape the player. Both requests below work against the demo channel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7akwxjud44ekgd79uji.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7akwxjud44ekgd79uji.webp" alt="The Channel data as JSON block on the channel's Overview tab in the console, with both links" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The state says which video is on now, which is next, and when the next show starts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://stream.dodocast.com/public/ch/cBlTOROrQI"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A trimmed response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Open Movies 24/7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ON"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"currentItem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Wing It!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088122186&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088360080&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nextItem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Big Buck Bunny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088360080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088994505&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nextShow"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Caminandes marathon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118400000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118820000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;
  Full response
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cBlTOROrQI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Open Movies 24/7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"tags"&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="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ON"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"serverTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088315571&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"itemCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"totalDurationMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1324106&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"encrypted"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"poster"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://stream.dodocast.com/preview/xOa9tZc7QO/cover.jpg?v=4ed796473e0a3fba01e92351074b25f147caa1eb3c33a090f026009ec0a356e1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"currentItem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"xOa9tZc7QO"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Wing It!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"durationMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;237894&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088122186&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088360080&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nextItem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"x10F5HR9Zt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Big Buck Bunny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"durationMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;634425&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088360080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795088994505&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"currentShow"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nextShow"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Caminandes marathon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118400000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118820000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"access"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PUBLIC"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"granted"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"requiresPassword"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"embedding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ALL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"domains"&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="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"theme"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"colorPrimary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"indigo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"colorNeutral"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"zinc"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"watchLayout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"LIVE_STAGE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"mp4"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://stream.dodocast.com/ch/mp4/cBlTOROrQI/master.m3u8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://stream.dodocast.com/ch/ts/cBlTOROrQI/master.m3u8"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The pen below uses only this request and hls.js. The player plays the demo channel, and the box under it refreshes when a video ends.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Alexander-Obidnov/embed/ramxVpJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The guide lists only the scheduled shows, not the videos in the loop. By default, it covers the next 24 hours; with &lt;code&gt;from&lt;/code&gt; and &lt;code&gt;to&lt;/code&gt; (Unix time in milliseconds), it can cover up to two weeks. This asks for the next seven days:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;FROM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;date +%s&lt;span class="o"&gt;)&lt;/span&gt;000&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$(&lt;/span&gt;date +%s&lt;span class="o"&gt;)&lt;/span&gt; + 7*86400 &lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;000
curl &lt;span class="s2"&gt;"https://stream.dodocast.com/public/ch/cBlTOROrQI/epg?from=$FROM&amp;amp;to=$TO"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;
  Response (the first two of seven entries)
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cBlTOROrQI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Open Movies 24/7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"serverTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795089367508&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"entries"&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="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118400000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795118820000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Caminandes marathon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"poster"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://stream.dodocast.com/preview/V0bfQXjss9/cover.jpg?v=c8225aa7388e60b3bb82adc7856d621fb44a85a410c2e6fe338fa7eac95b2bf3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"subtitles"&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="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"startsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795204800000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"endsAtMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1795205220000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Caminandes marathon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"poster"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://stream.dodocast.com/preview/V0bfQXjss9/cover.jpg?v=c8225aa7388e60b3bb82adc7856d621fb44a85a410c2e6fe338fa7eac95b2bf3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"subtitles"&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="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://dodocast.com/developers/player-sdk/" rel="noopener noreferrer"&gt;Player SDK&lt;/a&gt; wraps this. &lt;code&gt;getChannelState()&lt;/code&gt; returns now and next, &lt;code&gt;getChannelGuide()&lt;/code&gt; returns up to two weeks, and &lt;code&gt;progress()&lt;/code&gt; returns how far into the current show you are.&lt;/p&gt;

&lt;p&gt;A program also easily mixes encrypted and unencrypted videos. If each video brings its own key, the player switches keys at every boundary. An open video in the middle of an encrypted stream leaves a hole. So the channel has its own key. It ignores the encryption settings of each video and encrypts the segments as it delivers them. AES-128 and SAMPLE-AES protect against casual downloading. They aren't DRM, and the site says so.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the channel doesn't do yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;take a live feed from a camera or an encoder&lt;/li&gt;
&lt;li&gt;insert ad breaks into the stream (SCTE-35)&lt;/li&gt;
&lt;li&gt;let viewers rewind the channel (DVR)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A one-off broadcast in Premiere mode does let viewers rewind to its start, but not skip ahead.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://dodocast.com/tour/" rel="noopener noreferrer"&gt;2-minute dodocast tour&lt;/a&gt; shows all of this in the console. Our free &lt;a href="https://dodocast.com/tools/hls-player/" rel="noopener noreferrer"&gt;HLS player&lt;/a&gt; shows what is inside any HLS stream: its renditions, &lt;code&gt;CODECS&lt;/code&gt; and tracks. It also plays the stream with hls.js or with the browser's built-in player, so you can compare the two.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I work on dodocast, a video platform for hosting, 24/7 channels and scheduled broadcasts. Questions about building linear HLS from VOD are welcome in the comments.&lt;/em&gt;&lt;/p&gt;

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