marcolucidi01 / ytcast Goto Github PK
View Code? Open in Web Editor NEWcast YouTube videos to your smart TV from command-line
License: MIT License
cast YouTube videos to your smart TV from command-line
License: MIT License
Casting doesn't work on my TD SYSTEMS TV. I have YouTube app installed, but I get:
○ → ytcast -verbose -d "TD SYSTEMS Android TV" https://www.youtube.com/watch?v=dQw4w9WgXcQ
00:01:08 ytcast.go:86: ytcast v1.1.0
00:01:08 ytcast.go:205: mkdir -p /home/jcromero/.cache/ytcast
00:01:08 ytcast.go:214: loading cache /home/jcromero/.cache/ytcast/ytcast.json
00:01:08 dial.go:156: GET http://192.168.1.129:8008/apps/
00:01:08 dial.go:156: GET http://192.168.1.129:8008/apps/YouTube
00:01:08 ytcast.go:234: saving cache /home/jcromero/.cache/ytcast/ytcast.json
00:01:08 ytcast.go:89: "TD SYSTEMS Android TV": GetAppInfo: "YouTube": GET http://192.168.1.129:8008/apps/YouTube: 404 Not Found: bad HTTP response status
ytcast: "TD SYSTEMS Android TV": GetAppInfo: "YouTube": GET http://192.168.1.129:8008/apps/YouTube: 404 Not Found: bad HTTP response status
Over desktop It finds my tv... With contêiner, even with --network=host
Using Alpine 3:14
Missing something?
Arch Linux
linux 6.6.3.arch1-1
ytcast-bin 1.3.0-1
go 2:1.21.5-1
$ ytcast -s -verbose
13:08:42 ytcast.go:91: ytcast v1.3.0
13:08:42 ytcast.go:224: mkdir -p /home/james/.cache/ytcast
13:08:42 ytcast.go:233: loading cache /home/james/.cache/ytcast/ytcast.json
13:08:42 ssdp.go:70: M-SEARCH udp 239.255.255.250:1900 ST "urn:dial-multiscreen-org:service:dial:1" MX 3 timeout 4s
13:08:42 ytcast.go:253: saving cache /home/james/.cache/ytcast/ytcast.json
13:08:42 ytcast.go:94: Discover: write udp4 0.0.0.0:54096->239.255.255.250:1900: sendto: operation not permitted
ytcast: Discover: write udp4 0.0.0.0:54096->239.255.255.250:1900: sendto: operation not permitted
$ sudo ytcast -s -verbose
13:10:32 ytcast.go:91: ytcast v1.3.0
13:10:32 ytcast.go:224: mkdir -p /root/.cache/ytcast
13:10:32 ytcast.go:233: loading cache /root/.cache/ytcast/ytcast.json
13:10:32 ssdp.go:70: M-SEARCH udp 239.255.255.250:1900 ST "urn:dial-multiscreen-org:service:dial:1" MX 3 timeout 4s
13:10:32 ytcast.go:253: saving cache /root/.cache/ytcast/ytcast.json
13:10:32 ytcast.go:94: Discover: write udp4 0.0.0.0:46330->239.255.255.250:1900: sendto: operation not permitted
ytcast: Discover: write udp4 0.0.0.0:46330->239.255.255.250:1900: sendto: operation not permitted
$ java RokuDialDiscoverySample
*** sending ROKU m-search req
Exception in thread "main" java.net.SocketException: Operation not permitted
at java.base/sun.nio.ch.DatagramChannelImpl.send0(Native Method)
at java.base/sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(DatagramChannelImpl.java:953)
at java.base/sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:914)
at java.base/sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:872)
at java.base/sun.nio.ch.DatagramChannelImpl.blockingSend(DatagramChannelImpl.java:904)
at java.base/sun.nio.ch.DatagramSocketAdaptor.send(DatagramSocketAdaptor.java:220)
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:662)
at RokuDialDiscoverySample.discoverDevice(RokuDialDiscoverySample.java:57)
at RokuDialDiscoverySample.main(RokuDialDiscoverySample.java:36)
Any suggestions?
How does ytcast
know which network interface to use?
It appears that this only works for devices which have the YouTube app installed on them. Do you know if there's an alternate method to cast a video to a surface that doesn't have the app?
pi@raspberrypi:~ $ ytcast -n attic https://www.youtube.com/watch?v=kt4Z2AA5Kj0
ytcast: "Attic display": GetAppInfo: "YouTube": GET http://192.168.86.42:8008/apps/YouTube: 404 Not Found: bad HTTP response status
After building the project, I attempt to cast to a device on my network.
However, ytcast -s
yields no device found
Increasing the timeout yields the same result
ytcast -s -t 20s
yields no device found
With the verbose flag
ytcast -t 20s -s -verbose
results in
21:57:32 ytcast.go:85: ytcast v1.0.0
21:57:32 ytcast.go:184: mkdir -p /home/username/.cache/ytcast
21:57:32 ytcast.go:193: loading cache /home/username/.cache/ytcast/ytcast.json
21:57:32 ssdp.go:70: M-SEARCH udp 239.255.255.250:1900 ST "urn:dial-multiscreen-org:service:dial:1" MX 3 timeout 20s
21:57:52 ssdp.go:85: read udp4 0.0.0.0:41951: i/o timeout
21:57:52 ytcast.go:213: saving cache /home/username/.cache/ytcast/ytcast.json
21:57:52 ytcast.go:88: no device found
ytcast: no device found
All devices (Rokue Ultra, Roku Streaming Stick) are on the same network
I usually use the YouTube mobile phone app, logged in to my YouTube account, connected to an Apple TV box running the YouTube app. Videos played on the Apple TV app are controllable through the app (most notably seeking), and videos are marked as played in my account.
I'd like to be able to do the same thing from my Linux laptop, with playback progress being recorded on my account.
hi, I can't get this installed. With make install i get the following error:
during RTL pass: ira
gcc_context.c: In function ‘_cgo_release_context’:
gcc_context.c:21:1: internal compiler error: Segmentation fault
21 | }
| ^
0x76a20d9f ???
../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64
0x76a08bdf __libc_start_main
./csu/libc-start.c:308
A pre-built release for Windows would be nice
A pre-built release for macOS would be nice
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.