2025-04-25, 04:04 PM
I'm currently working on a video player that fetches and displays subtitles from a Jellyfin server using its API.
Fetching item details and detecting available subtitles works correctly. I can see the subtitles listed (both internal and external).
However, when I try to load external subtitles (for example .srt files), my player tries to access the following URL: /Videos/{ItemId}/Subtitles/{SubtitleIndex}/Stream?api_key=...&format=vtt
and I immediately get a 404 Not Found error.
Even when I retry with format=srt, the 404 persists.
Important details:
Maybe I need to use /Items/{ItemId}/Subtitles/{SubtitleIndex}/Download instead of /Videos/{ItemId}/Subtitles/{SubtitleIndex}/Stream?
Questions:
Fetching item details and detecting available subtitles works correctly. I can see the subtitles listed (both internal and external).
However, when I try to load external subtitles (for example .srt files), my player tries to access the following URL: /Videos/{ItemId}/Subtitles/{SubtitleIndex}/Stream?api_key=...&format=vtt
and I immediately get a 404 Not Found error.
Even when I retry with format=srt, the 404 persists.
Important details:
- Internal (embedded) subtitles work fine using the /Stream.vtt URL.
- External subtitles cause the 404.
Maybe I need to use /Items/{ItemId}/Subtitles/{SubtitleIndex}/Download instead of /Videos/{ItemId}/Subtitles/{SubtitleIndex}/Stream?
Questions:
- Is there a different correct endpoint I should use for external subtitles?
- How does Jellyfin differentiate between "Stream" vs "Download" for subtitles?
- What's the proper way to fetch external subtitle files?