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

Chromecast support #668

Closed
lacolos opened this issue Sep 2, 2017 · 118 comments
Closed

Chromecast support #668

lacolos opened this issue Sep 2, 2017 · 118 comments
Labels
device/software specific Issues that only happen on some devices or with some specific hardware/software feature request Issue is related to a feature in the app wontfix This issue will not be fixed

Comments

@lacolos
Copy link

lacolos commented Sep 2, 2017

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

@coffeemakr
Copy link
Contributor

coffeemakr commented Sep 3, 2017

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

@theScrabi
Copy link
Member

theScrabi commented Sep 3, 2017

I wonder how far they came with this project.

@imShara
Copy link

imShara commented Sep 10, 2017

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

@KeizerDev
Copy link
Contributor

@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
Copy link
Contributor

KeizerDev commented Sep 10, 2017

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)

@theScrabi
Copy link
Member

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

@KeizerDev
Copy link
Contributor

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

@theScrabi
Copy link
Member

I guess not.

@theScrabi theScrabi added the feature request Issue is related to a feature in the app label Sep 10, 2017
@ghost
Copy link

ghost commented Sep 14, 2017

@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?).

@theScrabi
Copy link
Member

theScrabi commented Sep 14, 2017

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.

@ghost
Copy link

ghost commented Sep 14, 2017 via email

@theScrabi
Copy link
Member

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

@ghost
Copy link

ghost commented Sep 14, 2017 via email

@theScrabi
Copy link
Member

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.

@TheAssassin
Copy link
Member

@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

@ghost
Copy link

ghost commented Sep 14, 2017 via email

@TheAssassin
Copy link
Member

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

@KeizerDev
Copy link
Contributor

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

@KeizerDev
Copy link
Contributor

KeizerDev commented Sep 14, 2017

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.

@ghost
Copy link

ghost commented Sep 15, 2017 via email

@theScrabi
Copy link
Member

Apparently we once also had a thread for UPnP/DLNA streaming.

@ghost
Copy link

ghost commented Sep 15, 2017

@theScrabi: I know, I'll add support for DLNA to PipeCast once I've got Chromecast working. (Off-topic: could you please answer my questions on IRC?)

@KeizerDev
Copy link
Contributor

Any progress here so far?

@ghost
Copy link

ghost commented Oct 4, 2017 via email

@KeizerDev
Copy link
Contributor

KeizerDev commented Oct 4, 2017

@wb9688 I want to look into Chromecast support once you've pushed it 👍

@tkosamja
Copy link

tkosamja commented Oct 9, 2017

Thanks for working on this! I really miss the feature of casting my videos to the TV.

@theScrabi
Copy link
Member

If you have kodi, and the youtube app installed there you can use the "open in kodi" function to make newpipe look like its streaming.

@ghost
Copy link

ghost commented Oct 16, 2017

@KeizerDev: I haven't had time yet to finish my UPnP streamer, but I've pushed the discoverer to the PipeCast repo. You can test it by cloning PipeCast, building it and running something like this, while running GMediaRender on another PC.

@mauriciocolli or @theScrabi: Could you please review that code? Btw could you set dev as the default branch there? (And can we also create a dev branch in NewPipeExtractor?)

@theScrabi
Copy link
Member

theScrabi commented Oct 16, 2017

And can we also create a dev branch in NewPipeExtractor

Yep I think that was a good idea.

@tdbe
Copy link

tdbe commented Dec 18, 2021

This is all a bit handwavy and ultimately unconvincing.... For example, "tightly coupled to Google services" — what; in contrast to YouTube? YouTube, the stated purpose of NewPipe?

There is a difference between "we build a client that can query YouTube in a privacy friendly way and does not need any sort of account or other authorization" and "we, the maintainers of NewPipe, need to request some kind of developer API key stuff in order for Chromecast to work". In case I am wrong about this, feel free to correct me, but do so with facts, not cheap whataboutism...

Please keep the discussion on topic. This is not a support forum, it is an issue tracker. We have an IRC channel for (less) on-topic discussions.

Then why not use a small 3rd party app that newpipe can share the url to, and that 3rd party generic app sends the url to chromecast or any other dnla device?

also heh, irc - that hot new thing known for lots of traction and ease of setup. Why not Matrix/Riot/Element?

@theScrabi
Copy link
Member

Then why not use a small 3rd party app that newpipe can share the url to, and that 3rd party generic app sends the url to chromecast or any other dnla device?

This may not always wotk with chromecast as long as i know.

@JVT038
Copy link

JVT038 commented Mar 12, 2022

For me, an acceptable workaround for using Chromecast with NewPipe:

1. install VLC

2. enable `Use external video player` and `Use external audio player` in `Settings` -> `Video and audio`

3. use VLC to cast the video

It's an extra step, but it works well enough.

For some reason VLC doesn't play audio when I try to do this...

@mmguero
Copy link

mmguero commented Mar 12, 2022

For me, an acceptable workaround for using Chromecast with NewPipe:

1. install VLC

2. enable `Use external video player` and `Use external audio player` in `Settings` -> `Video and audio`

3. use VLC to cast the video

It's an extra step, but it works well enough.

For some reason VLC doesn't play audio when I try to do this...

I have the problem depending on the resolution I choose. Usually if I choose 360p, 720p, or 1080p the sound comes along with it okay. If I choose something else I don't get sound either.

@Massimo-B
Copy link

I never succeeded sending to VLC for casting to a Chromecast (I just installed VLC org.videolan.vlc 3.5.2 from F-Droid, default settings). VLC can be connected to the Chromecase, but when sending a video from PipeWire I inly see something about VLC re-coding but the video never starts on the Chromecast.
The only cast thing that works is audio only via BubbleUPnP. For getting this to work it needs to set [x] Use external Audio player. After that I can press "Background" inside a video, choosing BubbleUPnP to take over. A bit confusing is that Choosing ""Play in background" from the context menu of a video item doesn't call BubbleUPnP but use the internal backgrounding. While actually setting this option it usually breaks the internal backgrounding in favour for using an external app, but based on the current behaviour it is comfortable to still have both options.

Back to casting the full video stream, it would be absolutely fine to have some external app doing the casting and just using the "Share" button. Which solution it there for getting video playing on Chromecast currently?

@opusforlife2
Copy link
Collaborator

@Massimo-B #668 (comment)

@Massimo-B
Copy link

Well, I did it like this.

@opusforlife2
Copy link
Collaborator

but when sending a video from PipeWire

Might be this. Do other apps cast fine?

@Massimo-B
Copy link

The Chromecast functionality itself works in all other apps. However I never cast local videos that need transcoding. And sharing a stream link from NewPipe to VLC or whatever doing the cast to Chromecast should not need any transcoding either. So actually I'm not sure if the casting from VLC is broken here or if there is something wrong with the content I share from NewPipe.

@opusforlife2
Copy link
Collaborator

You'll have to debug this by trying some other apps with VLC.

@ph00lt0

This comment was marked as off-topic.

@sebma

This comment was marked as off-topic.

@SameenAhnaf SameenAhnaf mentioned this issue Sep 16, 2023
6 tasks
@SameenAhnaf SameenAhnaf closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2023
@Massimo-B
Copy link

What is the current workaround to get a stream from NewPipe to Chromecast? Still VLC? Did anybody get this working?

@mmguero
Copy link

mmguero commented Nov 22, 2023

VLC is still how I do it. It's kind of a pain sometimes (having to change the setting back and forth from external player when I do/don't want to use VLC, and sometimes opening a new video in newpipe still causes the previous video to load in VLC) but it's better than nothing.

@Massimo-B
Copy link

And your VLC on Android does not need to Re-encode the stream? My VLC works to send something local to the Chromecast. But I can't get a Stream shared from NewPipe to VLC, it says it needs re-encode and nothing happens. I don't even see any stream item in the playlist of VLC. For sending streams to Chromecast I usually use BubbleUPnP. Did anybody get a Youtube stream casted with that app?

@mmguero
Copy link

mmguero commented Nov 22, 2023

No, I don't have that issue. It just opens in VLC. In NewPipe I have Settings > Video and Audio > Use external video player set to on, then when I hit play on a video newpipe asks me what resolution to use. Some of them don't work on VLC, but if I use 720p or 1080p that seems to work. Then (the first time, at least) android asked me which app to use to open it and I selected VLC and it plays, at which point I can use VLC to cast.

@peat80
Copy link

peat80 commented Dec 25, 2023

Maybe instead of wasting time trying to implement closed source chromecast casting could be supported to an open protocol instead?

There is for example fcast, an open source casting protocol that could fit well here.
(https://fcast.org/)
They have an open source receiver app available in the playstore and code examples how to implement this into an app. 🤔

@Atemu
Copy link
Contributor

Atemu commented Dec 25, 2023

That should probably be a separate feature request as this issue is specifically about the Chromecast protocol which will not happen.

See for instance #7346

@erebion
Copy link

erebion commented Dec 26, 2023

Seems Miracast has not yet been suggested and something more open. :)

Some devices, like my projector, even have built-in support. :D

@Atemu
Copy link
Contributor

Atemu commented Dec 26, 2023

Again, separate issue please. Also, miracast sucks.

@VvLuijovV
Copy link

VvLuijovV commented Dec 26, 2023 via email

@erebion
Copy link

erebion commented Dec 26, 2023

Could you elaborate please? I think open standards are great.

@vilhelmgray
Copy link

Miracast was already discussed earlier in this issue page: #668 (comment)

@kevincox
Copy link

kevincox commented Dec 26, 2023

At the risk of going way off topic...

The linked comment seems wrong, Miracast is a standard and has fairly broad (although definitely not ubiquitous) support.

However Miracast is very different than protocols like Chromecast. It has different tradeoffs. Miracast is more like a wireless HDMI/DP cable than a remote control browser like Chromecast. In Miracast the sender streams a video the the receiver. This is different from Chromecast where the sender basically sends a URL to the receiver.

Pros:

  • Naturally works offline. There is no network even involved, whereas I don't think Chromecast works offline at all. (Although the concept of a remote-controlled browser could work offline. For example if the page could be transmitted from the sender, for example a data: URL.)
  • No concerns with network perspective. For example if I use a VPN to access a private service I don't need to worry about the receiver having access to that service as well as all of the access will be done by the sender and then sent directly to the receiver. The receiver doesn't even need network access.
  • Less compatibility concerns/simpler protocol. For example with Chromecast I need to worry if the receiver can support AV1 video, whereas with Miracast I can just transcode whatever is available into pixels for the receiver.
  • Open standard.

Cons:

  • The sender is very active. It must be online and transmitting video wirelessly. This puts great load on the sender, other use of the sender device may cause stutters in the video stream and the sender must stay online and in-range of the receiver. This is awful for mobile battery.
  • Wireless. Chromecast may often be used over wireless but that is typically the setup. Once initiated the video will typically be streamed directly to the receiver which may be hardwired for a much more reliable connection and causing less traffic in the air.
  • Less reliable in general. There is much less room for buffering. So temporary wireless interference will stutter the stream whereas the Chromecast can buffer up a substantial amount of video.
  • Lower quality. The video transmitted isn't lossless. So you are decoding the source video, then losslily re-encoding it. This will lose quality.

I would say that for most people this is a worse tradeoff. Personally I love that Chromecast uses no battery on my phone, I can use it freely or take it to the bathroom without disrupting the video in the living room. Miracast is great to, and has many use cases where it is a better tradeoff. But I think for watching online video on a TV it usually isn't the best option.

I really hope that we finally get an open protocol that can talk to Chromecast and other remote-browser dongles. (I'm still salty about the Mozilla Matchstick being cancelled.) But for now Chromecast is the most practical option for me.

@vilhelmgray
Copy link

I'm not familiar with Miracast so perhaps that comment I linked is wrong afterall (it sounds like Miracast is an open protocol from your description of it). It'll be best to open a new issue with your pros and cons for adding Miracast support so that we can continue the discussion there in a more dedicated thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device/software specific Issues that only happen on some devices or with some specific hardware/software feature request Issue is related to a feature in the app wontfix This issue will not be fixed
Projects
None yet
Development

No branches or pull requests