Showing posts with label YOUTUBE. Show all posts
Showing posts with label YOUTUBE. Show all posts

Saturday, 22 December 2012


Learn how to turn the standard YouTube video player into an audio player and embed it in your website using simple CSS.

How do you embed only the audio portion of a YouTube video in your web pages.
A popular option would be that you extract the audio portion of that YouTube video and then use the Google MP3 player to embed that MP3 fil into your website. This will work but YouTube is very likely to have a problem with your approach.
The other approach could be CSS based where you embed the regular YouTube video player and then use the magic of CSS styles to hide the video inside the embedded player. See demo:

This internally renders the YouTube player using the IFRAME player and should therefore work on both desktop (Flash) and mobile (HTML5) browsers.
Without boring you with the technical details, here’s the little HTML code that turn the YouTube video player into an audio player. Simply replace the youtubeID with the ID of your YouTube video and you are done.
<div style="position:relative;width:267px;height:25px;overflow:hidden;">
  <div style="position:absolute;top:-276px;left:-5px">
    <iframe width="300" height="300" 
      src="https://www.youtube.com/embed/youtubeID?rel=0">
    </iframe>
  </div>
</div>
The YouTube logo inside then player, when clicked, will transport you to the original video hosted on the YouTube website.

You can watch any YouTube video or entire video playlists outside the browser using the VLC Media Player. And the videos will play without the ads.


Do you know that VLC Media Player, the world’s favorite video player that supports nearly every video format, can also play YouTube videos on your desktop without requiring the web browser or the Adobe Flash player.
To get started, open the VLC player, press Ctrl+N to open the Network URL dialog and paste any YouTube video URL in the input box.
YouTube in VLC Media Player

The Benefits of Watching YouTube Videos with VLC

The streaming videos will play inside VLC Media Player just like any other local video file while offering some additional benefits not available inside the standard YouTube player. For instance:
  1. You can choose Video -> Always on Top inside VLC and the YouTube video window will stick to the foreground while you work on other tasks.
  2. Press the Loop button in the player controls and the YouTube video will play non-stop in a loop (also possible with Chrome add-ons).
  3. You can change the Playback speed of the YouTube video and make it run slower or faster than the normal speed.
  4. Use the Tools -> Take Snapshot option to capture a screenshot image of any frame or scene in the YouTube video.
  5. Watch the YouTube videos without the ads. I played a couple of movies and music videos inside VLC and none of them carried any pre-roll ads.

Play YouTube Playlists inside VLC

VLC, by default, only supports single YouTube URLs but it also possible to import an entire YouTube Playlist into VLC and watch all the videos in sequence.
Play YouTube Playlists inside VLC
You can watch an entire playlist of YouTube videos inside VLC Media Player.
Here’s the trick. Right-click and save this file to your desktop. Now open the VLC installation folder (%ProgramFiles%\VideoLAN\VLC) and move the .lua file into the exiting /lua/playlist folder.
Restart the VLC Media Player and choose Media -> Open Network Stream. Now paste the URL of any public YouTube Playlist here and the enjoy the videos.
In addition to YouTube, VLC Player can also play DailyMotion videos outside the browser. It is supposed to work with Vimeo videos as well but that is currently broken possibly due to a change in the URL structure at Vimeo’s end. Thanks