catt icon indicating copy to clipboard operation
catt copied to clipboard

catt doesn't allow to select subtitles inside the container

Open guiniol opened this issue 7 years ago • 19 comments

The --subtitle option looks for either an URL or a local file. There is no way to specify a track inside the container. catt --info does show that the subtitle tracks present inside the container. It would be nice if those could be selected.

Not sure how much work that would be. And in any case, thank you for catt. It's so much better than going through chromium or an app on my phone!

guiniol avatar Jun 14 '18 19:06 guiniol

Thank you for this suggestion. The problem is that the chromecast does not support the subrip (.srt) subtitle format, rendering such a feature not very useful (external subrip subtitles are working with catt because we are converting them to webvtt, the only common format supported by the chromecast).

theychx avatar Jun 14 '18 20:06 theychx

Ah. So basically, you would have to extract the subtitle and convert it to webvtt? That does sound impractical...

guiniol avatar Jun 14 '18 20:06 guiniol

Indeed

theychx avatar Jun 14 '18 20:06 theychx

This is a good suggestion, but I'm afraid there isn't much we can do about it now... Should we close the ticket, but keep it in mind in case it becomes easier in the future?

skorokithakis avatar Jun 18 '18 16:06 skorokithakis

We could use ffmpeg to extract the subtitles. I'm not really keen on such a solution, unless a lot of users are asking for this. I think it makes sense to keep this ticket open, so people can chime in if they are so inclined.

theychx avatar Jun 18 '18 16:06 theychx

You can't count on ffmpeg being installed, though :/ Alright, let's keep this open.

skorokithakis avatar Jun 18 '18 16:06 skorokithakis

You can't count on ffmpeg being installed, though

No, but you can check if it's there.

theychx avatar Jun 18 '18 16:06 theychx

Of course. I meant I wouldn't want to add it as a dependency, but we can just say "this only works with ffmpeg".

skorokithakis avatar Jun 18 '18 16:06 skorokithakis

By the way, I tried embedding a webvtt subtitle in a mkv container, and I could not get it to work. Maybe I should ask the kind pychromecast people, if it's even possible to use internal subs.

theychx avatar Jun 18 '18 16:06 theychx

That would be great to know, I don't recall having embedded subtitles ever work either.

skorokithakis avatar Jun 18 '18 16:06 skorokithakis

Feel free to do whatever with this issue. People will find it more easily if it's opened, but if you don't plan to work on it (which I can certainly understand since the problem is with the chromecast), then closing it would be the normal thing to do.

guiniol avatar Jun 18 '18 18:06 guiniol

@skorokithakis There's really not any point to keeping this open anymore, as this does not seem to be an annoyance to many users. I'm still not keen on going down the ffmpeg route (in general), and it is my understanding that you agree.

theychx avatar Apr 09 '19 11:04 theychx

Alas, I do agree. It sounds like it's too big a hassle, unfortunately.

skorokithakis avatar Apr 09 '19 11:04 skorokithakis

For other people looking for that kind of feature, I created a small script which extracts the subtitles from a mkv file and call catt cast with the freshly extracted subtitles. I uploaded the script to a gist if anybody wants to use it: https://gist.github.com/EtienneM/499ed604be10191cb3c709497264d65e

EtienneM avatar Jan 01 '20 19:01 EtienneM

@EtienneM Neat, thanks!

theychx avatar Jan 01 '20 19:01 theychx

@skorokithakis There's really not any point to keeping this open anymore, as this does not seem to be an annoyance to many users.

I find this odd. Most things I watch have embedded subtitles.

akvadrako avatar Oct 17 '20 06:10 akvadrako

Actually, I agree, most things I watch have embedded subtitles too. It would be great if we could support them, even if it were really hacky and we had to say "you need ffmpeg for this". I kind of agree with @theychx for closing this too, as we'd basically need to download a remote file once, extract the subtitles, throw it away, start the local server so we can serve the subtitles, and keep the server open while the video plays.

Let's keep this open as an aspirational ticket, I might investigate some methods for extracting remote subs at some point, or someone who really wants this can open a PR and a ticket is a good way to indicate that we want this functionality.

skorokithakis avatar Oct 17 '20 08:10 skorokithakis

I think this issue is in the same nerve but can we specify the audio stream in a video with multiple audio streams? I don't see any option to do this currently.

llyram avatar Aug 26 '21 03:08 llyram

I ran into this problem as well. Thank you to @EtienneM for the clever script that solved it!

I updated said script to work with latest ffmpeg: https://gist.github.com/cmvanb/8a288f2cf8f3081c5be8ea80dcc56eb8

cmvanb avatar Sep 24 '22 14:09 cmvanb