Code Monkey home page Code Monkey logo

snatch_slides's Introduction

snatch_slides

This script automates the tiring process skipping through the lecture and taking a screenshot everytime a new slide appears. If a slide is 'new' is determined by simple image processing: Save preceding slide, take a new screenshot, subtract the images pixelwise. Then sum all the absolute values of these differences and compare them to a threshold. The more different the images are, the bigger the sum will be. For the set resolution and style of slides, 1.000.000 seems to work as a threshold. [Save two previous slides if there is a lot of skipping back and forth in your lecture.]

By default, this script will work for Panopto player, but one should be able to use it with any sort of player as long as the CSS IDs for the buttons (play, mute, ...) are set correctly in the beginning.

How to use:

  1. Install Python 3
  2. Install all required packages via PIP
  3. Download chromedriver corresponding to chrome version and set path for chromedriver
  4. Set CSS IDs if not using Panopto
  5. Set link to video of lecture

Troubleshooting: If screenshots don't fully capture what's shown on screen:

  • Einstellungen > System > Anzeige > Skalierung und Anordnung: Groesse von Text und ...: 100% instead of 125%

Do not touch the browser window after the first screenshot is taken. Screenshots need the have the same resolution to be comparable. Change resolution in Browser constructor.

  • ValueError: operands could not be broadcast together with shapes (502,892) (880,1564)

snatch_slides's People

Contributors

schauerstoff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.