SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-04-24 17:51:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Watching Youtube without flash

This isn't really a HOWTO, just a few ideas gathered here and there that might be useful, mixed in with some questions and a request for others to add any of their own discoveries.

The need to Do Something about Youtube came up in the #! Global Sounds thread. I found myself opening Youtube links in new tabs one after the other, clicking the Flashblock icon and slowly watching the computer grind to a halt. It's only got 500MB of RAM and a Pentium4 CPU.

NB this isn't about downloading videos, that's a separate issue. Here it's just for watching/listening without tying up all your machine's resources.

*) One possibility is Minitube. This isn't bad at all, but for running through a thread full of Youtube links it would be nice to be able to enqueue links. (Does anyone know a way?) Also. while Minitube is definitely light on CPU, it does take up some RAM and seems to mysteriously slow things down anyway. (Could that be an X issue?)

*) Mplayer will play flash .flv files, but you can't just give it a Youtube URL, you need the URL of the flv file. One way of getting it is to use the youtube-dl.py script. 'youtube-dl.py -g' will get the url for you without downloading, and you can then pass the url to mplayer to watch it. Like this:

mplayer $(youtube-dl -g "$URL") # URL is the youtube link

Now, I have read that you might need cookies to share Youtube urls between apps like this, but that code has been working OK for me. You can add a shared cookie file like this

mplayer -cookies -cookies-file $HOME/tmp/ytcookie.txt $(youtube-dl -g --cookies $HOME/tmp/ytcookie.txt "$URL")

but, not having needed it yet, I haven't tried it. Anyway, you can make a little wrapper script for mplayer, and use the Firefox Open With addon to add it to the right-click menu for links. This works pretty well, except that I haven't found an easy way to queue up videos and watch several at once.

*) Here Umplayer comes in. It's a fork of smplayer and looks like quite a nice front-end for mplayer. Like Minitube, it has a youtube search function, but you can't give it a Youtube page url directly. However, if you use the youtube-dl code above it's fine, and the -add-to-playlist option lets you build up a list of videos. The latest version on their site for Linux (binaries and source code) is 0.95, which has issues with Youtube, but you can get debs of 0.97 here. (Get the Dropbox zip file at the bottom. Squeeze needs the mcr85 versions.) That, ie umplayer+youtube-dl+OpenWith, is what I'm currently using, and it seems to be working nicely smile

umplayer -add-to-playlist $(youtube-dl -g $URL)

*) There's a package called rtmpdump, and a related flvstreamer (which sounds like exactly what we want), which can deal with Adobe encrypted/protected media - I think Minitube uses one of them, and youtube-dl can. A script directly calling rtmpdump or flvstreamer might be good, but I've totally failed so far to get to grips with it.

Last edited by johnraff (2012-04-25 12:24:46)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Be excellent to each other!

#2 2012-04-24 18:56:31

Bonster
New Member
Registered: 2011-10-05
Posts: 4

Re: Watching Youtube without flash

You can also use youtube-viewer (https://github.com/trizen/youtube-viewer)
It can do pretty much everything youtube from the command line.
Search, watch with mplayer, download and even read/post comments

Offline

#3 2012-04-24 20:31:42

saneks
#! Die Hard
Registered: 2009-10-01
Posts: 1,020

Re: Watching Youtube without flash

this a very nice thread. thanks for the info! *bookmarked*


eee701 user & other lap/desktops

Offline

#4 2012-04-24 22:53:27

Vansgo
#! Die Hard
Registered: 2011-05-02
Posts: 1,580
Website

Re: Watching Youtube without flash

Totem player reportedly works with YouTube videos - I have not tested that feature.

Offline

#5 2012-04-24 22:57:01

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Watching Youtube without flash

Vansgo wrote:

Totem player reportedly works with YouTube videos - I have not tested that feature.

Yeah, but every time Google makes changes to the Youtube API, Totem breaks.
I use the HTML5 interface for You tube, it works great with intel GPUs.

Offline

#6 2012-04-25 10:23:43

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

^ i think i signed up for the HTML5-thing but never really noticed it. i think it isn't on many videos. not sure.

anyway, my Flash sucks, is glitchy and crashes and stuff. so thanks a lot for the write-up johnraff. i had that mplayer+youtube-dl thing figured out, but hadn't thought of OpenWith etc. very nice.

Offline

#7 2012-04-25 12:45:18

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Watching Youtube without flash

@Bonster that youtube viewer also looks very interesting smile
Masses of options and seems to be in active development right now, so ought to keep up with Youtube's changes for a while.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#8 2012-04-25 16:11:48

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Watching Youtube without flash

...in fact it's quite impressive. How about this for a private radio station, sort of like LastFM without all the frills:

youtube-viewer --novideo --all cape verde music

Using hardly any CPU or RAM. cool

When you first use youtube-viewer it asks you to install XML::Fast but tells you the cpan command to use, and if you just say "yes" it does everything for you no problem. And it is fast too.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#9 2012-04-25 17:19:40

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

^ indeed, using it too now, simply amazing. thanks Bonster!

Offline

#10 2012-04-25 17:28:56

Vansgo
#! Die Hard
Registered: 2011-05-02
Posts: 1,580
Website

Re: Watching Youtube without flash

So, now..... we can all ? keep rolling with Ytube features related to conversation and music with these work arounds - I hope to see more vposts by all lol

Offline

#11 2012-04-27 02:06:59

shengchieh
#! Die Hard
Registered: 2009-01-07
Posts: 617

Re: Watching Youtube without flash

You shouldn't need to avoid youtube to avoid flash.  Signup for html5 experimental youtube at

http://www.youtube.com/html5

Warning: not all youtube video works as html5.   Also the slow motion/fast motion feature doesn't
seem to work (at least for me - so if you get it going, please post).  [While running the videos, click
"normal" and change the speed.]

Sheng-Chieh

Offline

#12 2012-04-27 08:56:34

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

^ i did that, but as you are saying, not all youtube-videos can use html5. so at the moment it really isn't very useful yet, imo. youtube-viewer is awesome, and it is CLI, extra points for not making me open a browser just to use youtube smile

Offline

#13 2012-04-27 09:03:51

Awebb
The Singularity
Registered: 2009-07-23
Posts: 2,812

Re: Watching Youtube without flash

The HTML5 trial is quite good. Say, one out of 20 videos I want to see is not available in HTML5. I can live with that. I'm more concerned about other... sites...

Although I hate Java to the guts, I simply have a JDownloader running all day, fetching the videos I want.


I'm so meta, even this acronym

Offline

#14 2012-04-27 17:28:00

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Watching Youtube without flash

Awebb wrote:

Although I hate Java to the guts, I simply have a JDownloader running all day, fetching the videos I want.

Me too.

Offline

#15 2012-06-07 16:34:03

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

ok, question.
i got youtube-viewer. i used to have it working so i could just type 'yt' everywhere and youtube-viewer would start. but then i upgraded to Sid, messed up my system and had to reinstall. now i cannot figure out how to get this thing to work anymore. it works fine in its own directory, but it seems perl is not looking for it inside the path or something? anyone got any pointers?

Offline

#16 2012-06-07 19:31:06

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

Re: Watching Youtube without flash


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#17 2012-06-07 20:33:22

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

^ relevant for the entire thread or my question in particular?

Offline

#18 2012-06-08 01:17:17

smoki
#! Junkie
Registered: 2012-02-09
Posts: 256

Re: Watching Youtube without flash

@rhowaldt
You need libxml-fast-perl perl module, it is not available in debian as a package:

https://github.com/wsdookadr/libxml-fast-perl

You can rebuild your deb package from there or just do following and you will get it downloaded, compiled and installed:

sudo cpan XML::Fast

/usr/local/lib/perl/5.14.2/XML/Fast.pm
/usr/local/lib/perl/5.14.2/auto/XML/Fast/Fast.so

OK if someone wants it there are rebuilded packages for i386 sid (libxml-fast-perl too):

http://dl.dropbox.com/u/74553632/gtk-yo … 386sid.zip

Last edited by smoki (2012-06-08 02:37:56)

Offline

#19 2012-06-08 05:18:17

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

Re: Watching Youtube without flash

rhowaldt wrote:

^ relevant for the entire thread or my question in particular?

Sorry, relevant to the thread. I should have been more specific.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#20 2012-06-08 08:01:55

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

@smoki: sorry, should've been more specific. youtube-viewer works. but i want to have an alias or script or whatever to start the program from anywhere on my system. and that is not working for me.

Offline

#21 2012-06-08 17:54:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Watching Youtube without flash

@rhowaldt

Two ways you can do this. Forgive me if you know some/most/all of this already, I'm putting it in full in case anyone else needs it...

1) Can you launch the script without cd'ing to its directory if you type in the full path? If you only need the shortcut for your terminal, try putting the full path to the script in your .bash_aliases ie 'alias yt='~/scripts/perl/youtube-viewer.pl' or whatever.

2) If you need the command 'yt' to be available all over the place - Thunar custom actions, gmrun, inside scripts etc, without having to type its full path, then you need it in your $PATH environment variable. Have you got a personal ~/bin directory? If you type 'echo $PATH' does it include ~/bin? For security reasons it should be at the end of the list, not the beginning, so important system commands cannot be overridden. If it's not there, you can add it by editing .profile, adding this:

# set PATH so it includes user's private bin if it exists
if [ -d ${HOME}/bin ] ; then
    PATH="${PATH}":"${HOME}"/bin
fi

Now ~/bin is in your $PATH you can put things there and they will run just like system commands. I like to use symlinks because you can leave your scripts in the best place for them, and the command ('yt' in this case) can be different from the name of the file. Just make a symlink called 'yt' in ~/bin that points to the 'youtube-viewer.pl' script.

Now, I seem to remember another issue about ~/.profile no longer being read in new versions of Debian. This might be what messed you up in the sid upgrade. If so, you can try making a file ~/.xsessionrc with these contents:

if [ -r $HOME/.profile ]; then
    . $HOME/.profile
fi

More here.

Don't know if any of that helps.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#22 2012-06-08 18:22:21

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Watching Youtube without flash

I am on Sid and I have the script in my home folder, works just fine, ~/.yt it is called.
I call it with yt from the CLI, made an alias:

alias yt='~/.yt'

Offline

#23 2012-06-08 19:58:36

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Watching Youtube without flash

@johnraff: thanks for the elaborate explanation. yes, i knew a lot of that already and of course checked a lot of that already. however, i just went through all the steps again, as that is often the best way of finding a problem. turns out, i don't know why it didn't work before. it works now with a simple alias yt="perl /home/rhowaldt/bin/youtube-viewer" in my ~/.bashrc, just as i wanted to do all along.
all i can think of is that this is still the aftermath of the transition of my home-directory after the Sid-upgrade, when all the permissions were messed up and whatnot, and which i have been fixing gradually. in other words, sorry for asking something that was my own damn fault smile

Offline

#24 2012-06-11 16:34:11

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Watching Youtube without flash

@rhowaldt ah, no harm done! smile


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Help fund CrunchBang, donate to the project!

#25 2012-06-13 16:37:20

aeqel
Member
From: Australia
Registered: 2012-06-12
Posts: 25
Website

Re: Watching Youtube without flash

I personally actually use the YouTube website a lot for going through subscriptions of mine that I have when I'm casually browsing so I actually use (and have been for many years) a User Script script called ViewTube.

It allows you to use a HTML5 player or you can even use Totem/VLC if you have the plugin for your browser, download links, etc. It also claims to work on other flash based websites. The only draw back for me is that annotations don't work. sad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo