Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
4
votes
1
answers
3244
views
Forward multicast between two LAN segments (Chromecast)
I've found some rules but most are inconclusive. [Chromecast][1] uses DIAL and discovers via multicast from what I've understood.. I have an Ethernet-connected computer which I would like to route via my home brew [AP][2] (Linux, [iptables][3], DNS, etc.) to the Wi-Fi subnet of 192.168.1.0. Is this...
I've found some rules but most are inconclusive. Chromecast uses DIAL and discovers via multicast from what I've understood..
I have an Ethernet-connected computer which I would like to route via my home brew AP (Linux, iptables , DNS, etc.) to the Wi-Fi subnet of 192.168.1.0.
Is this possible and what would a rule look like? I really haven't gotten far with this yet, but this is what I thought would do the trick:
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A FORWARD -i enp2s0 -s 10.8.0.5 -o wlp3s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A POSTROUTING -s 192.168.1.0/24 -o enp2s0 -j MASQUERADE
iptables -A POSTROUTING -s 10.8.0.5/24 -o wlp3s0 -j MASQUERADE
I've got similar rules for shuffling regular traffic from the Wi-Fi to the Internet from and thought this adaption would do the trick... But nothing so far :/
There are some devious computers on the 10.8.X network, and I'd prefer only to allow the multicast traffic + screen sharing things between 10.8.0.5 and the Wi-Fi segment (the entire Wi-Fi segment is fine).
Torxed
(3727 rep)
Sep 25, 2014, 03:23 PM
• Last activity: May 7, 2023, 07:03 AM
0
votes
0
answers
1630
views
Building a universal screencasting display/presenter: WiDi/MiraCast, ChromeCast, etc
I'm in the process of building a 2nd-screen solution for my workspace; something that provides ubiquitous connectivity, so that I can simply toggle any of my machines/mobiles/laptops/etc to use the screen on my desk as an additional monitor without needing to muck around with cables. In W10+, there'...
I'm in the process of building a 2nd-screen solution for my workspace; something that provides ubiquitous connectivity, so that I can simply toggle any of my machines/mobiles/laptops/etc to use the screen on my desk as an additional monitor without needing to muck around with cables.
In W10+, there's an option to "cast/project to networked display", that uses the WiDi protocol, a variant of the Wi-Fi Direct standard.
Of course there's also the Chromecast protocol that seems fairly well integrated into modern-day browsers, though I'm not super familiar what a native protocol Linux/Unix/POSIX would use (mkchromecast is probably my best bet here).
For now I'm using an old RPi3b+ running stock *Bullseye* & *XFCE* driving little more than a terminal (to remote into headless hosts), *Midori* (lightweight browsing, but hardly use it due to the load it introduces) & *barrier* so that I only need to contend with a single set of input devices.
So far, so good.
Where I'm getting stuck on is using this (essentially thin client) as a rendering sink, i.e. being able to cast Video & Audio (AV) ***TO*** this device, rather than from it.
Now I know that this device hardware might simply not be capable of doing this (simple) rendering, so I have a NUC sitting spare for this purpose, i.e. once I've figured out the stack on the RPi, I can rebuild/redeploy it to this other box.
There really does not seem to be much for something that seems to common-place on the W32 ecosystem.
What I've found so far:
- AirServer seems the simplest (best?) solution, but does not have a POSIX agent/renderer AFAICT
- MiracleCast & LazyCast seem like promising solutions, but don't seem to work particularly well, even on other non-RPi machines I've tried.
- GNOME Network Displays is close or essentially what I'm looking for, but lacks any meaningful documentation I can find
Across the board they all seem to rely on WiFi-Direct support on the sink, but that too is coming up lacking in the RTFM-department . This protocol/stack seems somewhat ubiquitous, especially for embedded devices, but a total PITA on POSIX. The closest I've come to touch this end of the stack is around wpa_supplicant (& its associated wpa_cli & wpa_gui lower-level toolstools), but these are not yielding the results I'm looking for (such as the P2P config - PIBKAC)
I do have a few spare Android mobiles I would flash, but this will introduce a whole host of additional complexities I'd rather like to avoid & I'm not sure this'll improve the situation.
I'd appreciate any help that could be provided, as I'd like finish this off this build & put on the final touches.
jakes
(11 rep)
Nov 10, 2021, 01:48 AM
• Last activity: May 16, 2022, 02:51 AM
20
votes
7
answers
45097
views
How do I stream to Chromecast using VLC?
I just downloaded VLC 3.0 Beta (using ubuntu ppa) and I wanted to know how to set it up to stream to chromecast. It's in the repo's [NEWS](https://github.com/videolan/vlc/blob/dc1384bb63e6b9779817648a485ae02f5dd0ca65/NEWS) that the feature has been added. [Numerous news outlets](http://gizmodo.com/v...
I just downloaded VLC 3.0 Beta (using ubuntu ppa) and I wanted to know how to set it up to stream to chromecast. It's in the repo's [NEWS](https://github.com/videolan/vlc/blob/dc1384bb63e6b9779817648a485ae02f5dd0ca65/NEWS) that the feature has been added. [Numerous news outlets](http://gizmodo.com/vlc-is-getting-chromecast-support-1686311413) are covering it. But, there is no example of how to actually use it yet.
I know it's not in the GUI (having searched the source code). And, I have no idea how to use the code from the command line.
Here is the [Ubuntu PPA](https://launchpad.net/~videolan/+archive/ubuntu/master-daily) that I used to install it. However, it shouldn't matter. Nor, should the OS or system matter. It's just software. You can build it yourself or [download a binary ("nightly") here](http://nightlies.videolan.org/) .
Evan Carroll
(34663 rep)
Jun 24, 2016, 10:28 PM
• Last activity: Apr 18, 2022, 04:57 AM
16
votes
2
answers
14752
views
Chromecast not detectable from chromium
I'm using mint 18 and chromium 55. I have chromecast set up and connected to the network. I can connect to it from my Android device but the chromium browser can't find it. I tried resetting the mediarouter and I have seen that the extension for chromecast is discontinued and I can't install it. Any...
I'm using mint 18 and chromium 55. I have chromecast set up and connected to the network. I can connect to it from my Android device but the chromium browser can't find it. I tried resetting the mediarouter and I have seen that the extension for chromecast is discontinued and I can't install it.
Anything else I can do?
Tom Klino
(862 rep)
Feb 17, 2017, 01:51 PM
• Last activity: Apr 3, 2021, 05:19 AM
7
votes
2
answers
8092
views
Trans-coding hevc / x265 video file using VLC and viewing it on a chromecast
I've been successful at getting VLC to stream a x264 encoded file from a network file share to an old chromecast (**which mine doesn't support hevc / x265 directly**) using the commands below. vlc -vv --sout "#chromecast" --sout-chromecast-ip=192.168.1.111 --sout-chromecast-conversion-quality=0 --de...
I've been successful at getting VLC to stream a x264 encoded file from a network file share to an old chromecast (**which mine doesn't support hevc / x265 directly**) using the commands below.
vlc -vv --sout "#chromecast" --sout-chromecast-ip=192.168.1.111 --sout-chromecast-conversion-quality=0 --demux-filter=demux_chromecast "/home/vid/nfst/video1_x264.mp4"
**I'm trying to do the same thing with an HEVC / x265 file** but it looks like it needs to be trans-coded "in real-time" before it gets to the chromecast. Does anybody know how I can go about doing this with VLC using command line syntax?
Note: **I don't want to create another separate x264 file**. I wan't to trans-code the x265 file "in-real-time" to a x264 format and have it somehow streamed / played on the chromecast using VLC.
PS: I have tried casting using the VLC GUI but my OLD chromecast doesn't support HEVC / x265 files. The audio in the file does play but the hevc / x265 video shows up as just a black screen on the chromecast.
PPS: I'm using VLC media player 3.0.7.1 Vetinari (revision 3.0.7.1-0-gf3940db4af) running Ubuntu 18.04 64bit.
Rick T
(357 rep)
Aug 4, 2019, 10:55 PM
• Last activity: Jun 20, 2020, 08:04 PM
4
votes
1
answers
6648
views
Can't install mkchromecast
I'm trying to install [mkchromecast][1]. Following the instructions on the website, I first tried: $ sudo apt-get install mkchromecast Which returned: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package mkchromecast When this didn't wo...
I'm trying to install mkchromecast .
Following the instructions on the website, I first tried:
$ sudo apt-get install mkchromecast
Which returned:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mkchromecast
When this didn't work, I downloaded the .deb and tried this:
$ sudo dpkg -i mkchromecast_0.3.6-3_all.deb
and got the following response:
Selecting previously unselected package mkchromecast.
(Reading database ... 244586 files and directories currently installed.)
Preparing to unpack mkchromecast_0.3.6-3_all.deb ...
Unpacking mkchromecast (0.3.6-3) ...
dpkg: dependency problems prevent configuration of mkchromecast:
mkchromecast depends on python-flask; however:
Package python-flask is not installed.
mkchromecast depends on python-pychromecast; however:
Package python-pychromecast is not installed.
mkchromecast depends on python-psutil; however:
Package python-psutil is not installed.
mkchromecast depends on vorbis-tools (>= 1.4.0); however:
Package vorbis-tools is not installed.
mkchromecast depends on lame (>= 3.99.0); however:
Package lame is not installed.
mkchromecast depends on flac (>= 1.3.0); however:
Package flac is not installed.
mkchromecast depends on python-pyqt5; however:
Package python-pyqt5 is not installed.
mkchromecast depends on youtube-dl; however:
Package youtube-dl is not installed.
dpkg: error processing package mkchromecast (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
mkchromecast
A few Google searches led me to try:
sudo gdebi mkchromecast_0.3.6-3_all.deb
Which returned:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: python-pychromecast
So I downloaded the python-pychromecast.deb and:
sudo gdebi python-pychromecast_0.7.7-2_all.deb
But it seems the right version of python-protobuf is not installed:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: python-protobuf (>= 3)
However, if I run:
sudo apt-get install python-protobuf
It tells me it already is on the newest version:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-protobuf is already the newest version (2.6.1-1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Therefore I forced an install of the right version with:
sudo -H pip install --upgrade protobuf==3.2.0
But this gives this response:
Requirement already up-to-date: protobuf==3.2.0 in /usr/local/lib/python2.7/dist-packages/protobuf-3.2.0-py2.7.egg
Requirement already up-to-date: six>=1.9 in /usr/lib/python2.7/dist-packages (from protobuf==3.2.0)
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf==3.2.0)
Requirement already up-to-date: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0)
Requirement already up-to-date: packaging>=16.8 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0)
Requirement already up-to-date: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging>=16.8->setuptools->protobuf==3.2.0)
Which leads me to believe version >= 3 should be installed...
Can anyone tell me what I'm doing wrong?
John Stoneman
(212 rep)
Mar 12, 2017, 02:30 PM
• Last activity: Jan 6, 2019, 06:01 AM
0
votes
1
answers
1246
views
How to listen to requests made on an open port
I am trying to make a `masterQueue` for Chromecast. It will enable inter-app queuing. I am stuck with few network basics. I am using an older cast sdk because it provided Java API. It could be very vague and may not be appropriate for this site, but I would really appreciate if you could point me in...
I am trying to make a
masterQueue
for Chromecast. It will enable inter-app queuing. I am stuck with few network basics. I am using an older cast sdk because it provided Java API.
It could be very vague and may not be appropriate for this site, but I would really appreciate if you could point me in the right direction.
What I have done so far :
* I have used this code
* I figured that my chrome cast runs on 10.0.0.x
and is open on port 8089
.
What can I possibly do to listen to all the cast requests made to 10.0.0.x:8089
. I want to store the request in the queue and keep polling and playing until my queue is empty.
I did the following commands to get more insights :
Aakashs-MacBook-Pro:~ aakashshah$ sudo lsof -n -P -i :8009
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Google 614 aakashshah 149u IPv4 0x3837229g56402e0d 0t0 TCP 10.0.0.xxx:64416->10.0.0.xx:8009 (ESTABLISHED)
Google 614 aakashshah 315u IPv4 0x3837224598nnfe0d 0t0 TCP 10.0.0.xxx:64411->10.0.0.x:8009 (ESTABLISHED)
java 84205 aakashshah 22u IPv6 0x3837229f49a79725 0t0 TCP 10.0.0.xxx:49562->10.0.0.x:8009 (ESTABLISHED)
java 84205 aakashshah 24u IPv6 0x3837229f49a7a2a5 0t0 TCP 10.0.0.xxx:49563->10.0.0.x:8009 (ESTABLISHED)
In the above result 10.0.0.xxx
is my IP address. I want to continuously listen to this port and see what requests are made on chromecast.
I would also like to understand what does 10.0.0.xxx:64411->10.0.0.x:8009 (ESTABLISHED)
mean especially 10.0.0.xxx:64411->10.0.0.x:8009
. What does the port 64411 do? I am guessing is it a free port available on my router. So it used that to talk to chromecast.
Can I reverse proxy/ port forward/ reverse something to listen to *requests made on 8009* over some other free port?
I am trying to understand mDNS after landing on this page
technazi
(103 rep)
Apr 25, 2018, 06:33 AM
• Last activity: Apr 25, 2018, 08:24 AM
3
votes
0
answers
944
views
How to cast pictures to castnow on the Linux command-line?
I am able to cast videos to my chromecast device using castnow, but I haven't had any luck casting images. I tried to use a python cast library (pychromecast) in conjunction with the internal python HTTP server to serve images, but had no luck. I never saw a single request from the chromecast to the...
I am able to cast videos to my chromecast device using castnow, but I haven't had any luck casting images.
I tried to use a python cast library (pychromecast) in conjunction with the internal python HTTP server to serve images, but had no luck. I never saw a single request from the chromecast to the web server. However, if I accessed the webpage directly, I was able to see the images.
Is it possible to tell the chromecast to display an image adhoc? Ideally, I'm looking for something that is python, java, c, shell script, etc. that can run on Linux.
Walter
(1264 rep)
Feb 16, 2018, 04:50 PM
1
votes
1
answers
384
views
shorewall configuration for allowing chromecast
I am having difficulty setting up chromecast on my local network. The chromecast device is successfully connected to my network, but reports it cannot access the Internet. That is not true, because I see that it successfully resolved google's servers and is communicating over HTTPS. I also see that...
I am having difficulty setting up chromecast on my local network. The chromecast device is successfully connected to my network, but reports it cannot access the Internet. That is not true, because I see that it successfully resolved google's servers and is communicating over HTTPS. I also see that multicast is working such that my tablet is able to connect to it.
My router is running shorewall 5 (which is essentially an iptables wrapper). And, for wireless, I'm running hostapd, I don't have AP isolation enabled (the default setting in hostapd).
I ran tcpdump, but didn't see anything being blocked other than I am rejecting google's DNS for my own.
Is there something I'm missing, why can't the device access the "Internet".
Walter
(1264 rep)
Feb 3, 2016, 05:04 AM
• Last activity: Feb 6, 2016, 08:49 PM
3
votes
1
answers
4955
views
Chromecast / Cubetek Ezcast with Linux computer?
I was pondering getting a [Google Chromecast][1] or [Cubetek Ezcast][2] the other day, mostly for its novelty and maybe using it as a media player or device to conduct presentations. The way they set up, with the whole [DIAL] technology seems a little weird to me, but that may or may not be due to t...
I was pondering getting a Google Chromecast or Cubetek Ezcast the other day, mostly for its novelty and maybe using it as a media player or device to conduct presentations.
The way they set up, with the whole [DIAL] technology seems a little weird to me, but that may or may not be due to the reason I've never seen it in action. I know however, that there are issues with some routers. This is a concern, as I have [OpenWrt] routers, only.
I know the control app runs on Android, but what about my Linux laptop and/or desktop/workstation? I know Chrome uses a Chrome app, but is it gonna work if the client doesn't have a WLAN radio, but is otherwise connected to a wireless network access point (bridging both networks, mind you)? And what about OpenWrt, is it gonna work out of the box?
---
Now, there are at least two ways how I'd like to use the stick:
* As media player - pretty much in stand-alone mode, either playing streams off the internet
* As presentation dongle - so I can "take control" of any TV or projector featuring an HDMI port and use that for conducting a presentation or show a video, etc.
Are my use cases even covered by that? The idea is not to attach it permanently to my home TV, but instead have it with me on the go. The form factor almost implies mobility, even though attaching power to it seems a bit weird.
Both use cases should be covered by using my (Android) tablet, and Linux laptop.
---
In case I'm investigating the totally wrong cave, please suggest alternatives.
polemon
(11921 rep)
May 2, 2014, 11:38 PM
• Last activity: Nov 21, 2014, 07:04 PM
Showing page 1 of 10 total questions