gtk-youtube-viewer (for lots of pups)

Browsers, email, chat, etc.
Message
Author
sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

modified script still no 480p

#281 Post by sindi »

Tested via CLI not a script, in X in a urxvt terminal.

cd /mnt/home/yt-viewer
./cde-exec uxterm -e youtube-viewer --res=480p

urxvt instead of uxterm segfaults.
the package has both xterm and uxterm. Both work.

I chose a recent video probably 1080p and it still overfills the screen.
I see the central part of it on my 1024x768 monitor.

f shrinks it to 720p (full width of my screen).


The mplayer2 from (I think) Tahr ppm streams URLs (older mplayers do not) and I think also does fbdev.
How do I substitute it for mpv? (Probably won't work in wary though).

Got to run - more later. Immense thanks for all your efforts.

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

#282 Post by fredx181 »

sindi wrote:Tested via CLI not a script, in X in a urxvt terminal.

cd /mnt/home/yt-viewer
./cde-exec uxterm -e youtube-viewer --res=480p
On wary ?
Anyway I tried on wary and didn't have segfault.
Maybe try without uxterm, just:

Code: Select all

./cde-exec youtube-viewer --res=480p
Or better like I wrote in previous post:
EDIT: Should work also if you make the script (untested EDIT tested now and works fine):
Code:
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export LC_ALL=en_US.UTF-8
cd "$HERE/cde-root" && ../cde-exec youtube-viewer "$@"

And then can run it like :
Code:
./youtube-viewer.cde --res=480p
The mplayer2 from (I think) Tahr ppm streams URLs (older mplayers do not) and I think also does fbdev.
How do I substitute it for mpv? (Probably won't work in wary though).
Didn't test, but I'm almost sure that only a very recent mplayer can possibly work with youtube-viewer.
(tested a lot with different mplayer/mplayer2 versions last days)
Immense thanks for all your efforts.
You are welcome, interesting stuff for me also to discover :wink:

Fred

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

DebianDog working with wifi

#283 Post by sindi »

Wifi is working on one laptop with ipw2100. Maybe I just needed to reboot.
(Puppy wifi works without rebooting). The resolution is correct too.

With the CDE package many videos are too large for the screen.

In Wary I can run youtube-viewer with or without uxterm/xterm plus exec.
(u)rxvt segfaults

On a 2004 1.5GHz Inspiron 600M:

At 480p mpv uses 52% of CPU, and at 720p it uses 63-69%, while Xorg uses 36%.
Some parts of videos are okay at 720p.

An mplayer2 that streams video with fbdev would help.

youtube-viewer can simply download files to play later with non-streaming mplayer
in wary.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

youtube-viewer cde package works in tahr, not with mplayer2

#284 Post by sindi »

works fine with tahr (and no xterm), and resolution seems more stable.

I installed the Tahr (Ubuntu 14) mplayer2, and edited youtube-viewer.conf to use it as the viewer, but it did not play.

I think I had it streaming video as it was downloading with youtube-dl last year.

In Tahr, 480p, mpv uses 53% of cpu, cde-exe 6%, X 3%, and palemoon browser 17% doing nothing..

With youtube, at 360p, palemoon uses 71% of CPU (more than mpv at 480p).

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

youtube-player with VLC?

#285 Post by sindi »

vlc supposedly plays in framebuffer console but I cannot figure out how.
Someone complained that vlc plays slower than mplayer and with wrong colors.

the youtube-viewer .conf file is set to --fullscreen, which may explain why videos play properly at 480p in DebianDog but in Puppies with the CDE package they play 'fullscreen' meaning 1080p on a screen smaller than that unti I hit F to make them 480p. This may be adjustable in the .conf (config) file.

It is late. This is addictive.

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

#286 Post by fredx181 »

sindi wrote:I installed the Tahr (Ubuntu 14) mplayer2, and edited youtube-viewer.conf to use it as the viewer, but it did not play.


I'm not sure how cde works exactly, but I think it can "look" outside of the cde-root (for e.g. mplayer), but the dependencies need to be present inside.
Also I think mplayer2 cannot work with youtube-viewer, I only had success with latest mplayer from Stretch.
the youtube-viewer .conf file is set to --fullscreen, which may explain why videos play properly at 480p in DebianDog but in Puppies with the CDE package they play 'fullscreen' meaning
Don't really know why the --fullscreen is in the config file, anyway for me it doesn't play fullscreen (if I configure 480p, it works as expected)
What's in the config file is the resolution of my laptop, indeed maybe try to change according to your resolution, e.g:

Code: Select all

mainw_size                          =>  "1024x768"
Fred

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

480p on 2004 Inspiron 1150

#287 Post by sindi »

2004 DELL Inspiron 1150 with 855GM integrated Intel video. In Wary linux.
(Lupu crashes with old intel driver, and sulu1 and later do not do fbcon).
512MB RAM PC2100. Can also use PC2700 but I don't have extra 512MB SODIMMs of either.

CPU tests out about as fast as a 2001 DELL 8100 but the video chip is faster.

ipw2100B internal mini-PCMCIA card downloading at 1/2 of 11Mpbs or 5.4Mbps.

Comparison of youtube in a browser (html5) and with youtube-viewer.
Palemoon playing directly at youtube.com.
Youtube set it to auto 144p then 240p after a while then 360p (very jerky).

At 240p VSZ% 110% for palemoon and 30% for X. Plus 97% of CPU.
Looks okay despite the VSZ value. Would probably be jerky with a lot of action.

youtube-viewer in X works much better.

480p plays with 32-42% CPU for mpv and 10% for cde.exe.
VSZ% 75% mpv and 28% X which adds to 103%.

720p 85% cpu for mpv, 9% for cde-exec, 2% for X.
VSZ% 34% mpv, 29% X.

Another video:
CPU mpv 84-88% cde-exe 7% X 2%
VSZ% 29% mpv, 29% X, about 20% rxvt bash sh jwm etc.

720p overfills the screen until I hit F and takes longer to buffer than 480p (at 5.4Mbps).

This laptop only does 8-bit color in console framebuffer mode (allocates 1MB of onboard RAM to framebuffer).
No point in playing in framebuffer console (at 8-bit color) and besides it can handle 720p in X (better than
a DELL 600M also 2004 but with different graphics).

gtk-youtube-viewer worked on the first video I tried.
Set to 720p, it played 480p at over 100% VSZ% and 61% CPU.
Does not play any other videos including the same one a second time.

If I restart gtk-youtube-viewer it still won't play anything.
After which youtube-viewer still plays videos.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

youtube viewer full screen on 2003 Toshiba M35-S359

#288 Post by sindi »

1.4GHz CPU, nvidia, plays youtube in palemoon at 240p with 53% of CPU used by palemoon, 40%by X, and the rest by other things. Theater mode is impossible.

Youtube-viewer plays full-screen (720p) with 39% CPU mpv, 7% cde-exe, and 48% X. No jerkiness. With fbdev even slower cpus would work at 720p (without X using half the CPU power). I should try my P3 Inspiron 8100 in X.

The Toshiba has a gorgeous non-glare wide screen and Harmon Kardon speakers, and was not usable with Youtube until now. I upgraded to 768MB and may try again to use vlc in Tahr.

It was $1450 new after rebates 15 years ago and is like new again!

My dyslexic partner learned to click on rxvt and type yt then choose subject. No need for uxterm or (buggy) gtk-youtube-viewer.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#289 Post by greengeek »

Hi Fred - thanks for youtube-viewer - it is working well on Slacko 5.6

I cannot figure out if this downloading the video file or just streaming it. Is there an easy way to replay the video once it has been viewed? Or does it have to be selected and streamed again?

Just thinking that it would be nice (and a bandwidth saving) if the file existed in memory after the first viewing, so that it could be replayed.

cheers!

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

#290 Post by fredx181 »

Hi greengeek,
I cannot figure out if this downloading the video file or just streaming it
Just streaming, normally used, but (as you might know) there's also option to download video's.
Is there an easy way to replay the video once it has been viewed? Or does it have to be selected and streamed again?
You mean from "cache" or something ? I don't think so, but not sure.
EDIT: Sorry, misunderstood, you just mean replay, again not sure, but I think it needs selected and streamed again.

Fred

hamoudoudou

lucid version in Dpup Stretch

#291 Post by hamoudoudou »

=>> Search for YouTube videos (:h for help)
> dpup stretch

1. Puppy linux bemutató | Dpup Stretch 7.0.0a2 32 bit (by Kálmán Staudinger) [23:09]
2. Wolf Pup Stretch and WHOA! (by nywolforg) [00:30]
3. Saját tárolófájl átméretezése (Resize Pupsave) (by Lionel TURQUAUD) [01:49]
4. 15 Minute Stretch Class Yoga with Fightmaster Yoga (by Fightmaster Yoga) [15:16]
5. Labrador Fart Stretch (by Night's Tales) [00:16]
6. Having my PERIOD!! My Foam Rolling & Stretching Routine (by Sarahs Day) [15:
...
Then :twisted: :twisted:
...
=>> Select one or more videos to play (:h for help)
> 1

=>> Description
--------------------------------------------------------------------------------
A bemutatóban szereplő puppy: stretch-7.0.0a2-k4.9.62-18Nov2017.iso.
--------------------------------------------------------------------------------
* URL: http://www.youtube.com/watch?v=O-9ATnsQboQ
--------------------------------------------------------------------------------
=>> Puppy linux bemutató | Dpup Stretch 7.0.0a2 32 bit <<=

-> Channel : Kálmán Staudinger
-> ChannelID : UCql-YL9_YdPkowtnI6ZDIOg
-> Definition: HD
-> Duration : 23:09
-> Likes : 5
-> Dislikes : 0
-> Comments : 12
-> Views : 341
-> Published : 28 Nov 2017
--------------------------------------------------------------------------------
Attachments
MPV.jpg
Stretch = Yoga or Dpup Stretch, only one result, video from our hungarian Puppy dev
(41.47 KiB) Downloaded 807 times
Last edited by hamoudoudou on Tue 03 Apr 2018, 04:12, edited 2 times in total.

hamoudoudou

for downloading , use palemoon extensions

#292 Post by hamoudoudou »

for downloading , use palemoon extensions (here Dpup stretch Hu, loader alreaday set by Skamilinux Team in palemoon) : complete you tube saver
a second one could be needed for different sites, as Dailymotion
Attachments
extensions.jpg
Choice by Puppy builders
(35.13 KiB) Downloaded 818 times
Last edited by hamoudoudou on Thu 12 Apr 2018, 03:40, edited 1 time in total.

kuman11
Posts: 248
Joined: Tue 26 Dec 2017, 09:32

fredx181

#293 Post by kuman11 »

fredx181,

it seems I can't close the mpv windows even after the vewer's closed ...?

They behave as if they're bugs ...
Then I hear a few secs of music and that's all ..

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#294 Post by greengeek »

Hi fredx181 - is there a thread for your non-gtk version? You have made it really easy to use with all the stuff you built in ad maybe it should have its own thread?

I couldn't work out how to use it to download - but I also wondered if there is way to get it to play sequentially through the specific list that it displays in response to a search?

Also (sorry for all the questions) - how do you display the first few items when the search returns 20 or more results and only displays the end ones. I can't seem to scroll up. (Slacko 5.6 here)

cheers!

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

#295 Post by fredx181 »

Hi all, here's a new cde package yt-viewer-3.1.5, same as first shared here:
http://www.murga-linux.com/puppy/viewto ... 978#986978
But made some fixes:
- the config files (in cde-root/root/.config/youtube-viewer/) are not included.
By first running gtk-youtube-viewer.cde or youtube-viewer.cde they will be automatically generated (as it should be, and will be according to e.g. your resolution).
- The script youtube-viewer.cde should be run from terminal now (no uxterm opening by just clicking on it) and accepts options same as original youtube-viewer, for example (from ReadMe-youtube-viewer.cde inside extracted folder):
./youtube-viewer.cde --res=480p # resolution 480p
Or:
./youtube-viewer.cde --res=360p -d # resolution 360p and download only video
Or:
./youtube-viewer.cde --res=360p -d -dp # resolution 360p, download and play video

For full help:
./youtube-viewer.cde --help
EDIT: In the ReadMe it says ./youtube-viewer.cde --res=480p -dp for download and play, that's wrong, should be "-d -dp"
Also, for info, downloading doesn't always work with the correct resolution, e.g. if 480p is not available, it will download e.g. 720p.
And: The downloaded video(s) will be by default in cde-root/ directory

Download:
https://dl.dropboxusercontent.com/s/gfg ... ar.gz?dl=1

@kuman11
it seems I can't close the mpv windows even after the vewer's closed ...?
Sorry, I can't reproduce that.

@greengeek
I couldn't work out how to use it to download - but I also wondered if there is way to get it to play sequentially through the specific list that it displays in response to a search?
I'm not very familiar with youtube-viewer (mostly used gtk-youtube-viewer), see for how to download above but your other question I can't answer.
Also (sorry for all the questions) - how do you display the first few items when the search returns 20 or more results and only displays the end ones. I can't seem to scroll up. (Slacko 5.6 here)
That could be solved if you use updated package (then can use terminal of choice that supports scrolling)

Fred

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#296 Post by greengeek »

Thanks Fred, working well for me - with one exception - the first version allowed me to click youtube-viewer.cde and it would open directly in terminal.

Now when I click youtube-viewer it does nothing. I have to open a terminal in that directory and enter ./youtube-viewer before it will start.

Any ideas why that behaviour would have changed on my system? (Slacko 5.6)

cheers!

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

#297 Post by fredx181 »

greengeek wrote:Thanks Fred, working well for me - with one exception - the first version allowed me to click youtube-viewer.cde and it would open directly in terminal.
That's on purpose and changed for the better IMO, now you can use the youtube-viewer options as it should be, e.g. (from terminal)

Code: Select all

./youtube-viewer.cde --res=480p
With previous package it just opened a terminal by clicking, which was convenient, but you were not able to add any parameters such as "--res=480p" (set resolution) or "-d" (download only).

Fred

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

#298 Post by fredx181 »

Hi, here's a gtk-youtube-viewer pet for radky's Dpup Stretch 7.5 CE (RC-2)
https://dl.dropboxusercontent.com/s/1e2 ... 1.pet?dl=1

The perl dependencies (modules) are included and also "youtube-dl" (in /usr/local/bin).
Dpup Stretch has mpv and mplayer, but I'd recommend using mpv (mplayer has problems seeking with some resolutions (crashing) )
For gtk-youtube-viewer, go in Preferences and change to mpv, like this:

Code: Select all

video_player_selected               => "mpv",
For youtube-viewer (CLI), run it from terminal:
youtube-viewer --video-player=mpv
(or change to mpv in the config file: ~/.config/youtube-viewer/youtube-viewer.conf)

Fred

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#299 Post by keniv »

Hello Fred,
Thanks for the work you've done to bring this back. I used the old version before it stopped working. Very useful on an old machine. Have just "installed" your new cde package yt-viewer-3.1.5 on the 2016 version of lucid and it's working. I did not know what a "cde package" was so had a look at your link and am now using it as if it was a portable app. Have also tried it on an updated version of racy 55 and it is also working on it. I see from your "read me" that it can be used just to download a video using the command line. Is it possible to do this using the gui? If not when the video is downloaded is it stored somewhere I could save it from before it is played?

Regards,

Ken.

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

#300 Post by fredx181 »

Hi Ken
I see from your "read me" that it can be used just to download a video using the command line. Is it possible to do this using the gui?
Yes, by right-click on an item > "Download selected video".
It will be downloaded by default to cde-root/.

Fred

Post Reply