I recently shipped a Chrome extension that saves online course lessons as MP4 files. The video side turned out to be the hard part: the lessons are HLS streams, and Manifest V3 doesn't make big binary jobs easy. Here are the problems I hit and what worked, in case you're building anything similar.
The shape of the problem
An HLS lesson isn't one file. The player loads a master playlist (.m3u8), picks a quality, then fetches a few hundred 2–6 second segments (MPEG-TS or fMP4). Often audio is a separate rendition. To give the user one .mp4 you have to:
find the right playlist,
download every segment (fast, but without hammering the host),
remux video + audio into an MP4 container,
hand the result to chrome.downloads.
1. Finding the playlist: webRequest, not page scraping
The cleanest signal is the player's own network traffic. A chrome.webRequest.onBeforeRequest listener (read-only, no blocking) sees the .m3u8 URL the moment the player asks for it:
chrome
Discussion
Be the first to comment
Add your perspective to get the discussion started.