DeadAir: play episodes with their silences shortened #171
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?
DeadAir: podcasts play with long silences shortened, so they finish sooner without sounding sped up.
Measured (2026-10-09, ffmpeg silencedetect, quieter than -38 dB for over 0.35 s, each silence cut to 0.2 s)
Clarkesworld is fiction read aloud: its pauses are part of the reading, so a feed has to be able to stay out.
For the 64-minute episode on Tower, one core: decode 5.5 s, find silences 6.5 s, cut and encode MP3 32 s, AAC 76 s. Streamed, the first 30 s of output take 0.4 s. Copying the kept frames instead of encoding (first comment): MP3 3.7 s, AAC 4.9 s, so about 10 s per hour of audio with finding the silences.
Disk on 2026-10-09: 62 GB of downloads, 283 GB free. A copy is never bigger than its original.
Plan
/mediaas the original is, ranges and all.merge_policyis for what to fetch. New downloads get their copy as they land. When a feed is turned on, the files it already has get theirs. One file at a time, in a queue of its own, so that pass (hours of one core if every feed is in it) never holds up a scan or a download.Db::opencreates it and noALTERis needed. It converts positions between the two versions and gives the time saved. ipx shows no chapters, so there are none to convert./mediaknows who is asking). The iOS and Android apps save positions themselves, from their own player, even while the page is asleep (native.ts), so converting in the page would miss them. Done in the server, neither the page nor the apps need the cut list, and the apps need no new build. Thedurationa player reports for a feed that gives none is converted too, or the copy's shorter length would be saved as the episode's.download::removeremoves both, and retention and Delete both use it. A copy is made again if its original is downloaded again.Open questions
No re-encoding needed. A cut inside a silence can fall on a frame boundary (MP3 1152 samples, AAC 1024, about 25 ms), so the shortened file can be the original's own frames with the silent ones left out, copied in one pass:
Plus 6.5 s to find the silences: about 10 s per hour of audio, one core. Both outputs decode with no errors; length within 0.4 s of expected over 526 cuts. The real version should drop by frame index, so it knows exactly which frames went and the position map is exact.
Downloads today: 796 MP3, 25 MP4, a handful of others (WAV, MPG) which would be left as they are.
Smart Speed: play episodes with their silences shortenedto DeadAir: play episodes with their silences shortenedThe server side is on main in
63e1927, not deployed yet. Copies are made in a task of their own every two minutes for files in feeds someone has DeadAir on for; positions are converted by the server both ways; episodes heard 75% or more on a copy count towards each person's total, once each. Tried on Tech Pod 359 (64 min): 520 cuts, 3.3 min saved, 11.5 s to make, decodes clean, no clicks at the cuts.The open questions went with the recommended answers: the player and lists show the shortened clock; only episodes not yet finished by someone who would hear the copy get one; a copy not ready when you press play is used from the next play; Debian's ffmpeg in the image.
Still to do: the switch beside the speed, the opt-out in each feed's settings and the time-saved stat, with mockups here first.
Server side done and deployed:
63e1927made the copies, converted positions and counted the time saved;16b0686made it opt-in feed by feed, off for every feed including those already subscribed. The page's part moves to #172.