Skip to the content.

Download NPTEL Lectures

Going back/forth in NPTEL lecture videos for a course on Youtube can be a nightmare, even with a good internet connection. It only seems ideal to download & view them locally on a decent media player like VLC.

Creating a Youtube playlist yourself (if it doesn’t already exist) is the first logical step. Next, you can use a utility like youtube-dl to download the playlist (given by $Url):

youtube-dl --no-cache-dir --download-archive archive.txt -f "[height<=?720][ext=mp4]" -i -o "%(playlist_index)s - %(title)s.%(ext)s" $Url

As of late, download speeds for Youtube playlists have been abysmal for me, indicating some trickery on part of Youtube peeps.

Thankfully, NPTEL courses often have separately downloadable videos on the course site. For example, this course has a total of 27 videos which takes ~5min to download manually.

(You can use a webscraper as well, but it’s probably an overkill, unless your intention is to hoard the videos instead of watch them like a normal human being. Don’t fret, I’ve been guilty of it too!)

Once, downloaded, you can simply move these to your desired directory:

# Ensure all files are present
((ls '~\Downloads\*.mp4') -match 'Lec').Count # 27
# Move them
move ((ls '~\Downloads\*.mp4') -match 'Lec') .

That does it!