Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 04 Sep 2015, 12:52
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
GTKplayYT lightweight youtube-dl shell
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sat 25 Jul 2015, 23:25    Post subject:  GTKplayYT lightweight youtube-dl shell
Subject description: youtube video playback and download shell for youtube-dl
 

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 in this 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#Quality_and_formats

(the change-log is a few replies down)
GTKplayYT-V3.0.0.c.pet
Description  version 3.0.0 LATEST VERSION. RECOMMENDED.
-huge rewrite.
-now has main menu script.
pet

 Download 
Filename  GTKplayYT-V3.0.0.c.pet 
Filesize  109.72 KB 
Downloaded  13 Time(s) 

Last edited by TecnoGuy458 on Tue 01 Sep 2015, 08:50; edited 24 times in total
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sun 26 Jul 2015, 04:02    Post subject: playYT.sh a script for playing youtube videos on older pups
Subject description: Version 1.3 is here!
 

see newer replies
Last edited by TecnoGuy458 on Wed 29 Jul 2015, 21:42; edited 9 times in total
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sun 26 Jul 2015, 04:47    Post subject:  

you can get youtube-dl from here:
https://rg3.github.io/youtube-dl/

Last edited by TecnoGuy458 on Tue 28 Jul 2015, 19:13; edited 3 times in total
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sun 26 Jul 2015, 18:11    Post subject:  

tell me what you think! Very Happy
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Tue 28 Jul 2015, 10:39    Post subject: playYT.sh a script for playing youtube videos on older pups
Subject description: changelog
 

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 Mon 31 Aug 2015, 21:51; edited 8 times in total
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Wed 29 Jul 2015, 04:43    Post subject: GTKplayYT a script for playing youtube videos on older pups
Subject description: audioYT2.sh! high quality audio of youtube videos!
 

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 Mon 31 Aug 2015, 21:50; edited 3 times in total
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Fri 31 Jul 2015, 05:32    Post subject:  

tell me what you think!
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7456
Location: Perth, Western Australia

PostPosted: Sat 01 Aug 2015, 09:24    Post subject:  

I was waiting for someone to do this!

Great work, I am downloading it now.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Semme

Joined: 07 Aug 2011
Posts: 5480
Location: World_Hub

PostPosted: Sat 01 Aug 2015, 14:00    Post subject:    

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. Mr. Green

==

Nice job Mr.Leathers.
gtkpyt_tl-5.jpg
 Description   
 Filesize   68.39 KB
 Viewed   2002 Time(s)

gtkpyt_tl-5.jpg

gtkgyt_tl.jpg
 Description   
 Filesize   62.04 KB
 Viewed   519 Time(s)

gtkgyt_tl.jpg

Back to top
View user's profile Send private message 
Griot


Joined: 12 Sep 2014
Posts: 117
Location: Serbia

PostPosted: Thu 06 Aug 2015, 05:24    Post subject:  

TecnoGuy458 wrote:
tell me what you think! Very Happy


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!
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Fri 07 Aug 2015, 03:34    Post subject:  

Griot wrote:
TecnoGuy458 wrote:
tell me what you think! Very Happy


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 in this repository
also see the new wiki: https://github.com/ThomasTheSpaceFox/GTKplayYT/wiki
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 57

PostPosted: Fri 07 Aug 2015, 22:12    Post subject:  

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
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sat 08 Aug 2015, 08:36    Post subject: GTKplayYT lightweight youtube-dl shell  

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. Shocked

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. Confused

oh sorry, monologing Rolling Eyes Cool
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 57

PostPosted: Sat 08 Aug 2015, 11:50    Post subject:  

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.
Back to top
View user's profile Send private message 
TecnoGuy458


Joined: 26 Jan 2015
Posts: 95
Location: Ohio

PostPosted: Sat 08 Aug 2015, 20:13    Post subject: GTKplayYT lightweight youtube-dl shell  

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0828s ][ Queries: 12 (0.0121s) ][ GZIP on ]