Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native subtitles #22

Open
DDoubleU opened this issue Feb 19, 2019 · 15 comments
Open

Native subtitles #22

DDoubleU opened this issue Feb 19, 2019 · 15 comments

Comments

@DDoubleU
Copy link

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!

@vishen
Copy link
Owner

vishen commented Feb 19, 2019

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.

@w8mr
Copy link

w8mr commented Oct 7, 2020

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.

@vishen
Copy link
Owner

vishen commented Oct 7, 2020

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.

@w8mr
Copy link

w8mr commented Oct 7, 2020

Ok, I will start from scratch then.

@w8mr
Copy link

w8mr commented Oct 9, 2020

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

@Mojken
Copy link

Mojken commented Apr 12, 2021

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.

@vishen
Copy link
Owner

vishen commented Apr 18, 2021

It looks like @w8mr made some initial progress with w8mr@1f13ee7, but unsure if it is complete. Happy to accept a PR if someone knows how to do this?

@LeonB
Copy link

LeonB commented Sep 4, 2021

Subtitle support would be nice! @w8mr is there any work needed on your branch to be ready for a pull request?

@Disonantemus
Copy link

Disonantemus commented Jul 12, 2023

  • 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:

    • Castnow: still works today, but it's abandoned since 2019. This does live transcoding for non compatible videos. Javascript.
    • Catt: this is active, but don't do live transcoding. Python.
  • I know that I can transcode (maybe ffmpeg) the video with hardcoded subtitles, but it's an extra pass.

@Disonantemus
Copy link

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.

@vishen
Copy link
Owner

vishen commented Jul 13, 2023

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.

@vishen
Copy link
Owner

vishen commented Jul 13, 2023

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.

@Jiyuu
Copy link

Jiyuu commented Jul 28, 2023

#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...

@anacrolix
Copy link

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?

@vishen
Copy link
Owner

vishen commented Apr 4, 2024

That is correct. There is some initial progress here w8mr@1f13ee7 but I don't think it was event completed.

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

No branches or pull requests

8 participants