chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 582 forks source link

Crunchyroll stream without subtitles #1184

Open BenKettlewell opened 8 years ago

BenKettlewell commented 8 years ago

I'm trying to create an app that will let you watch Crunchyroll videos with Japanese subs instead of English ones. Since Crunchyroll doesn't have Japanese subs I have to attach them on my end. To do this I need (want) to grab just the video and ignore the subtitles. Is this possible?

I can take a look myself if someone can give me a nudge in the right direction.

Relates to: https://github.com/chrippa/livestreamer/issues/364

StarWolf3000 commented 8 years ago

Don't think you can actually do this, at least not with livestreamer which uses the iOS API (which is anyway limited to max. 480p, regardless of premium or not, so you really want to softsub a 480p video with japanese subs?).

You can try it with --crunchyroll-locale=ja_JP to get a video without subs, but don't think that it actually works.

BenKettlewell commented 8 years ago

I've been able to download them at 1080p and attach them locally. Are you saying you just can't live stream it at 1080?

I know you can turn off subs in their player, I'm just not sure if how to get the stream pre-subs has been discovered.

BenKettlewell commented 8 years ago

Also, had to check but 1080p streaming works, so I'm not sure what you're referring to.

StarWolf3000 commented 8 years ago

Just an old issue(?) when CR only supported up to 480p on most devices except browser, regardless of premium access or not. Seems like CR enabled HD content on all other devices, so its no longer restricted.

asermax commented 8 years ago

@BenKettlewell I had to do a bit of research because I haven't been on this topic for a while, but after a quick read on some info I comfirmed some stuff that may be useful to you: currently Crunchyroll has two separate streaming APIs, one used by their webpage (which serves the videos as an RPC stream, with subtitles and video separated) and another for other devices (the one we use here, which serves the videos using HLS with embedded subs). So, the bad news is that you probably can't remove the subs from the stream we use here (at least from what I have seen); you can try playing around with the API's parameters, but I can't really help you with that since it's a private API and most of what I got was from a Plex plugin whose developer probably just sat there looking at the request the iOS app made when trying to watch an episode. I can give you some pointers about how the plugin works if you decide to go down that route and you need some guidance d: The good news is that there's people that already got around using the other API (look at Horriblesubs for example), so I'm pretty sure you can find some other scripts/tool that can help you with that. It's obviously not as pretty as using the livestreamer python API (since it has to deal with Flash and stuff), but it's something. Hope that gives you some insight on the little I know about it, let me know if I can help in any other way!

BenKettlewell commented 8 years ago

That's super useful, thanks so much! I'll take a look a look and will probably have some questions for you later.

ghost commented 8 years ago

@BenKettlewell

You can use YOUTUBE-DL to get access to Crunchyroll's RPC API. This means: RTMP streams without subtitles. I don't have an account, so I only get the 480p stream, but it should be possible to enter username and password (see authentication options) to download a higher resolution (720p / 1080p).

youtube-dl -F "http://www.crunchyroll.com/naruto-shippuden/episode-433-the-search-mission-684443"
[Crunchyroll] 684443: Downloading webpage
[Crunchyroll] 684443: Downloading media info
[Crunchyroll] 684443: Downloading media info for 360p
[Crunchyroll] 684443: Downloading media info for 480p
[Crunchyroll] 684443: Downloading media info for 720p
[Crunchyroll] 684443: Downloading media info for 720p
[Crunchyroll] 684443: Downloading media info for 1080p
[Crunchyroll] 684443: Downloading media info for 1080p
[info] Available formats for 684443:
format code  extension  resolution note
360p         flv        656x368
480p         flv        848x480
720p-0       flv        848x480
720p-1       flv        848x480
1080p-0      flv        848x480
1080p-1      flv        848x480    (best)

Subtitles are still available but as separate files:

youtube-dl --list-subs "http://www.crunchyroll.com/naruto-shippuden/episode-433-the-search-mission-684443"
[Crunchyroll] 684443: Downloading webpage
[Crunchyroll] 684443: Downloading media info
[Crunchyroll] 684443: Downloading media info for 360p
[Crunchyroll] 684443: Downloading media info for 480p
[Crunchyroll] 684443: Downloading media info for 720p
[Crunchyroll] 684443: Downloading media info for 720p
[Crunchyroll] 684443: Downloading media info for 1080p
[Crunchyroll] 684443: Downloading media info for 1080p
[Crunchyroll] 684443: Downloading subtitles for English (US)
[Crunchyroll] 684443: Downloading subtitles for العربية
[Crunchyroll] 684443: Downloading subtitles for Italiano
[Crunchyroll] 684443: Downloading subtitles for Deutsch
Available subtitles for 684443:
Language formats
deDE     ass, srt
arME     ass, srt
itIT     ass, srt
enUS     ass, srt