GTKplayYT lightweight youtube-dl shell

Audio editors, music players, video players, burning software, etc.
Message
Author
TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

GTKplayYT lightweight youtube-dl shell

#1 Post by TecnoGuy458 »

GTKplayYT

GTKplayYT3 (v3.0.0) is now up on github! (under the GTKplayYT3 branch, not the main one)

you can also find it in the releases section! here
The scripts now self-locate! (aka its now portable!)

note about portability: the directory "/root" or any sub-directory thereof, may cause problems with GTKplayYT3 if it is installed there.


i have attached the v3,0.0 .pet below



-main menu script (chooserYT3.sh) (so anyone who wants a desktop entry (i.e. convenience, making packages) only needs to write one instead of five)

find me on GtiHub: https://github.com/ThomasTheSpaceFox

you can find the .PET(currently also attached below) and the source code inthis repository

also see the new wiki: https://github.com/ThomasTheSpaceFox/GTKplayYT/wiki

set of bash scripts that use gtkdialog and mplayer to act as a shell for youtube-dl

playYT2.sh can help older pups play youtube videos.
-Youtube Format codes can be used (at least with mplayer)

getYT2.sh is useful for downloading youtube videos on many pups
-(Youtube Format codes can be used)

audioYT2.sh works great for playing youtube videos as 128k & 256k m4a audio

-Lightweight:
playYT2.sh and audioYT2.sh cache the full video/audio file before playback. minimizing CPU and memory usage.

-pick your media player:
both audioYT2.sh and playYT2.sh let you choose the media player to use.

-send more options: users can send extra options to the chosen media player and youtube-dl just as they would from the command line right from the script's dialog.

small: minimal file size.

requires gtkdialog, youtube-dl (mplayer is recommended for convenience because mplayer is the default in both playback scripts)

TIP Type youtube-dl -F [youtube-Video-url] to get a list of available format codes for a video

Wikipedia has a nice chart of youtube format codes:
https://en.wikipedia.org/wiki/YouTube#Q ... nd_formats

(the change-log is a few replies down)
Attachments
GTKplayYT-V3.0.0.c.pet
version 3.0.0 LATEST VERSION. RECOMMENDED.
-huge rewrite.
-now has main menu script.
(109.72 KiB) Downloaded 1010 times
Last edited by TecnoGuy458 on Tue 01 Sep 2015, 12:50, edited 24 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

playYT.sh a script for playing youtube videos on older pups

#2 Post by TecnoGuy458 »

see newer replies
Last edited by TecnoGuy458 on Thu 30 Jul 2015, 01:42, edited 9 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#3 Post by TecnoGuy458 »

you can get youtube-dl from here:
https://rg3.github.io/youtube-dl/
Last edited by TecnoGuy458 on Tue 28 Jul 2015, 23:13, edited 3 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#4 Post by TecnoGuy458 »

tell me what you think! :D

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

playYT.sh a script for playing youtube videos on older pups

#5 Post by TecnoGuy458 »

Changelog

changelog:
0.8:
getYT.sh created
1.0:
-playYT.sh created
1.1:
-bugs fixed
1.3:
-gtkdialog introduced as separate scripts (GTKplayYT.sh and GTKgetYT.sh)
2.0:
-complete rewrite
-pick video format! [both!]
-set filename in getYT2.sh!
-set extra program options [both for youtube-dl, just playYT2.sh for mplayer.
-some entry options are disabled by default and are enabled by check-boxes to prevent accidental entry. ex: video format
-dialogs are now built into the main scripts
-new program directory: /root/GTKplayYT/
-new video cache directory for playYT2.sh /root/GTKplayYT/VIDCACHE/
2.1:
-small bug fix: an echo command was typed echp and caused a small error [fixed]
-in playYT2.sh you can now change what media player to play the video with. ex: you could use vlc instead of mplayer
2.2:
-bug fix on checkbox label for video player selection please update
2.3:
-bug fix: updated dialog version numbers (in the title at the top)
-bug fix: updated version number in the .desktop files
-new: audioYT2.sh: plays high quality audio of youtube videos (based on playYT2.sh but modded to use youtube audio modes)
-dialogs now have description of what they do at the top, below the name and version number.
2.3.1:
only getYT2.sh has changed: its version is now 2.3.1. getYT2.sh default filename template now includes proper extension
2.3.2:
-adds GPL v3.0
-about dialog script with pixmap image
-brushes up the interface of Version 2.x.x
final version of versions 2.x.x
3.0.0
-add main menu
-added ability set default options
-add dialog window titles and window icons
-added settings menu
-ensure terminal emulator windows appear for playYT3.sh getYT3.sh and audioYT3.sh
-changed the main version number in the icons and script names from 2 to 3.
Last edited by TecnoGuy458 on Tue 01 Sep 2015, 01:51, edited 8 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

GTKplayYT a script for playing youtube videos on older pups

#6 Post by TecnoGuy458 »

audioYT3.sh is a modified playYT3.sh.


whats the difference?
audioYT3.sh is reprogrammed to play only audio for when you are only interested in the audio EX: music, talk show, news, radio show /podcast ported to youtube, you get the idea.

what formats?

the default is 128k m4a but you can also use 256k m4a the dialog explains how to set this.


IMPORTANT NOTE: when using mplayer with audioYT3.sh LET IT FINISH PLAYBACK!

TIP: you can skip forward with [Page Up] pressing it usually skips to the end of the video press again if necessary.

the problem is if you close the terminal that appears when you run audioYT3.sh, it closes the script and the cache file doesn't get deleted. it needs to be because if the pre-programmed cache file isn't deleted youtube-dl will "think" its the same video and the video that is in that cache file will play over again.

to fix this just run the script again as usual (enter any youtube video url) the previous video will play. let it play through. and the cache file will be deleted and the script will play properly the next time it's run.
Last edited by TecnoGuy458 on Tue 01 Sep 2015, 01:50, edited 3 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#7 Post by TecnoGuy458 »

tell me what you think!

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

I was waiting for someone to do this!

Great work, I am downloading it now.
[url]https://bkhome.org/news/[/url]

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#9 Post by Semme »

Haven't spent enough time with it to know all the details but, they appear to be functioning properly aboard 528.

Folks, for the youtube-dl binary, you grab the 940k, "youtube-dl" item here.

Place it somewhere on your path, then rt-clk and make executable.

If you already have a copy, it's: youtube-dl --update

*ACTUAL SS URL. :mrgreen:

==

Nice job Mr.Leathers.
Attachments
gtkpyt_tl-5.jpg
(68.39 KiB) Downloaded 4778 times
gtkgyt_tl.jpg
(62.04 KiB) Downloaded 2975 times

User avatar
Griot
Posts: 131
Joined: Fri 12 Sep 2014, 18:10
Location: Serbia

#10 Post by Griot »

TecnoGuy458 wrote:tell me what you think! :D
Well done, bro! :beer:
GTKgetYT works great on Sulu2 (5.2.8.7-June2015).
I guess audio & play scripts will do the trick, too.
Thanks!

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#11 Post by TecnoGuy458 »

Griot wrote:
TecnoGuy458 wrote:tell me what you think! :D
Well done, bro! :beer:
GTKgetYT works great on Sulu2 (5.2.8.7-June2015).
I guess audio & play scripts will do the trick, too.
Thanks!
glad you like it!

BTW i now am on GtiHub: https://github.com/ThomasTheSpaceFox
you can find the .PET and the source code inthis repository
also see the new wiki: https://github.com/ThomasTheSpaceFox/GTKplayYT/wiki

jlst

#12 Post by jlst »

Good job mate. I'd help you but everytime I see a gtkdialog dialog, I just don't know what to do, it's just another world.

Being a bash purist, I use YAD, simple and well done dialogs, that's how I can create a script of 500 lines easily, everything makes sense and I can go on and on.

Other than that, I came here to cheer you up yay

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

GTKplayYT lightweight youtube-dl shell

#13 Post by TecnoGuy458 »

jlst wrote:Good job mate. I'd help you but everytime I see a gtkdialog dialog, I just don't know what to do, it's just another world.

Being a bash purist, I use YAD, simple and well done dialogs, that's how I can create a script of 500 lines easily, everything makes sense and I can go on and on.

Other than that, I came here to cheer you up yay
Long Monolog ahead. :shock:

yea playYT2.sh (version 2.3.2) is only 102 lines while getYT2.sh is only 92.

gtkdialog is a little complicated to learn. (i learned what i know now programming the dialogs for GTKplayYT. over the course of a week.

there is still a lot i need to learn. and i want to know how to do things like change the window title and icon. I learned what i know in BASH, gtkdialog, lua, HTML and so on, in practice.

recently i started my first Minetest mod. nothing fancy, just some decorative nodes that don't even have crafting recipes.

you can find it and anything else I'm working on, Including GTKplayYT, at my GitHub: https://github.com/ThomasTheSpaceFox

i figured i needed a GitHub after realizing i had 2 active projects, in 2 different areas, on 2 different computers, and in 2 different programming languages. :?

oh sorry, monologing :roll: 8)

jlst

#14 Post by jlst »

I'm sorry if I offended you, it's just that I've been programming in bash for 2 years, and I never touched gtkdialog, it always looked weird in a bash script. I always thought YAD was the best for beginners.

You treat YAD the same way you treat other programs, once you learn how to use it, you don't need XLM templates, just a few command line options to fine tune your dialog.

You store YAD's output in a variable and process it, you can specify an exit code for a specific button and then
process according to that exit code... it's very limited compared to gtkdialog, but it's worth it... because you now know how to work with every other program's output and exit codes....

I'm currently the only one following your project on github.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

GTKplayYT lightweight youtube-dl shell

#15 Post by TecnoGuy458 »

Just a quick announcement,
GTKplayYT is now being developed on GitHub.

please check there for updates
check the wiki for updated how-to information
report any bugs there.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

GTKplayYT lightweight youtube-dl shell

#16 Post by TecnoGuy458 »

UPDATE: version 3.0.0 is out see first post for more info and a .PET package (be sure to pick the one labeled GTKplayYT-v3.0.0.pet


-one .desktop (menu entry) instead of 4
-new main menu script.
-dialogs now have window titles and icons
-set default options! see "settings" in main menu.
-make sure you set your preferred format, video player, and other preferred settings in settings!!!!!!!
Attachments
capture5574.png
screenshot of new main menu.
(20.31 KiB) Downloaded 718 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#17 Post by BarryK »

In all pups, you should use "defaultmediaplayer", not mplayer.

Then there is no need to choose a media player.
[url]https://bkhome.org/news/[/url]

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#18 Post by TecnoGuy458 »

BarryK wrote:In all pups, you should use "defaultmediaplayer", not mplayer.

Then there is no need to choose a media player.
i could just rebuild the .PET with "defaultmediaplayer" as the entry for the script's default setting for the media player.

its as easy as going into the new settings menu, and changing the setting for the default media player to "defaultmediaplayer"

UPDATE: updated the .PET "defaultmediaplayer" should be the default setting for the media player by default.

User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#19 Post by solo »

Thank you for posting this.

Finally decided to remove Flash after yet another public security warning. Playing HTML5 video however takes up so much resources on my computer that the controls become unresponsive and my browser almost freezes.

This is the perfect solution for me.

Easy, fast, smooth, great.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#20 Post by Semme »

Did Google change their site coding again?

Sample URL >> http://www.youtube.com/watch?v=yG07WSu7Q9w
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

Post Reply