<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ media - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ media - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Wed, 24 Jun 2026 20:19:23 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/media/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ HLS Video Streaming: What it is, and When to Use it ]]>
                </title>
                <description>
                    <![CDATA[ By Anton Garcia Diaz In this short article I will focus on HLS, the most extended adaptive bitrate protocol for video delivery. I'll answer some of the main questions that anyone considering HLS for the first time will likely ask: what it is, when to... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-hls-and-when-to-use-it/</link>
                <guid isPermaLink="false">66d45da33dce891ac3a967b0</guid>
                
                    <category>
                        <![CDATA[ Adaptive Bitrate ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hls ]]>
                    </category>
                
                    <category>
                        <![CDATA[ media ]]>
                    </category>
                
                    <category>
                        <![CDATA[ video ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Video.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ VideoJS ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 18 Dec 2019 22:59:12 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/12/HLS-video.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Anton Garcia Diaz</p>
<p>In this short article I will focus on HLS, the most extended adaptive bitrate protocol for video delivery. I'll answer some of the main questions that anyone considering HLS for the first time will likely ask: what it is, when to use it, and how to use it. </p>
<p>To help along the way, I will show some examples using <a target="_blank" href="https://abraia.me/video/">an online video publishing tool</a> that you can freely use to test out the performance of HLS on your own.</p>
<h2 id="heading-what-is-hls-and-how-does-it-work">What is HLS and how does it work?</h2>
<p>HLS is a protocol defined by Apple to implement an adaptive bitrate streaming format that can be supported on their devices and software. Over the time, it has gained widespread support. </p>
<p>The most important feature of HLS is its ability to adapt the bitrate of the video to the actual speed of the connection. This optimizes the quality of the experience. </p>
<p>HLS videos are encoded in different renditions at different resolutions and bitrates. This is usually referred to as the bitrate ladder. When a connection gets slower, the protocol automatically adjusts the requested bitrate to the bandwidth available. </p>
<p>Compared to progressive videos, HLS avoids re-buffering and stalling effects as well as bloating the client connection. We can see it at work in this video.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://store.abraia.me/05bf471cbb3f9fa9ed785718e6f60e28/HLS-video/HLS_video-at-work/index.html">https://store.abraia.me/05bf471cbb3f9fa9ed785718e6f60e28/HLS-video/HLS_video-at-work/index.html</a></div>
<p>In essence, HLS provides a much better user experience when we use video content in our apps or sites.</p>
<p>It has native support in iOS and Android. It is also supported by Safari, and by using some JavaScript it is supported in all the main browsers (Chrome, Firefox, Edge). While using HLS requires some effort, it's not a big deal. </p>
<p>Let's see when we should use it and how.</p>
<h2 id="heading-when-should-we-use-hls">When should we use HLS?</h2>
<p>There are cases where videos are not that heavy. For instance, you could have a sequence of images encoded as a 1-2 seconds video, with a weight of less than 1 MB. In this case, a progressive video – that can be consumed, like an image, using plain HTML5 – is for sure the best option. HLS does not offer any advantage here.</p>
<p>But, HLS does make sense when we want to deliver high resolution videos (HD or over) with a weight over 3MB. This type of content may kill our web UX when viewed on an average mobile connection. </p>
<p>It's worth noting that this is the case in an increasing amount of media content, including many short videos of less than 20 seconds used in ecommerce and marketing contexts. In the example at the beginning of the post, we have a full HD video of only 9 seconds that weights in at over 6MB.</p>
<h2 id="heading-how-can-we-use-hls-in-our-sites">How can we use HLS in our sites?</h2>
<p>To use HLS we have to address a number of aspects. I'll focus on two important points:  </p>
<ul>
<li>the need to encode the video, and, </li>
<li>the need to embed it in our page. </li>
</ul>
<p>For a more comprehensive view on what a general video publishing pipeline entails, you may check out <a target="_blank" href="https://www.freecodecamp.org/news/short-videos-in-web-and-ecommerce-workflows/">this post</a>.</p>
<h3 id="heading-hls-encoding">HLS encoding</h3>
<p>We can encode videos in HLS in-house or by using a third party service. To build an in-house encoder, the best option is to use FFMPEG, a powerful open source library for video processing and encoding. In this case, we should analyse the content we are going to encode and set a number of parameters. </p>
<p>In HLS we should define a bitrate ladder (the bitrates and resolutions of each step) and the length of chunks. When we encode a video, we end with a set of playlists and chunks. Typically, we end the former with .m3u8 and the latter with .ts extensions. We can see an example in the next image.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/12/imaxe.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see one master playlist, one additional playlist per rendition, and all the chunks of each rendition. The master playlist specifies the bitrate ladder and the relative path to each rendition.</p>
<p>Apple makes a generic recommendation specifying the bitrate ladder and a chunk duration of 10 seconds.  However, this is not very useful for many types of content, like the short videos common in ecommerce and marketing. </p>
<p>In fact, the best approach is to tune the bitrate ladder specifically to the content of the video. In this case, if you want to make the most of HLS and you're not expert in encoding, a third party service providing per-title encoding (with HLS) is likely the right choice.</p>
<h2 id="heading-hls-players">HLS players</h2>
<p>Here, we find two main options. We can stick to the HTML5 player or we can use one implemented in JavaScript.</p>
<h3 id="heading-html5-player">HTML5 player</h3>
<p>Recent Safari versions support HLS. In this case, you may use HLS playlists in the same manner as progressive videos. With other browsers, you may use a tiny JavaScript library to implement the HLS protocol and again use the HTML5 player for progressive videos. </p>
<p>This can be done with HLS.js. This library just implements the negotiation of renditions, based on the available bandwidth. Support is almost universal, only conditional on the support of the media element's API.</p>
<h3 id="heading-javascript-player">JavaScript Player</h3>
<p>In case we need to customise the video experience – which is pretty common in marketing and stories pages – then we need to use something other than the default HTML5 player. </p>
<p>While there are many commercial options out there, Video.js is a good choice. It's an open source player that supports a high degree of customization, including different skins and controls. </p>
<p>A player like Video.js also supports the tracking of video-related events (like play or pause actions) so we can include them in our own analytics. In fact, including these data in our Google Analytics is really easy.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/12/imaxe-2.png" alt="Image" width="600" height="400" loading="lazy">
<em>GA data for events tracked in a video viewed with a Video.js player</em></p>
<h2 id="heading-summary">Summary</h2>
<p>I've tackled the first questions about HLS that most potential users will have: what it is, and when we should use it.</p>
<p>While a video publishing pipeline reliant on HLS can be implemented and deployed in-house with open source tools like FFMPEG and video.js, it may be a good idea to use a <a target="_blank" href="https://abraia.me/video/">video publishing service</a> if you're not an expert in the tech. They bring advanced features like per-title encoding, take care of all the hard work, and let us focus on our customization needs.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Two days of work for 11 seconds of TV ]]>
                </title>
                <description>
                    <![CDATA[ By James Barnard Blink and you’ll miss it: How a two-day design project went by in an instant I recently completed a short project for the Sky Atlantic series The Tunnel, “a British-French crime drama”. With the third series Vengeance soon to be rel... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/two-days-of-work-for-11-seconds-of-tv-238a3b25aa62/</link>
                <guid isPermaLink="false">66c363bfc6c49ae59cf21b2a</guid>
                
                    <category>
                        <![CDATA[ creativity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ media ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tv ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vfx ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 09 Jan 2018 16:46:51 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*MY4Eb7czf6QwFdX1hdszFA.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By James Barnard</p>
<p>Blink and you’ll miss it: How a two-day design project went by in an instant</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/0MC4-tHwaiIEdVAbAdQVOjuDUkZmmnTOfYFs" alt="Image" width="800" height="447" loading="lazy"></p>
<p>I recently completed a short project for the Sky Atlantic series <em>The Tunnel</em>, “a British-French crime drama”. With the third series <em>Vengeance</em> soon to be released, Toby Welch (friend and producer of the show) reached out to me. He needed help filling some gaps in post-production</p>
<p>Usually (in Britain anyway), if a brand is used on a TV show, then the makers have obtained express permission to use it. I once met a graphic designer who worked on a well-known ITV soap. Their job it was to create fake drinks labels of all the spirits behind the bar because using the real ones would have been a legal ball-ache.</p>
<p>So when we film an exterior shot of our protagonists driving up to a hotel and pulling over outside, we can’t show the real name of the hotel. We have to come up with a fake one. And when shooting a show, it’s not always practical, timely or cost-effective to make real signage for a wall or the side of a building. It’s often cheaper to digitally add it later in post.</p>
<h3 id="heading-the-brief">The brief</h3>
<p>Toby needed two logos for the VFX team to superimpose on to two different scenes. The first was for an exterior shot of our protagonists driving up to a hotel and pulling over outside. He needed a fairly budget looking logo, and he would provide a pre-approved hotel name (signed off by legal).</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/fi0oE2s7TCxr508ACedVSTPdEJhKG-pa9UQ3" alt="Image" width="800" height="223" loading="lazy">
<em>Fill in the blanks. The spaces on the walls for post-production signage.</em></p>
<p>The second was for a fake institution called the “<em>Kent &amp; District IMMIGRATION REMOVAL CENTRE”.</em> This needed to be in a plain, black and white style that feels like ‘government’ and accompanied by a private security company badge. This would be added to an interior wall that an actress would walk past. I was provided with the unedited movie clips and asked to come up with some options.</p>
<p>This was a pretty cool brief, which turned out to be more work than I’d originally thought.</p>
<h3 id="heading-research">Research</h3>
<p>The first part of any branding project is research. For the hotel brand, I tried to find a color palette that was an amalgamation of the many roadside hotels that are so recognizable as cheap in the UK. Brands that want to scream ‘budget’ are often orange. However, hotels usually try and fake their luxuriousness with something like a blue gradient.</p>
<p>Without wanting to sound like a pretentious, creative industry w*nker, it’s incredibly tricky to not make the design look too good. You want to submit something to the client that says…</p>
<blockquote>
<p>“Honestly, I’m a good designer!”</p>
</blockquote>
<p>…but you can’t because anything too stylish or premium will be less believable in the scene!</p>
<p>The government sign was a little easier. The toughest part was picking a font that says ‘government’ without actually using the font on Gov.uk’s website, which you’re not allowed to do (I checked). Toby had an idea of using a nautical emblem like an anchor, and I looked up Kent’s sigil, which is a rearing horse.</p>
<h3 id="heading-first-draft">First draft</h3>
<p>With a first draft done, I submitted some options…</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/R4l3YQcOBOQeqoWm6WTbm-iTxUiCX-Yw7IKv" alt="Image" width="800" height="237" loading="lazy">
<em>V1.</em></p>
<p>…which were met with a pretty positive response from the execs. The next round of amends tweaked the (far too intricate) tree to something a little bolder. The gap between the logo and the camera would be a factor, so the logomark for the hotel would need to stand out from a distance. Good advice for any branding project.</p>
<p>The immigration sign was met with approval, but the blue security logo was far more important to the scene than I’d realized. This needed some more work, and after another round of research of security firm logos, we eventually settled on these:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/zw5bt0VOKw6QHqqBD0xQfHuR1QZquSSMavwh" alt="Image" width="800" height="424" loading="lazy">
<em>The final versions submitted to the VFX team.</em></p>
<h3 id="heading-the-final-scenes">The final scenes</h3>
<p>As it turns out, the scene with the white wall was so hard for the VFX guys to track, that they ended up going with a much simpler adaptation in the final scene. There is such a wash of white on screen, with no frame of reference to track the movement of the camera, the team mocked a shorter version up onto a metal plaque. Thankfully, my corporate security logo survived.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/9xQgkIvxWSPtVCYntXlYPdMGbIYbEUS9IJA7" alt="Image" width="600" height="335" loading="lazy">
<em>Stanforth Lodge Hotel: <strong>Courtesy of Sky Atlantic</strong></em></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/5h97wx4oQCswX-yWGXmfowoV1VL-OVOTiZhg" alt="Image" width="600" height="337" loading="lazy">
<em>Immigration Removal Centre. Blink and you’ll miss it: <strong>Courtesy of Sky Atlantic</strong></em></p>
<p>I found the whole experience fascinating. It took two days of back and forth, plus lord-knows how much VFX work, to produce signs that appear on screen for a total of fewer than 11 seconds. All to tell the story just that little bit better.</p>
<p>I think that is <em>superb</em>, and I can not imagine what an involved process creating an entire TV series like this must be. Hats off to Toby and the team. Fingers crossed I get more work like this. Graphic design for TV and Film. It’s a dream job.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
