NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Chromecast support

Open lacolos opened this issue 9 years ago • 119 comments

First off I wanted to say good work on New pipe, it is now my go to YouTube player! The only functionality I miss is the ability to chromecast. I'm not sure if this is in the works or even possible? Thanks

lacolos avatar Sep 02 '17 22:09 lacolos

Support was already requested (see #351), then closed but not reopened after the discovery of an open-source library to stream to Google Cast.

coffeemakr avatar Sep 03 '17 11:09 coffeemakr

I wonder how far they came with this project.

theScrabi avatar Sep 03 '17 23:09 theScrabi

Not chromecast, but reversed youtube remote API https://github.com/mutantmonkey/youtube-remote

imShara avatar Sep 10 '17 16:09 imShara

@imShara That's cool, we can implement it but the thing is. The Chromecast audio won't work with it and it would be awesome to get that working with NewPipe. If we can make that work it would be another plus to use this app rather then the original Youtube app as they don't support the Chromecast audio. I want to dig into implementing it from scratch but I don't have much time. I've found a good project who have implemented it, without the Google lib.

KeizerDev avatar Sep 10 '17 20:09 KeizerDev

If we can implement this https://github.com/vitalidze/chromecast-java-api-v2 with the following snippet:

chromecast.load("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4");

We can force the Chromecast using a certain quality. This is not supported by the original Youtube app. (Good if you only want to see high quality or if you want to save data you can force one with lower quality)

KeizerDev avatar Sep 10 '17 20:09 KeizerDev

That lib actually looks pretty sophisticated. I like it :)

theScrabi avatar Sep 10 '17 21:09 theScrabi

Yup, and we have direct links, right? It wouldn't be much of a pain to implement it

KeizerDev avatar Sep 10 '17 21:09 KeizerDev

I guess not.

theScrabi avatar Sep 10 '17 22:09 theScrabi

@theScrabi: All we'll have to care about are the supported formats of Chromecast. I think I'll mess around with adding this, since I like doing this kind of stuff more than messing around with Android's layout stuff. IMHO we should also support some open standard instead of just the proprietary Chromecast. So maybe we should make a PipeCast library (@TheAssassin: Can we modify and relicense that Apache v2 library as GPL v3?).

ghost avatar Sep 14 '17 15:09 ghost

Android's layout stuff

Totally understandable xD

So maybe we should make a PipeCast library

Yea why not :) I agree that we should prefer open standards.

theScrabi avatar Sep 14 '17 19:09 theScrabi

@theScrabi: Yeah, but someone will need to do that layout stuff. Btw could you create a PipeCast repo in TeamNewPipe and give me write access to it?

ghost avatar Sep 14 '17 19:09 ghost

I created PipeCast, and you got write access. Please make sure the license is gpl3.

theScrabi avatar Sep 14 '17 19:09 theScrabi

@theScrabi: Thanks! Ofcourse I will, that's why I asked if Apache v2 can become GPL v3 in a derivative work, which I looked up and it looks like it's possible. I'll try starting to implement it tomorrow.

ghost avatar Sep 14 '17 19:09 ghost

Well I'm not that as good as @TheAssassin with legal things, but I think since apche2 is a mandatory license you can change the license when ever you like. You should just keep the copyright.

theScrabi avatar Sep 14 '17 20:09 theScrabi

@theScrabi whatever you're trying to say here: It's most likely wrong. You cannot "relicense" (quote from @wb9688) others' code, or use it however you want as long as you preserve the copyright notice.

Licenses are valid legal contracts. You have to adhere to them, i.e., you need to preserve the original license (probably even have to ship a copy), state that it's not your code, etc.

Regarding compatibility: The ASF published a document about that: https://www.apache.org/licenses/GPL-compatibility.html

Apache 2 software can therefore be included in GPLv3 projects, because the GPLv3 license accepts our software into GPLv3 works. However, GPLv3 software cannot be included in Apache projects. The licenses are incompatible in one direction only, and it is a result of ASF's licensing philosophy and the GPLv3 authors' interpretation of copyright law.

TL;DR: You can do it, but follow the instructions on the page.

A good overview of license compatibility can be found on Wikipedia: https://en.wikipedia.org/wiki/License_compatibility

TheAssassin avatar Sep 14 '17 21:09 TheAssassin

@TheAssassin: OK, btw I didn't really mean relicensing, but I meant including that code and refactoring it a lot. So basically I could just do that? Or will I need to do some specific things? Thanks!

ghost avatar Sep 14 '17 21:09 ghost

@wb9688 well you said "relicense". Of course you can modify that code, but it will continue to be licensed under the terms of the Apache license.

By the way, if you make modifications and they're suitable for the upstream library, think about contributing those patches.

TheAssassin avatar Sep 14 '17 21:09 TheAssassin

Seems cool, have to keep an eye out on it. Good luck!

KeizerDev avatar Sep 14 '17 22:09 KeizerDev

I didn't had any problems streaming tho, someone have to make a choice tho to use the YouTube application on the Chromecast or the play media application where you pass an supported media url and it just plays it.

I think both will be a good bet.

Ps: with I, I mean my pr using the default media applications on the Chromecast just sending the direct url you use with the phone media player.

KeizerDev avatar Sep 14 '17 22:09 KeizerDev

@TheAssassin: But what'd I need to do? Will I only need to include the GPL v3 license in the repo? Or will I also need to link to the upstream? Or will I need to do something else?

@KeizerDev: We'll likely use the play media appliation, since we'll also support other services like SoundCloud.

ghost avatar Sep 15 '17 04:09 ghost