Friday, January 28, 2011

YouTube true fullscreen video in linux

I got tired to buggy playback with flash player and the inability to play fullsize fullscreen video. Here is a little script designed to improve the quality of life.

What it does is first get the url of the video and then start downloading it. Once it fills the predefined buffer set in the script or the download finishes, it will start playing the video.

If the youtube-dl script from a repository doesn't work try getting it straight from here:

For pure lazyness I also made a desktop icon where I can drag an url and it will automagically start playing the video.

Try it. It's good. :)

Setting up the script in Fedora
sudo su
yum -y install youtube-dl 
wget -O /usr/local/bin/youtube-play
chmod a+x /usr/local/bin/youtube-play

#youtube-player by Sebastian Mäki

if [ $# -eq 0 ]; then
 echo "Usage: $(basename $0) \$URL"
exit 0;

PLAYER_NAMES="gnome-mplayer gmplayer mplayer"

 if which $PLAYER_CANDIDATE > /dev/null; then 

BUFFER=$((1024*1024*2)) #initial buffer size 2MB


URL=$(youtube-dl --cookies=$COOKIES --get-url $1)

wget -q --load-cookies=$COOKIES -O $TMP $URL &

while [ $SIZE -lt $BUFFER ]; do
 if ps -lp $PID > /dev/null; then 
  SIZE=$(stat -c%s $TMP)
 sleep 1;
kill -9 $PID

Youtube-Player.desktop <-- put this shortcut file to your desktop
[Desktop Entry]
Name=Youtube Player
Name[fi_FI]=Youtube Soitin
Name[sv_SE]=Youtube Spelare
Exec=youtube-play %U



Alison Robert said...

Typically, the bonus is given in the form of a small scholarship, about 5 or 10 euros You can use the bonus to wager on any online casino game.

Bob said...

Definitely this was super helpful tips regarding the fullscreen video in Linux. Sometimes for technical problem or old version of flash player may happen display problem. But the script you text on this page was very effective surely. In fact, I was in search of getting some reliable source to buy youtube views. BTW do you think for buying views youtube channel can be suspended? Thanks in advance for your helpful support.

TechMatrite said...

So they tend to answer emails, messages, comments, Tweets, fan mail and even their cell phones. youtube subscribers

Internetmarketingrocks said...

We have other services like followers, likes and comments.
buy targeted youtube views

Internetmarketingrocks said...

We have other services like followers, likes and comments.
buy targeted youtube views

Ytube views said...

Best website to buy YouTube Views is comments.
buy instagram followers real

Cameron Washington said...

Mielestäni sinun pitäisi tehdä siitä video ja lähettää YouTube-kanavallesi. Kanavasi mainostamiseksi Osta Youtube Tilaajat

Andrew said...

What a conducive demonstration! This is really an incredible support for the Linux users to enjoy fullscreen youtube video. The codding effort you dedicated here for your fans and readers will never be praised only with few words. I appreciate your handy coding project. I fact, I was browsing with a view to getting some top notch ideas on how to promote youtube video? And I searched here if I get any related post. Unfortunately, found no post. Can you please bring an update in your future post?

Gabbie Gabbie said...

The particular month-to-month meetings are excellent, they provide me excellent guidance how to improve my opportunity. website designing company

Tip me if you like what you're reading