Skip to content

jstrieb/panopto-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background & Overview

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.

Quick Start

  1. To use the script, clone the repository or download panopto-video-urls.py, and go into the panopto-download directory.

    git clone https://github.com/jstrieb/panopto-download.git && cd panopto-download
    
  2. Make sure Python 3 is running (check by running python --version or locating a python3 binary). Also make sure the requests library is installed -- it may have been installed by another package. To install it (particularly if seeing a ModuleNotFoundError), 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
    
  3. 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
    
  4. Get a Panopto RSS URL. For more information on how to do this, see the next section.

  5. 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 into xargs 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 to xargs 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. Using 0 for the number of processes denotes using as many as possible, but 8 has greater cross-platform compatibility, and is thus used instead.

    The -L option to curl specifies that curl should follow redirects until it gets to the video, and is different from the -L option passed to xargs. The -q option tells curl not to print a progress bar for each process.

Getting Panopto RSS Feed URLs

Panopto automatically generates RSS feeds for folders of videos. The links to these feeds are what is used as input for the script.

  1. 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.

    Step 1

  2. When looking at a list of videos, click the name of the folder ("Location") on the right to navigate to that folder.

    Step 2

  3. 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.

    Step 3

About

Script to facilitate batch downloading of lecture videos from Panopto

Topics

Resources

Stars

Watchers

Forks

Languages