Students deserve access to course materials, even after completing a course. At Carnegie Mellon, many lecture videos are recorded and made available online on Panopto. There is no easy user-interface to download course videos, but there is a feature where folders of recorded videos generate RSS feeds.
This script parses Panopto RSS feeds and extracts video URLs for batch downloading. In general, this project is designed to make it as easy as possible to download Panopto videos and lectures.
-
To use the script, clone the repository or download
panopto-video-urls.py
, and go into thepanopto-download
directory.git clone https://github.com/jstrieb/panopto-download.git && cd panopto-download
-
Make sure Python 3 is running (check by running
python --version
or locating apython3
binary). Also make sure therequests
library is installed -- it may have been installed by another package. To install it (particularly if seeing aModuleNotFoundError
), run the following.python3 -m pip install -r requirements.txt
Additionally, if on a system with limited permissions, instead run the following command. This only installs the dependencies for the local user, rather than system-wide. In particular, if running the script on the Andrew servers, students can only install locally since their accounts lack
sudo
permissions.python3 -m pip install --user -r requirements.txt
-
Test that the command works. When run, there should be output (somewhat) like the following.
$ python3 panopto-video-urls.py usage: panopto-video-urls.py [-h] [-o OUTPUT_FILE] [-x] podcast_url panopto-video-urls.py: error: the following arguments are required: podcast_url
-
Get a Panopto RSS URL. For more information on how to do this, see the next section.
-
Now, use the script to generate a list of video URLs to download. This can be saved into a file using the
-o
option, or it can be piped directly intoxargs
if on a system where it is installed. The latter is my preferred option. To download all videos from an RSS link, I do the following.python3 panopto-video-urls.py -x "http://<some link>" | xargs -L 2 -P 8 curl -q -L
The
-L 2
option toxargs
specifies that it should read two consecutive lines as arguments to each command that is run (run with-L 3
if using cookies), and the-P 8
option specifies how many processes to run at once. Using0
for the number of processes denotes using as many as possible, but8
has greater cross-platform compatibility, and is thus used instead.The
-L
option tocurl
specifies thatcurl
should follow redirects until it gets to the video, and is different from the-L
option passed toxargs
. The-q
option tellscurl
not to print a progress bar for each process.
Panopto automatically generates RSS feeds for folders of videos. The links to these feeds are what is used as input for the script.
-
To get a course or folder's RSS link, first navigate to its folder. One way to do this is by using the "Shared With Me" link on the left side of the page.
-
When looking at a list of videos, click the name of the folder ("Location") on the right to navigate to that folder.
-
Finally, in the top-right corner, there is an RSS button. Click that, and right click on "Subscribe to RSS" to copy the RSS link.