DeadAir: play episodes through an HLS playlist of the original instead of a copy #181

Closed
opened 2026-10-09 19:46:32 -07:00 by rays · 1 comment
Owner

If the test in the previous issue works: serve a DeadAir episode as an HLS playlist made from its cuts, a byte range of the original for each stretch kept, instead of an ffmpeg copy.

  • An .m3u8 route built from the deadair row's cuts and the frames' byte positions, plus a piece route if each piece needs a timestamp tag in front.
  • Positions: the playlist's time is the copy's time, so to_copy/to_original carry over unchanged.
  • Browsers without native HLS (Chrome and Firefox on a computer): hls.js, or keep the copy for them.
  • AAC in .m4a needs repackaging; MP3 and ADTS AAC do not.
  • If it replaces copies entirely, the copy step, its TTL (#179) and the switch in #178 go away.
If the test in the previous issue works: serve a DeadAir episode as an HLS playlist made from its cuts, a byte range of the original for each stretch kept, instead of an ffmpeg copy. - An `.m3u8` route built from the `deadair` row's cuts and the frames' byte positions, plus a piece route if each piece needs a timestamp tag in front. - Positions: the playlist's time is the copy's time, so `to_copy`/`to_original` carry over unchanged. - Browsers without native HLS (Chrome and Firefox on a computer): hls.js, or keep the copy for them. - AAC in `.m4a` needs repackaging; MP3 and ADTS AAC do not. - If it replaces copies entirely, the copy step, its TTL (#179) and the switch in #178 go away.
rays added the enhancement label 2026-10-09 19:46:32 -07:00
Author
Owner

Done in 089202f, deployed as 0.11.1-dev. DeadAir stores a plan per pause length (the cuts, and the frames kept as byte ranges) in deadair_plans. /media/{id}/deadair.m3u8 serves the listener's plan as an HLS playlist of ranges of /media/{id}/deadair.mp3, the original. Apple's browsers play it themselves; everything else uses hls.js 1.6.19 (the light build), loaded only when needed. Chromium claims native HLS but fails on MP3 ranges ('stream parsing failed'), so canPlayType alone is not trusted. Only MP3 and ADTS AAC are handled: AAC in MP4 has no usable ranges, and the library has no .m4a files. On first start the old copies and their table were removed (2 files). The first episode was analysed in 2.4s, and a production playlist came back 200 with 312 pieces.

Done in 089202f, deployed as 0.11.1-dev. DeadAir stores a plan per pause length (the cuts, and the frames kept as byte ranges) in deadair_plans. /media/{id}/deadair.m3u8 serves the listener's plan as an HLS playlist of ranges of /media/{id}/deadair.mp3, the original. Apple's browsers play it themselves; everything else uses hls.js 1.6.19 (the light build), loaded only when needed. Chromium claims native HLS but fails on MP3 ranges ('stream parsing failed'), so canPlayType alone is not trusted. Only MP3 and ADTS AAC are handled: AAC in MP4 has no usable ranges, and the library has no .m4a files. On first start the old copies and their table were removed (2 files). The first episode was analysed in 2.4s, and a production playlist came back 200 with 312 pieces.
rays closed this issue 2026-10-10 12:49:38 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#181