You are not logged in.

#1 2013-07-14 04:51:08

mc33
Member
From: Plano, TX
Registered: 2013-07-12
Posts: 12

Watch YouTube without flash

I wrote this tiny script to make it really easy to watch YT videos without having to rely on Flash. I tried MiniTube; it's nice, but this method seems to take less CPU during playback.

Packages needed:
xclip
mplayer
youtube-dl

#!/bin/bash

URL=$(xclip -o)

mplayer -geometry 100%:100% -xy 500 -ontop -cache-min 2 -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -gf 18/34 --cookies /tmp/cookie.txt "$URL")

I saved the code as ytplay.sh, then I added a program launcher in my xfce panel with the command:

bash ytplay.sh

.

Now, to play a video, I go to a YouTube page in my Flash-disabled browser, I highlight the URL with my mouse and then click the program launcher in panel. The video will show up in the bottom-right corner of the screen. You can change -xy 500 in the script to -xy <whatever pixel size you want the video window to be>.

Offline

#2 2013-07-14 06:05:25

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: Watch YouTube without flash

You can also use mpv, MPlayer/mplayer2 fork, like this:

mpv <youtube_url>

But, as said here, that is not allowed on this forum and it'll likely be moderated.

Offline

#3 2013-07-14 08:05:18

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Watch YouTube without flash

This is weird and I'm glad that this discussion did not catch my attention when it was fresh. Youtube's TOS is not a law. MIcrosoft's TOS is violated, every time you install the VC runtime in wine and nobody cares. This was one post of a mod inside a thread. There have been so and so many threads about youtube players and youtube downloaders and nobody said a word and there will be countless more threads about this. Unless this has either been discussed and solved in a thread or decided by the crew consisting of mods and admins and brought to us as a statement, this is nothing more but the insecurity of a single mod about a certain legal question. Now the insecurity has been extended to us, great, thanks. Now we have a technical topic we don't know how to handle in the "public eye" of the Arch bbs.

@ewaller: If you come across this post, please solve this.

Offline

#4 2013-07-14 08:56:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Watch YouTube without flash

There is nothing to "solve", as ewaller intimated in the linked thread a couple of posts later.

The tools described in this thread, and the other one, are not in themselves at issue. The Forum Etiquette entry is quite clear:

Therefore, do not post discussions about or link to criminal solicitation in any form. This includes, but is not limited to information or links to facilitate illegal drug use, theft, network intrusion, creation of code for malignant purposes, prohibited software copying, prohibited use of copyrighted/patented material...

Posts that encourage the prohibited use of copyright/patented material will be removed. This script, like P2P applications, is content-agnostic. The expectation clearly established in our rules is that discussion here will be around appropriate use of content.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-07-14 17:01:09

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Watch YouTube without flash

Thanks for the clarification.

Offline

#6 2013-07-14 20:08:57

ObliviousGmn
Member
Registered: 2011-09-14
Posts: 49
Website

Re: Watch YouTube without flash

You could also use Youtube-viewer, I've been using it for more than a year now.

I even have luakit to launch it when I enter a Youtube URL.

Offline

#7 2013-07-14 20:12:33

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Watch YouTube without flash

There is also something called smtube in [community] which is think is quite nice.  It is meant to be an extension of smplayer, but can be used stand alone with just mplayer or mplayer2 as a back end.  I too am not much of a minitube fan, so I was kind of surprised at how nice smtube is.  I think ultimately, it achieves the same thing as the OP's script (albeit with the slight overhead of the GUI).

Offline

#8 2013-07-17 21:06:22

GermainZ
Member
Registered: 2013-05-08
Posts: 11

Re: Watch YouTube without flash

I personally use quvi with Pentadactyl to open the current tab's video (should work on websites other than youtube, although I've never tried) in my video player:

nmap <S-q> -s -js <<EOF
commands.execute('!quvi "' + content.location.href.replace(/([$`"\\])/g, "\\$1")
                           + '" &> /dev/null &');
EOF

(this is taken from Earnestly's config)

Offline

Board footer

Powered by FluxBB