Open DDoubleU opened 5 years ago
Hello! I believe this should be possible, however, I haven't ever tried to use subtitles when loading any media with the chromecast. Let me play around with it and see how it works.
Hi Jonathan, have you looked into this? I would like to take a look into this, it might help if you have already got some information on this.
Hello! Oh awesome! I think I started to look into this but didn't get very far, sorry. I don't have any information that is useful on this unfortunately.
Ok, I will start from scratch then.
I've got a Proof of concept working. Still need to:
Any update on this? I want to use this for anime, and I can't find anything at all that can handle both .mkv files and subtitles. This handles .mkv well, but I really need subtitles working for my intentions.
It looks like @w8mr made some initial progress with https://github.com/w8mr/go-chromecast/commit/1f13ee7facea4c359f404e99e254d4e7d631add5, but unsure if it is complete. Happy to accept a PR if someone knows how to do this?
Subtitle support would be nice! @w8mr is there any work needed on your branch to be ready for a pull request?
This is essential, because all non native English speakers use subtitles almost always.
Cast with external WebVTT subtitles (without transcoding), where you can look at the source code:
I know that I can transcode (maybe ffmpeg) the video with hardcoded subtitles, but it's an extra pass.
I've got a Proof of concept working. Still need to:
* remove hardcoded url * discovery of subtitles * parameter for subtitle * auto convert from other formats (with ffmpeg) * extract (and convert) embedded subtitles into separate vtt file
If go-chromecast has an external subtitle switch (maybe --subtitle file.vtt) that allows WebVTT, that don't need to be hardcoded, all the extra steps can be done in shell script with ffmpeg. I have a small shell script that did a while a go for Castnow, that it's not pretty (I'm no programmer), but works.
I don't have ant time to work on this, but I am happy to accept a PR for this feature. I think it would be a useful feature and don't see any reason we couldn't support this if castnow
and catt
can do it.
Here is the PR that added the initial support for subtitles: https://github.com/skorokithakis/catt/pull/207/files and that eventually uses https://github.com/home-assistant-libs/pychromecast/blob/db4100a1fa9be22be6683c80abfe7ff3a55b31c8/pychromecast/controllers/media.py#L478-L495. It looks like you can serve the subtitles over HTTP and then tell the Chromecast to fetch the subtitles from there.
https://github.com/vishen/go-chromecast/pull/165 not sure if i'll ever polish this myself, so linking it here so others might either use it (it is functioning as far as i can tell for mkv with included subtitles) it has unrelated changes enabling cuda encoding/decoding to accelerate them so you'll have to revert https://github.com/vishen/go-chromecast/pull/165/files#diff-e1208656496d86949b6894b55983f87d25360bc08bc50b138df07965a33b4c29L1131-L1134 if you try to use it but dont have cuda...
It should be possible to convert to WebVTT and provide subtitles as external files. This is how I did it with https://github.com/anacrolix/castlink.
Just checking in on this project to see what alternatives exist, since that's a 9 year old Elm app now. I don't see any support for external subtitles is that correct?
That is correct. There is some initial progress here https://github.com/w8mr/go-chromecast/commit/1f13ee7facea4c359f404e99e254d4e7d631add5 but I don't think it was event completed.
Is there any update about subtitle support? I've read that WebVTT and TTML formats are natively supported (unlike SRT and ASS). Does this mean they can be "pushed" towards the chromecast without any further processing? Is it possible for go-chromecast to check the directory of the file indicated by the "load"-parameter for such subtitle files and add them to the stream?
Thanks in advance!