Skip to content

[RFC] demux: add demuxer for YouTube's json3 timedtext subtitles - #18473

Closed
ghost wants to merge 5 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 5 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Sep 12, 2026

Copy link
Copy Markdown

Implementation was AI-assisted, not vibecoded.

I've added a new demuxer to support youtube's "timedtext" subtitle format used for their auto-generated subtitles, with the option to display each word as it's spoken, or line by line like regular subtitles.

Also modified the ytdl_hook.lua to optionally return auto generated subtitles.

Comment thread demux/demux_ytt.c Outdated
Comment thread player/lua/ytdl_hook.lua
@ghost
ghost force-pushed the master branch 2 times, most recently from ef8855e to 68852e9 Compare September 12, 2026 15:59
@afishhh

afishhh commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

I've added a new demuxer to support youtube's "timedtext" subtitle format used for their auto-generated subtitles

This isn't entirely unreasonable but you do realize that there is a perfectly functional SRV3 demuxer/renderer in mpv which also works for auto-generated subtitles, yes?

At the very least the JSON3 "demuxer" is a completely separate feature because YouTube's auto-generated subtitles can be downloaded in any of their supported formats, not only JSON3, and so would also work without it.

Comment thread demux/demux_json3.c
Comment thread player/lua/ytdl_hook.lua Outdated
@ghost
ghost marked this pull request as draft September 13, 2026 07:46
@ghost ghost changed the title demux/yt-dlp: Add support for YouTube's automatically generated captions [RFC] demux/yt-dlp: Add support for YouTube's automatically generated captions Sep 13, 2026
@ghost
ghost marked this pull request as ready for review September 13, 2026 07:59
@ghost ghost changed the title [RFC] demux/yt-dlp: Add support for YouTube's automatically generated captions [RFC] demux: add demuxer for YouTube's json3 timedtext subtitles Sep 13, 2026
@ghost

ghost commented Sep 13, 2026

Copy link
Copy Markdown
Author

I've added a new demuxer to support youtube's "timedtext" subtitle format used for their auto-generated subtitles

This isn't entirely unreasonable but you do realize that there is a perfectly functional SRV3 demuxer/renderer in mpv which also works for auto-generated subtitles, yes?

At the very least the JSON3 "demuxer" is a completely separate feature because YouTube's auto-generated subtitles can be downloaded in any of their supported formats, not only JSON3, and so would also work without it.

No I wasn't aware of subrandr. I've never used a disto where it's been enabled and didn't see anyone mentioning it when searching about auto subs, my bad I should have double checked.

I've created #18477 for the ytdl hook changes that enable auto generated subs by default (in SRV3 for builds with subrandr).

I'm personally not sure if the json3 demuxer is worth merging. I think it does provide a better out of the box experience than default for people watching youtube with a non-subrandr build, but maybe it's unnecessary.

Repository owner closed this by deleting the head repository Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants