In this tutorial, I will explain how we can download NPTEL Video lectures (MP4 / FLV) without going through NPTEL Website. We use GNU/Linux Operating System and ‘wget’ tool for achieving this.
The downloadable NPTEL Video lectures are provided in the following website
1. Store the NPTEL Course ID for Automatic Downloading
For automatic downloading, we need the NPTEL Course ID to be stored in a directory. For example, we want to download the video lectures of ‘Software Engineering’ and ‘Cryptography and Network Security’ from Computer Science and Engineering discipline.
The course ID of ‘Software Engineering’ is (106101061) and ‘Cryptography and Network Security’ is (106105031). Now create directory in the name of the Video courses as below.
[baskar@baskar ~]$ mkdir “Software Engineering”
[baskar@baskar ~]$ mkdir “Cryptography and Network Security”
Now, change to ‘Software Engineering’ directory and save the course ID in the file ‘course.id’
[baskar@baskar ~]$ cd Software\ Engineering/
[baskar@baskar Software Engineering]$ echo 106101061 > course.id
[baskar@baskar Software Engineering]$
Now, the Course ID of ‘Software Engineering’ is stored in a file called ‘course.id’.
2. NPTEL Video Courses Download links
Go to NPTEL website for getting the download link details for the particular course. I have given the link as an example for the above two courses.
Cryptography and Network Security
In NPTEL Phase-I, the files are named as ‘lec’+’lecno’.mp4 and in Phase-II/III, it is named as ‘mod’+’modno’+’lec’+lecno’.mp4
3. Linux Shell Script for Automatic Downloading of NPTEL Video Lectures
courseid=$(sed -e ‘s/.*\(………\)$/\1/’ course.id)
read -e -p “Enter the Module String (ex. m/mod/Mod/Module) : ” -i mod modstring; echo
read -e -p “Enter the Module Number (1 as 01, 9 as 09 and so on) : ” -i 01 modno; echo
read -e -p “Enter the Lecture String (ex. L/Lecture/Lec/lec) : ” -i lec lecstring; echo
read -e -p “Enter the First Lecture of the Module to Download : ” -i 1 lecfirst; echo
read -e -p “Enter the Last Lecture of the Module to Download : ” -i 40 leclast; echo
for i in $(seq -f “%02g” $lecfirst $leclast);
wget -c http://npteldownloads.iitm.ac.in/downloads_mp4/$courseid/$modstring$modno$lecstring$i.mp4
Note: There are 9 dots (.) in the second line which is used to read, extract and store the nine digit course ID from the ‘course.id’ file to the ‘courseid’ variable.
Now, save the above shell script as ‘nptel-download.sh’ and execute from the shell.
[baskar@baskar ~]$bash nptel-download.sh
You should be able to download all the lectures without going through NPTEL website.
In case, if the course does not have any ‘mod’ string in it, then, remove the ‘mod’ string and ‘modno’ string and keep them empty, and proceed with ‘lecstring’, ‘lecfirst’ and ‘leclast’ as inputs.
4. For Automatic Downloading of NPTEL Video Lectures in FLV Format
In the script, just change the ‘wget’ line to
Hope this tutorial would have saved you from several steps and clicks in downloading your favourite NPTEL Video lectures