How to cast YouTube or Netflix to a smart TV or Chromecast

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#21 Post by smokey01 »

@jamesbond, I'm not sure what is causing Videostream to fail. It's works fine in Tahrpup-6.0 32bit version. When I try to load a video via Videostream it displays the error as attached. I tried running both commands without sudo but it made no difference.

The problem could be Fatdog, Google-chrome version-39.0.2171.95, the Google-cast plugin or the Videostream plugin. It would be nice to have this solved before the final release of 702. I thought a later version of Google-chrome might make a difference so I downloaded the latest, 48.0.2564.103, same error.

I really don't want to change operating systems either.

Thanks
Attachments
Error.png
Videostream Error
(27.82 KiB) Downloaded 727 times

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#22 Post by muggins »

smokey,

I couldn't get googlecast to see my chromecast device until I ran:

Code: Select all

iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT
Then I encountered the same problem with VideoStream. Instead I installed Video Player 2.0.7 extension, put a script to run it on the desktop, and it casts perfectly to chromecast.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#23 Post by muggins »

I knew I used the wrong phraseology when I said:
put a script to run it on the desktop
All I did was use the app to create a desktop link. See attached images.
Attachments
Vidplayer1.png
(11.69 KiB) Downloaded 654 times
vidplayer2.png
(8.88 KiB) Downloaded 659 times
vidplayer3.png
(4.04 KiB) Downloaded 670 times

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#24 Post by wiak »

smokey01 wrote:I had some success but not as much as I would like.

What seem to be consistent with all video files, the permissions must not be executable.

1. By installing Google Cast extension to Google-Chrome allowed me to play .mp4 files but that was about it.

2. Videostream looked good but wouldn't allow me to select a file. It kept saying my firewall rules needed to be modified but still didn't work when making the changes as suggested.

3. I found a command line utility called castnow that worked with .mp4 and .m4v only. Node needs to be installed then castnow has to be installed using node. I made a SFS file of Node to do this.
https://nodejs.org/en/

4. I would really like to get VLC working with Chromecast. Many articles I read on the internet said it could be done by casting the full screen but it didn't work here.

BTW I'm trying to cast local videos from my HDD not from the web.
Referring back to this admittedly now old post, but seems to be nothing new on chromecast than this thread on Puppy forum. I just obtained a google chromecast dongle (had some flybuys...) and been playing with it. Aside from using Android, I'm been streaming local videos to it from my XenialDog64 system, which works very nicely with castnow (program referred to above by smokey01). I did want to also try mkchromecast app, but that is only available in newer ubuntu repositories (Artful and Bionic) so didn't bother.

EDIT: I actually noticed this thread after already trying out castnow via the instructions here:

https://www.addictivetips.com/ubuntu-li ... mand-line/

I note that the newer Google Chrome I also have installed has cast facility built in without needing extension and that can cast the desktop or single desktop app or a single google chrome tab - these options work well enough, but castnow app uses far less CPU resources (8% CPU on my machine, whereas chrome casting is using around 60% CPUT) and hence my current solution of choice. I will probably set up my xhippo (mcewanw modded version) to act as a playlist manager calling castnow app directly - once I get round to that (which may be a long while...) I'll post results.

Anyway, chromecast dongle is very useful - saves hdmi cables and makes my dumb tv smart and easily remote controlled from Linux, or Android and with remote and local media file playing support using castnow (which is particularly useful since my Linux box doesn't itself have HDMI port so couldn't drive the TV directly).

wiak

NOTE: My only real worry with castnow is that its developer says he has lost interest in maintaining it... pity

Stream2Chromecast may be a good alternative (about to test it):

http://www.webupd8.org/2016/08/stream-v ... -from.html

EDIT2: Yes, now tried Stream2Chromecast and it seems to be even lower resource usage (a few percent CPU only), simple to install on XenialDog64 per above link instructions, and working very well in quick test. Should be very easy indeed to write a small script such that xhippo frontend can act as a simple gui playlist manager though, for more convenience still, would need some config file flag choice first set to indicate to either play media file (such as mp4) on local computer (via mplayer or mpv etc) or to be sent to chromecast as a stream.

Note that Stream2Chromecast uses python api cc_media_controller.CCMediaController, whereas

castnow uses Node.js which is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Last edited by wiak on Tue 13 Mar 2018, 09:57, edited 5 times in total.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#25 Post by muggins »

hello wiak,

I haven't tried it yet, so don't know if it works with chromecast, but OscarTalks has vlc-3.0 here.

vlc-3-0-chromecast-support-new-features

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#26 Post by wiak »

Thanks muggins - vlc could be good, though I am a bit of an mpv (or mplayer) user generally so unlikely to also install vlc - useful to try that for some though.

wiak

WiZard
Posts: 119
Joined: Sun 11 Sep 2005, 20:04
Location: Oklahoma USA

#27 Post by WiZard »

@muggins
I couldn't get the Win version of VLC 3.0 to cast, but they quickly released v3.01 and the Win version works great and imo is a superior casting tool since it has better controls and can handle almost any audio or video file you might have. It can also work from the local computer or a simple samba file server. Oscar Talks has compiled v3.01 for dpup stretch and it runs but we have not been able to get the cast feature to work. You can follow the discussion here:
http://murga-linux.com/puppy/viewtopic.php?t=112804
If you have any ideas to get it working let Oscar know.

Thanks
Gary

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#28 Post by drunkjedi »

Found a VLC 3.0 appimage,
https://github.com/anupam-git/vlc-appimage/releases
It's 64bit though.
I don't have any "cast" device, so can't test...

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

VLC & Sid's Cast for Chromecast.

#29 Post by ETP »

Hi folks,

I can confirm that Chromecast support in VLC 3.0.1 works well in Windows10, ChaletOS and Manjaro.
Also it does not require Google Chrome as it interfaces directly with the dongle using dial protocol.
It's other main attraction is the support for audio and video playlists.

With regard to Puppy, if and when anupam produces a working 64-bit appimage of VLC 3.0.1
it should be possible to extract the image, change it so that VLC can be run as root and then pet
it up as a ROX app.

In the meantime here is the modern web app version of something I included in some of my Pups a few years back - Sid's Cast for Chromecast.

It is a HTML5 app that does all of the above i.e. It casts local media from Google Chrome 64-bit to a Chromecast dongle with playlist support.

There is nothing to install. Just vist the link below using a recent version of Chrome and add it to your bookmarks bar.

http://sidscast.appspot.com

Note that no files are actually uploaded only file references. It will probably be sufficient for the majority of Chromecast users.
I was astounded when I found that it now has the ability to control Chromecast volume something that is usually only found in
high end USB dacs.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#30 Post by OscarTalks »

Hello ETP,

I am no expert, but I was reading that Chromecast has switched from DIAL to mDNS
Maybe you can still use either.
In VLC there is an optional dependency libmicrodns which I think is performing this function.

I don't have this device myself, but with the help of poster WiZard and other interested parties I have been trying to work out how to compile a version of VLC 3.0.1 from source in Puppy (32bit Stretch) that will work with Chromecast and I think we are making progress.
http://murga-linux.com/puppy/viewtopic.php?t=112804
Oscar in England
Image

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#31 Post by ETP »

Hi Oscar,

It makes sense that VLC should be using the latest mDNS protocol as they have been working on Chromecast support for at least 2 years.
Google used DIAL in the original Chromecast (2013?) and switched over later. I suspect that DIAL is still present for backward compatability.

VLC will become a must have tool for Chromecast users should Google drop support for all things 32-bit which would include the old cast extension
that has been baked into Chromium for some time having previously been available as an extension.

Good luck with VLC 32-bit, you seem to be on the right track. Thanks also for pointing out that mDNS is now used.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

Re: VLC & Sid's Cast for Chromecast.

#32 Post by drunkjedi »

ETP wrote:Hi folks,
With regard to Puppy, if and when anupam produces a working 64-bit appimage of VLC 3.0.1
it should be possible to extract the image, change it so that VLC can be run as root and then pet
it up as a ROX app.
Sorry about that, I didn't test it first.
I had to remove vlc2.2.6 in fatdog as the app image tried to run the installed version. Then I used fatdog's run-as-spot script to run the appimage, it gave segmentation fault.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Installing vlc 3.0.1 32-bit --- without Chromecast Support

#33 Post by ETP »

Installing vlc 3.0.1 32-bit --- without Chromecast Support

This is the first of 2 posts and just covers vlc for people who do not require the addition of Chromecast support.
VLC in Puppy now needs some extra persuasion/steps if it is to be run as root. The second post details the addition of Chromecast support.

Step One:

Update PPM and then use it to install vlc_3.0.1|multimedia player and streamer together with all its dependencies.

So doing will pull in all of the following. Do not attempt to launch vlc until you have completed Step Two.
  • libavc1394-0_0.5.4|control IEEE 1394 audio/video devices
    libdouble-conversion1_2.0.1|routines to convert IEEE floats to and from strings
    liblirc-client0_0.10.0-2|infra-red remote control support - client library
    liblua5.2-0_5.2.4|Shared library for the Lua interpreter version 5.2
    libmpg123-0_1.25.10-1|MPEG layer 1/2/3 audio decoder shared library
    libmtp9_1.1.13-1|Media Transfer Protocol MTP library
    libmtp-common_1.1.13-1|Media Transfer Protocol MTP common files
    libpulse0_11.1|PulseAudio client libraries
    libqt5core5a_5.9.5+dfsg|Qt 5 core module
    libqt5dbus5_5.9.5+dfsg|Qt 5 D-Bus module
    libqt5gui5_5.9.5+dfsg|Qt 5 GUI module
    libqt5network5_5.9.5+dfsg|Qt 5 network module
    libqt5svg5_5.9.5|Qt 5 SVG module
    libqt5widgets5_5.9.5+dfsg|Qt 5 widgets module
    libsecret-1-0_0.18.6-1|Secret store
    libsecret-common_0.18.6-1|Secret store common files
    libshout3_2.4.1|MP3/Ogg Vorbis broadcast streaming library
    libtwolame0_0.3.13-3|MPEG Audio Layer 2 encoding library
    libwayland-client0_1.14.0-2|wayland compositor infrastructure - client library
    libxcb-xinerama0_1.13-1|X C Binding xinerama extension
    libaribb24-0_1.0.3-1|library for ARIB STD-B24 decoding runtime files
    libass9_0.14.0-1|library for SSA/ASS subtitles rendering
    libbasicusageenvironment1_2018.02.18-1|multimedia RTSP streaming library BasicUsageEnvironment class
    libchromaprint1_1.4.3-1|audio fingerprint library
    libcrystalhd3_0.0|Crystal HD Video Decoder shared library
    libgroupsock8_2018.02.18-1|multimedia RTSP streaming library network interfaces and sockets
    libkate1_0.4.1|Codec for karaoke and text encapsulation
    liblivemedia62_2018.02.18-1|multimedia RTSP streaming library
    libmatroska6v5_1.4.8-1.1|extensible open standard audio/video container format shared library
    libmicrodns0_0.0.8-1|minimal mDNS resolver and announcer library shared library
    libnfs11_2.0.0-1|NFS client library shared library
    libopenmpt0_0.3.6-1|module music library based on OpenMPT -- shared library
    libopenmpt-modplug1_0.3.6-1|module music library based on OpenMPT -- modplug compat library
    libplacebo4_0.4.0-2|GPU-accelerated video/image rendering primitives shared library
    libqt5x11extras5_5.9.5|Qt 5 X11 extras
    libresid-builder0c2a_2.1.1|SID chip emulation class based on resid
    libshine3_3.1.1-1|Fixed-point MP3 encoding library - runtime files
    libsidplay2_2.1.1|SID MOS 6581 emulation library
    libsoxr0_0.1.2-3|High quality 1D sample-rate conversion library
    libssh2-1_1.8.0-1|SSH2 client-side library
    libupnp6_1.6.24-4|Portable SDK for UPnP Devices version 1.6 shared libraries
    libusageenvironment3_2018.02.18-1|multimedia RTSP streaming library UsageEnvironment classes
    libvlc5_3.0.1|multimedia player and streamer library
    libvlc-bin_3.0.1|tools for VLCs base library
    libvlccore9_3.0.1|base library for VLC and its modules
    libvulkan1_1.1.70+dfsg1-1|Vulkan loader library
    libzvbi0_0.2.35-13|Vertical Blanking Interval decoder VBI - runtime files
    libzvbi-common_0.2.35-13|Vertical Blanking Interval decoder VBI - common files
    vlc-bin_3.0.1|binaries from VLC
    vlc-data_3.0.1|common data for VLC
    vlc-plugin-base_3.0.1|multimedia player and streamer base plugins
    vlc-plugin-qt_3.0.1|multimedia player and streamer Qt plugin
    vlc-plugin-video-output_3.0.1|multimedia player and streamer video output plugins
    vlc_3.0.1|multimedia player and streamer
Step Two:

Use ROX-Filer to navigate to /usr/bin then use the ` {backtick key} or right click menu to open a terminal there.
Issue the following commands.

(pwd is just to check that you are in the correct directory i.e. /usr/bin
If successful there is no output from the sed line but the vlc binary should show the modified date and time.)

Code: Select all

# pwd
/usr/bin
# sed -i 's/geteuid/getppid/' ./vlc
#


Step Three:

Launch vlc from the JWM Multimedia menu. To test cvlc try the following in a terminal

Code: Select all

cvlc --play-and-exit /usr/share/audio/sys-login.mp3
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Installing vlc 3.0.1 32-bit --- adding Chromecast Support

#34 Post by ETP »

Installing vlc 3.0.1 32-bit --- adding Chromecast Support

This is the second of 2 posts, the first of which above just deals with the installation of vlc 3.0.1

Step One:

Use PPM to install in order the following items. N/B For each item on the list you must install all of the dependencies.

1. avahi-daemon_0.7|Avahi mDNS/DNS-SD daemon
2. avahi-discover_0.7|Service discover user interface for avahi
3. libnss-mdns_0.10
4. python-protobuf_3.0.0
5. python3_protobuf_3.0.0

Step Two:

A brief explanation.
In Linux microdns relies upon avahi for discovery and protobuf for streaming to the Chromecast.
Avahi is not normally implemented in Puppy and the daemon has to be run under its own group & user name.
To create those open a terminal and issue the following commands:

Code: Select all

# addgroup -S -g 120 avahi

# adduser -D -S -h /var/run/avahi-daemon -g "Avahi mDNS daemon" avahi -G avahi
There is no output but you can check the result with the following commands:

Code: Select all

# cat /etc/group

# cat /etc/passwd
Step Three:

Install the attached pet which contains two items:
1. A launcher placed in /root/Startup to start the avahi-daemon as the initial attempt to launch it from /etc/init.d
within Puppy fails as dbus (messagebus) has not at that early stage created a socket. Probably not an issue if using systemd.

2. A custom /etc/nsswitch.conf in accordance with this advice. https://wiki.archlinux.org/index.php/avahi

Step Four:

Make sure that your Chromecast is powered on then reboot saving the session.
When the desktop is reached check HTOP to ensure that you can see 2 items for the avahi-daemon running.
Launch vlc and check that there is an icon & entry to select for your Chromecast on the Playback/Renderer menu.
Test it.

Final Thoughts:

All of the above was developed and tested using peebee's 32-bit Upup_Bionic_Beaver-18.04+6 and upupbb-18.05
Additional tools installed and used during the process included:
gupnp-tools_0.8.14-1|tools for testing UPnP devices and control points (In particular gssdp-discover)
mdns-scan_0.5-2|Scan for mDNS/DNS-SD services published on the local network

Some relevant screenshots can be found here: https://drive.google.com/drive/folders/ ... sp=sharing

My own Chromecast is the original model and for the past 4 years it has mainly seen duty connected to my Hi-Fi
via a HDMI audio extractor.
There are a lot of hoops to jump through here which you would only go through if you wanted to divorce yourself from
reliance on a browser such as Opera, Google Chrome (Now 64-bit only) or Chromium and from players such as SMPlayer
that simply call a cast enabled browser to do the job.

As I posted previously on 19th April 2018 Google Chrome 64-bit plus Sid's Cast remains my favoured option. (See here.)
Attachments
avahi_launch_nsswitch_conf_fixup.pet
(788 Bytes) Downloaded 215 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

Cast2Chrome bash/gtkdialog app

#35 Post by wiak »

For those who don't have or want to use vlc or google chrome browser, here is a lightweight solution: bash/gtkdialog Cast2Chrome, which can cast local media files, or online url streamable media, or even from youtube urls (if optional youtube-dl is installed, which is small python program and highly recommended).

http://www.murga-linux.com/puppy/viewto ... 012#991012

It can also cast media that is otherwise unsupported by google chromecast - does so by transcoding on the fly (if optional ffmpeg is also installed).

wiak

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Sid's Cast for Chromecasts

#36 Post by ETP »

I have mentioned Sid's Cast in my previous post above as being my current favourite tool for handling
folders of both audio or video files and a single file such as a movie, to send to a Chromecast.

Nothing to install, just a bookmark in Chrome. A local install of the HTML page is also possible in which
case once again a simple bookmark to it within Chrome is all that is needed.

It is simple and easy to use whether the Chromecast is connected to your TV or HiFi.
To give anyone interested a quick overview I have created a brief video which may be viewed online here:

https://photos.app.goo.gl/kUZ1j3pjUYAMYxw87

.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Post Reply