Repository navigation
v0.4.0 — real MP4 downloads: H.264/AAC, fragmented MP4, complete audio
Playback and hardening release on top of v0.3.0. MP4 downloads are now real MP4s with H.264 video and complete audio. They open in QuickTime and suit hardware players such as car head units. The API surface, subprocess handling and edge configuration also got a round of fixes.
Changed behaviour
fmt=mp4prefers H.264 and AAC over AV1 and VP9 (#113).- YouTube rarely offers H.264 above 1080p, so
quality=bestusually tops out at 1080p, where it used to reach 4K AV1. - The fixed qualities are ceilings. When a video's H.264 stops below the requested height, that lower H.264 is chosen: for example, 720p for
quality=1080on a video with 1080p AV1 but only 720p H.264. - The picker now reads Best (most compatible) and Up to 1080p / 720p / 480p.
- YouTube rarely offers H.264 above 1080p, so
MP4 downloads (#112, #108, #115)
| Before | Now |
|---|---|
| AV1 was selected at every quality whenever a video had it, and many hardware decoders cannot play AV1 (#112) | H.264/AAC first, with other codecs only when no H.264 fits the ceiling (#113) |
The body was MPEG-TS served as video/mp4, and AV1 inside it had no codec identification (#108) |
Fragmented MP4, the only MP4 layout that can be streamed without storing the file (#117, which lands #114) |
| Merged downloads over about 10 MiB were throttled to about 110 s, and their audio stopped early (#115) | Video and audio are fetched separately with yt-dlp's chunked downloader and merged by our own ffmpeg (#117) |
Measured on a 213 s video at 480p: 109 s with audio ending at 175 s → 4.5 s with complete audio. A 10-minute video downloads in 7.6 s with complete audio.
A download that fails before its first 64 KiB, such as a progressive MP4 with its index at the end (#119), now returns a JSON error instead of a 200 with an empty video.
Fixes and hardening
- Downloads:
- Input handling:
- Edge and privacy:
- Frontend: metadata is built through the DOM rather than
innerHTML(#88), and the empty state is fixed (#100). - Runtime:
- Supply chain and CI:
Known limitations
- A progressive MP4 with its
moovat the end cannot be remuxed from a pipe, and fails with an error (#119). No YouTube sample of that layout has been seen yet. - Each MP4 download resolves the video twice, once per track. Whether that raises the risk of YouTube's bot detection is unverified.
- The mp3 stage still lacks the
-xerrorguard (#116). - Two pushes to
mainin quick succession can leave:mainon the older image (#118).