DeadAir: play episodes through an HLS playlist of the original instead of a copy #181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
.m3u8route built from thedeadairrow's cuts and the frames' byte positions, plus a piece route if each piece needs a timestamp tag in front.to_copy/to_originalcarry over unchanged..m4aneeds repackaging; MP3 and ADTS AAC do not.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.