Cast2chrome

Audio editors, music players, video players, burning software, etc.
Message
Author
wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

Cast2chrome

#1 Post by wiak »

NEW VERSION requires gtkwialog version 0.8.5 or above

Cast2Chrome

Cast2Chrome is a bash/gtkwialog full-featured GUI frontend to Stream2Chromecast (see screenshots at foot of this post) which allows you to stream local files or url files, or online youtube-type videos to a chromecast dongle plugged into the hdmi port of your television.

Dependencies. Required: bash, gtkwialog, stream2chromecast

The underlying utility, Stream2Chromecast, is a python2.7 Chromecast media streamer for Linux by Pat Carter. It can stream local files or, if supplied with the url, streamable online stored files (such as mp4; and via http, https, rtsp:).

Dependencies. Required: python2.7; Optional: ffmpeg or avconv (for transcoding), youtube-dl (+ffmpeg or avconv) for streaming media from youtube or similar.

In addition, if ffmpeg is available, stream2chromecast can transcode any unsupported files in real time and play them on the Chromecast. The wiak-mod to the supplied stream2chrometest.py allows the program to also support piping to stdin via ffmpeg using youtube-dl for streaming youtube or similar media.

Developed and tested on XenialDog64. http://www.murga-linux.com/puppy/viewtopic.php?t=109476 Works fine there and also work on Bionic and probably others.

I've also tested as working on XenialPup32. XenialPup includes a suitable python2.7. (However, didn't work on Slacko 6.3.2 32bit version I tried; seemed like the python2.7 I installed from slackware 14.1 repo wasn't complete enough).

If you want to cast youtube media on XenialPup32 DO NOT use the old version from its Puppy Package Manager. Instead install the newest version as follows:

Code: Select all

curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

chmod a+rx /usr/local/bin/youtube-dl
Screenshots, Dotpets and Debian packages for cast2chrome and specially youtube-dl pipe-capable wiak-modded stream2chromecast can be found below. These work on either 32bit or 64bit OS. Otherwise, just press Help button in cast2chrome and provide feedback.

wiak
Attachments
cast2chrome_0.0.4_all.deb.tar
Just remove dummy tar before installing
(7.68 KiB) Downloaded 198 times
stream2chromecast_0+git20180507-0~webupd8~0_all.deb.tar
Just remove the dummy tar
(26.05 KiB) Downloaded 207 times
cast2chrome_BasicTab.jpg
(45.98 KiB) Downloaded 1182 times
cast2chrome_SubtitlesTab.jpg
(41.45 KiB) Downloaded 1132 times
cast2chrome_TranscoderTab.jpg
(45.78 KiB) Downloaded 1150 times
cast2chrome_AdvancedTab.jpg
(50.04 KiB) Downloaded 1145 times
Last edited by wiak on Fri 20 Jul 2018, 07:54, edited 29 times in total.

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

#2 Post by wiak »

I'm planning a sibling of this program that will keep a copy of any youtube video played, at least temporarily in RAM. However, If using RAM temp for that, I'll keep the one above too because on low-powered machines with little RAM I'd probably want two (they are tiny anyway) one that 'saves' the youtube video and one just for playing on-the-fly.

wiak

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#3 Post by spiritwild »

Holy hell it works !! At least the youtube part. I'm streaming right out of the box on LxPupXenial 16.08. I'll shake down the other formats later and see how that goes.

I'm excited, much thanks for this.

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

#4 Post by wiak »

spiritwild wrote:Holy hell it works !! At least the youtube part. I'm streaming right out of the box on LxPupXenial 16.08. I'll shake down the other formats later and see how that goes.

I'm excited, much thanks for this.
You're welcome.

I'm expecting to post next version tomorrow, which will allow choice to save the youtube stream simultaneously to casting it. That will be a checkbox selection, with dir/file entry boxes for where you want to save.

wiak

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#5 Post by spiritwild »

Is FFMPEG used as default? per ....export FFMPEG="ffmpeg" ?

Also, excuse my ignorance on gtk, is there a default configuration file
If I wished to keep certain transcoder options by default in the GUI ?

Or should I try to edit the cast2chrome script lines in... # Default config:

Thanks.

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

#6 Post by wiak »

Add the following line, just before the final 'exit 0' line at the end of the script and config saving will work (I accidentally missed it out in the 0.0.1 release version):

Code: Select all

trap - INT TERM ERR EXIT
wiak
Last edited by wiak on Mon 21 May 2018, 04:20, edited 3 times in total.

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

#7 Post by wiak »

Sorry, though I do have a partially complete new version that does simultaneouly save youtube videos whilst playing them (if checkbox activated) I haven't added the last few bits required. Alas I started reading and responding to another thread and have run out of time tonight. I'll be back home on Saturday evening and will certainly complete the next version within a couple of days of that. So if you are interested in the program just check back in then.

wiak

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#8 Post by spiritwild »

Thanks Again, will do!

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

#9 Post by wiak »

.
Last edited by wiak on Sun 20 May 2018, 10:25, edited 2 times in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#10 Post by mikeslr »

wiak wrote: I've broken a couple of ribs
.

That's not a recommended procedure for Linux gurus. :shock: Try not to do it again. :idea:

And get well soon.

mikesLr

p.s.

The vaudeville skit runs like this:

Concerned friend: "Have an accident?"
Injured friend: "No thanks. I've already had one."

:roll:

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

#11 Post by wiak »

mikeslr wrote:
wiak wrote: I've broken a couple of ribs
.

That's not a recommended procedure for Linux gurus. :shock: Try not to do it again. :idea:
Yes, thanks, it was a bit annoying, main problem being that one of my own ribs decided to stab my lung and I was on a different island, 500km away by air from home and cos of the lung not allowed to fly but had kids to look after at home. So ended up taking risk to travel by bus and ferry the day after the accident - the doctor was a bit correct about that idea... but I am now home and may yet complete the castchrome additions within the next few days whilst otherwise bored painfully out of my skull.

wiak

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#12 Post by fredx181 »

Sounds serious. Take it easy and all the best, wiak !

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#13 Post by backi »

Sorry to hear wiak :shock: :shock:
Serious indeed :shock: ......... I hope you're doing better. :) :) :)

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

cast2chrome version 0.0.2 released

#14 Post by wiak »

cast2chrome version 0.0.2 released.

Can play local media from your Puppy to TV that has cheap chromecast dongle plugged in to its HDMI port - no cables required, nor is chrome browser or vlc required at all - cast2chrome is a very low resource solution. And your Puppy laptop can be an old one that has no HDMI output ports itself, or any display ports at all actually... Can also play internet streaming media including youtube (if youtube-dl also installed per first post instructions), which it can also save whilst playing.

Changes:
# 0.0.2 dated 2018/5/23: Fixed save config; added optional save youtube whilst playing; fixed removal of youtube-related processes on quit. Made config file handling more robust.

Main GUI changes are:

The save checkbox (which is only applicable for youtube streams). The savefile location is selected under "Optional" tag (default is $HOME/youtubeDATESTAMP). The screenshot in first thread post are for 0.0.1 version, but just hover your mouse over GUI elements for descriptive help (and/or press HELP button).

Bugs: None known of.

The start/pause/stop buttons sometimes take a few seconds to activate. There is alot going on underneath in the stream2chromecast utility, so you just have to be patient. Basically wait till the button greys out or loses its grey (depending on what you are doing).

Download is currently from first post of this thread:

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

As before you need to install both cast2chrome and stream2chromecast pets and need a fullish python2.7 installation (and optional ffmpeg for automatic transcoding of chromecast unknown video formats and youtube-dl for streaming Internet youtube media to the dongle via cast2chrome system).

Tested on:

XenialPup32 (and also on one of the dogs: XenialDog64, for which debs are provided) but should definitely also work on Bionic and maybe on earlier systems (but untested there).

Future:

I'm not sure I'll be adding much (if any) additional functionality in the nearish future. Only thing I might do, because I'd like it, is add a commandline API to cast2chrome such that it could easy be programmably called up from the likes of Pmusic or DogRadio or similar. Much like 01micko's PupRadio was able to call up Precord for recording, but cast2chrome would be called up for streaming the 'other-app's' selected media to the chromecast dongle in this case.

Let me know if any bugs discovered or any functionality lacking and I'll certainly consider your ideas.

wiak

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

cast2chrome version 0.0.3 released

#15 Post by wiak »

cast2chrome version 0.0.3 released.

Streams local and internet media to a chromecast device plugged into HDMI port of television.

Changes:

Depends on gtkwialog (drop in replacement for legacy gtkdialog but with extra functionality that allows cast2chrome to be used on dash systems (such as Ubuntu or Debian), ash systems (such as Slitaz) and bash systems (such as Puppy Linux).

Fixed a major bug in previous version, which wouldn't work correctly with local files.

Changed volume UP/DOWN behaviour since previous method was unstable.

Like version 0.0.2 the user can optionally save youtube videos as they are being downloaded.

See first post of this thread for more details, additional requirement, and downloads.

wiak

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

#16 Post by wiak »

Cast2chrome now depend on gtkwialog (which is currently under development but not yet published) so that it can also be used on systems that run dash as their underlying system shell.

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

#17 Post by wiak »

NEW VERSION being uploaded so download temporarily removed - old version needs updated to work with the latest gtkwialog 0.8.5

I'll try to find time to do test and upload the new cast2chrome version tomorrow.

Busy making a very rough and incomplete frontend for my git and github uses/experiments (to help my poor memory when it comes to git commands...) - early draft stages with that though.

wiak

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

#18 Post by wiak »

Cast2chrome version 0.0.4 uploaded to first post of this thread. NOTE WELL that it requires gtkwialog ver 0.8.5 (or later) to function. It uses gtkwialog -b mode and will work out-of-the-box on systems that use bash or dash or ash etc as their underlying system shell.

wiak

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#19 Post by vovchik »

Dear wiak,

Thanks for the script, which works for me. I have attached two icons you could consider using - svgs (one blue and one red). They are tiny, each weighing in at some 1.4k.

With kind regards,
vovchik
Attachments
grey-chromecast-svg.tar.gz
(765 Bytes) Downloaded 119 times

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

#20 Post by wiak »

vovchik wrote:Thanks for the script, which works for me. I have attached two icons you could consider using - svgs (one blue and one red). They are tiny, each weighing in at some 1.4k.
Thanks vovchik, I'll add these on. Is one a menu icon and one a program icon? i.e. Are you using one in gtkwialog <window ... icon-name...> (?) and one in desktop file? I see one is blue the other red so wondering if you are using them to indicate active/non-active in some way, but not sure so will wait to hear back from you. I don't do much with icons these days so I have lost touch with the details of implementing them.

Also, which /usr/xxx/share (or whatever) folder have you put them in on your own tests - I'll just do the same before uploading new version.

wiak

Post Reply