Play Youtube Videos Directly in Mplayer
By on August 14th, 2009

Mplayer is the default Linux video player, and forms the base for many other player. It is pretty much like the windows Media Player Classic. The only difference here is that, Mplayer is for Linux, so there is an array of hacks and tweaks you can do with Mplayer.

MPlayer

MPlayer

One cool hack is playing Youtbe videos directly into your Mplayer. Yes, you can play youtube videos as live streams directly into Mplayer, without downloading them.

Go to your terminal and type this.

mplayer -fs $(echo "http://youtube.com/get_video.php?$(curl -s $youtube_url | sed -n "/watch_fullscreen/s;.*\(video_id.\+\)&title.*;\1;p")")

Replace the text “youtube_url” with the URL of the video you intend to watch.

This command queries youtube for an flv link to the video. The same command works for VLC as well with the proper switch for initializing from command line.

As simple as that, do let me know if there is any way to do this on Windows Media Player Classic.

Author: Chinmoy Kanjilal Google Profile for Chinmoy Kanjilal
Chinmoy Kanjilal is a FOSS enthusiast and evangelist. He is passionate about Android. Security exploits turn him on and he loves to tinker with computer networks. He rants occasionally at Techarraz.com. You can connect with him on Twitter @ckandroid.

Chinmoy Kanjilal has written and can be contacted at chinmoy@techie-buzz.com.
  • Technitrox

    VLC player also plays youtube videos. to play go to Menu and then open network stream, insert the youtube url and hit play. your video will start playing

  • http://www.techarraz.com Chinmoy

    ya, sure that can be done. I was talking about a command line thing.

 
Copyright 2006-2012 Techie Buzz. All Rights Reserved. Our content may not be reproduced on other websites. Content Delivery by MaxCDN