this post was submitted on 24 Aug 2023
51 points (94.7% liked)

Privacy

32173 readers
870 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS
 

Hello everyone! I would like to part ways with my Google Chromecast. Fortunately, I had an extra Raspberry Pi 4B (4GB version) in my drawer, which I used to install LineageOS. Afterwards, I installed F-Droid and a customized launcher to give it a more AndroidTV-like appearance.

Now, I have a couple of questions:

  1. What can I use as an alternative to Google's screencasting?
  2. Is it advisable to enable SSH with root access on the Raspberry Pi?

Thanks!

top 19 comments
sorted by: hot top controversial new old
[–] [email protected] 15 points 1 year ago (2 children)

If there's any decent alternative to Google Cast, I'd love to know because I've never found one. You can use Kodi to receive links to Youtube videos and play them, and spotify hast their own built-in casting, but for everything else I've got nothing.

[–] [email protected] 12 points 1 year ago

I'm currently working hard on something to fill this void! I've made HomeHook v2 as a web app and HomeCast as an mpv interface installed on my HTPC and some Pis I have around the house!

I still need to document the installation procedure but if you're interested in playing stuff from Jellyfin and YouTube, feel free to send me a message and I'll see if I can help out!

[–] [email protected] 4 points 1 year ago

Miracast. Wi-Fi Alliance standard.

[–] thisisawayoflife 9 points 1 year ago (1 children)

There's no reason to allow root to login to anything via ssh. Add a specific user to the Wheel group and that user can sudo whatever they need to do. Just make sure to disable password authentication and only allow certificates.

[–] mypasswordis1234 4 points 1 year ago (1 children)

Yes, that's what I meant, but I worded the question incorrectly

[–] thisisawayoflife 1 points 1 year ago

To answer the casting question, the Google cast API used to introduce a lot of breaking changes so many 3rd party apps had a lot of instant over the years.

You could build something yourself using Google SDKs or try to update an older framework that might be abandoned. Raspicast looks fairly recent but I think it's just the android app and it uses a deprecated RPi OS. RaspberryCast hasn't been updated since 2018.

It looks ripe for the development of you've got the time and dev chops, otherwise it's going to be super hacky and unreliable at best.

[–] [email protected] 6 points 1 year ago (2 children)

It's not exactly what you're looking for, and won't be as seamless, but you might be able to leverage scrcpy.

It uses adb (you may need a fullfat distro for this - lineage may not support it), and allows you to view and control your Android device from a computer. It can also handle audio, and can be used wirelessly. The one caveat is protected content will probably not show up in the mirror - e.g. if you cast your screen and try to stream Netflix, it will likely be unable to send the Netflix video over. The last time I tested, it depended on the specific app, and which APIs they used under the hood (at the time, YouTube worked, Netflix did not).

[–] [email protected] 1 points 1 year ago

Using this fairly regularly. Its decent but the wireless integration does seem to need USB reconnected occasionally before it works for me on GrapheneOS. Pretty stable otherwise occasional choppiness but most likely my network

[–] [email protected] 1 points 1 year ago (1 children)

Can you not disable or spoof the protected content flag. I think i saw a Xposed module for that.

[–] [email protected] 1 points 1 year ago

You might be referring to this? That's what I found from a quick search, at least.

If I understand correctly, this is a little different - from what I recall reading a few years ago, the speculation was that Netflix (and similar apps) rendered the content directly, bypassing the normal rendering stack. It would be the equivalent of, on a Linux system, bypassing the compositor (e.g. Mutter or KWin), and directly rendering the content (I believe SurfaceFlinger is the Android compositor). This means that when something like scrcpy uses the competitor API to capture the content, the content is literally not there, because it bypassed that system altogether.

By contrast, the secure flag just allows app developers to ask the OS to disallow screenshots, to prevent data leakage (e.g. of your banking details). It's all rendered in the standard way, though.

This may not be accurate - it's based on assumptions, and forum posts I read years ago, but it's the best explanation I have right now. If anyone knows better, please feel free to correct me.

[–] [email protected] 5 points 1 year ago (1 children)

I'm using macast and jellyfin-mpv-shim. I can send almost anything to my PC from my phone and have it played in full screen.

[–] mypasswordis1234 2 points 1 year ago (1 children)

Q: Will consider release a TV version based android in the future?

A: This application is written in Python and is not suitable for porting to Android, so the answer is No😔.

[–] [email protected] 1 points 1 year ago (1 children)

don't know what this is in reference to, but if you're using a raspberry it can run python, so both of those (macast, jellyfin-mpv-shim or plex-mpv-shim) can run on it.

[–] mypasswordis1234 1 points 1 year ago (1 children)

Run python script on the Android OS?

[–] [email protected] 1 points 1 year ago

yes, I understand, you installed LOS and turned the raspberry into an android box. but you can install a normal linux distribution on it and then you can run both of those tools. then, your phone or tablet becomes the primary browser and remote control. right now, your raspberry with remote is the browser - you use it to browse/play media and control it (play/pause/etc).

e.g. you scroll lemmy and see a video you like; instead of watching it on your phone, you share it to e.g. AllCast (maybe there's a better app, that's the one I'm using) and that one transmits the youtube url to macast and voila - full screen video that you can control from your phone. same thing with reddit videos and other popular video sites (macast uses yt-dl behind the scenes, so whatever site yt-dl supports works in macast as well), as well as media that's locally on your phone.

same thing with jellyfin-mpv-shim - you connect your phone's Jellyfin app with JMS (click cast, select, make it default). you browse your library on your phone, press play and automagically full screen video on your TV while you control playback from your phone - pause, skip, stop, switch subtitles, volume, etc.

the remote you've been using with android becomes superfluous - the raspberry becomes just a dumb sink that plays whatever you send it.

I imagine you can rig up some screensaver with rotating wallpapers and clock and weather and whatnot when it's idle.

[–] MrPear 4 points 1 year ago (1 children)

Do you specificly want to cast your screen? Or do you want to cast things like YouTube videos and music?

[–] mypasswordis1234 3 points 1 year ago (2 children)
[–] MrPear 2 points 1 year ago

In that case I'm afraid I don't know any solution, hopefully you'll find something that fits your needs. If you needed to cast Youtube-videos and such, I would've shared my own bodged method that combines KDE Connect, MPV and a regex-enabled fork of "handlr".

[–] grue 1 points 1 year ago

If you only want to cast your screen, maybe try thinking more in terms of "KVM" than "Chromecast?"