<?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: Shinya Yoshida</title>
    <description>The latest articles on DEV Community by Shinya Yoshida (@shinya_yoshida_640f423ef2).</description>
    <link>https://dev.to/shinya_yoshida_640f423ef2</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1803191%2Fb3e236ee-cb9a-4db0-89ea-c4cc97cd3e9d.jpg</url>
      <title>DEV Community: Shinya Yoshida</title>
      <link>https://dev.to/shinya_yoshida_640f423ef2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shinya_yoshida_640f423ef2"/>
    <language>en</language>
    <item>
      <title>From Cajon Jams to Code: Learning m3u8 and Subtitles with My Kids</title>
      <dc:creator>Shinya Yoshida</dc:creator>
      <pubDate>Sat, 26 Jul 2025 04:36:41 +0000</pubDate>
      <link>https://dev.to/shinya_yoshida_640f423ef2/from-cajon-jams-to-code-learning-m3u8-and-subtitles-with-my-kids-1k78</link>
      <guid>https://dev.to/shinya_yoshida_640f423ef2/from-cajon-jams-to-code-learning-m3u8-and-subtitles-with-my-kids-1k78</guid>
      <description>&lt;p&gt;Recently, while working on a TV app that uses .m3u8 video files (HLS — HTTP Live Streaming), I started diving into how video content and subtitles are structured under the hood. What began as a technical exploration turned into a delightful learning experience I could share with my kids — and a foundational step toward designing creative workshops for young learners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Started Learning About .m3u8
&lt;/h2&gt;

&lt;p&gt;Our team is building a TV streaming application professionally, and much of the content we deal with is formatted in .m3u8. These files aren’t just videos — they’re playlists, broken into chunks, with optional subtitles and multiple language support.&lt;/p&gt;

&lt;p&gt;Understanding .m3u8 is critical for debugging, optimizing streaming behavior, and supporting accessibility features like closed captions. But instead of just reading docs or staring at code, I decided to try building one myself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Creating HLS From a Local Video
&lt;/h2&gt;

&lt;p&gt;I used FFmpeg to split a local .mp4 file into .ts segments and generate a .m3u8 playlist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ffmpeg -i video.mp4 \
  -codec: copy \
  -start_number 0 \
  -hls_time 6 \
  -hls_list_size 0 \
  -f hls video.m3u8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gave me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;video0.ts, video1.ts, etc.&lt;/li&gt;
&lt;li&gt;video.m3u8 — the media playlist&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Adding Subtitles with WebVTT
&lt;/h2&gt;

&lt;p&gt;I created a simple .vtt file in English with timestamps. Then we made a subtitle playlist (subtitles-en.m3u8) and finally added a master.m3u8 file that linked everything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#EXTM3U

# English subtitle track
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",URI="subtitles-en.m3u8"


# Main video stream
#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2",SUBTITLES="subs"
video.m3u8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Sharing With My Kids 🎉
&lt;/h2&gt;

&lt;p&gt;Here’s where it got fun.&lt;/p&gt;

&lt;p&gt;We used a video of my kids playing cajon (a box-shaped percussion instrument), and I asked them to explain what they were doing. I transcribed their explanation — and had them help refine the wording.&lt;/p&gt;

&lt;p&gt;Then we displayed the subtitles alongside the video using the hls.js demo player, and their reactions were priceless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“That’s what I said!”&lt;/li&gt;
&lt;li&gt;“Can we make it say it in Japanese too?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So we translated the subtitles together and added a second .vtt file in Japanese. This turned into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Practice with verbal storytelling&lt;/li&gt;
&lt;li&gt;Writing and basic translation&lt;/li&gt;
&lt;li&gt;Understanding how text syncs with time and media
All wrapped in an activity that combined technology, language, creativity, and play.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;This was a fundamental technical experiment — but it helped me understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How HLS works at the file level&lt;/li&gt;
&lt;li&gt;How subtitle tracks are defined and structured&lt;/li&gt;
&lt;li&gt;How I might explain these systems to others — including children&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And more importantly, it opened up ideas for building workshops for kids that combine media and technology.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next
&lt;/h2&gt;

&lt;p&gt;I’m planning to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a simple HTML player with HLS.js&lt;/li&gt;
&lt;li&gt;Let kids record short clips, write their own subtitles, and display them&lt;/li&gt;
&lt;li&gt;Extend into more interactive media experiments (e.g., multiple languages, karaoke-style captions, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This journey reinforced something important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learning becomes more meaningful when we teach and share it with others — even (or especially) with kids.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I hope this inspires someone else to try turning their learning process into a creative family or community project.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
