Tuesday 13 March 2018

Saving videos from a web site with VLC

I recently wrote about how to download and save a Brightcove video using the m3u8 format. I’ve since found an even easier method for other sites using other video formats.

It’s as simple as this:

  1. Open VLC and select Open Network Stream from the Media menu.
  2. Paste in the URL of your youtube.com (or similar) URL
  3. Click Play
  4. From the Tools > Codec Information menu, copy the full Location link to your clipboard
  5. Paste the copied location into Chrome and right-click the video/Save As

Depending on video quality, some videos (especially longer ones) may be on the large for your mobile device without additional transcoding.

If you have any problems with VLC complaining about not being able to play the video, you probably need to update VLC or the .lua or .luac file in the VLC install directory. I was experiencing MRL / 403 Forbidden errors until I updated the youtube.lua file.

To update:

  1. Save the text contents of this file as youtube.luac to a temporary location (note the .luac extension, not .lua): https://github.com/videolan/vlc/blob/master/share/lua/playlist/youtube.lua
  2. Replace the original youtube.luac in your VLC install directory (e.g. \VideoLAN\VLC\lua\playlist\ from c:\Program Files or c:\Program Files (x86)
  3. Restart VLC
  4. Update luac files for other sites if necessary