Want to go through lecture videos faster without missing any information? Wish you can read the lecture video instead of watching it? Now you can! With this python app, you can convert lecture videos to PDF files! The PDF file will contain a screenshot of lecture slides presented in the video, along with a transcription of your instructor explaining those lecture slide. It can also handle instructors making annotations on their lecture slides and mild amounts of PowerPoint animations.
- Walkthrough
- Getting Started
- Tweeking the Application
- Next steps
- Usage
- Credits
- License
Users will need to download a video file of their lecture. For instance, the video file might look like this:
Users will also need a copy of the video's subtitles.
After running the command line tool, they will get a PDF that looks like this:
where each page contains an image of the lecture video, and a transcription of the instructor explaining about that slide.
-
Ensure Python3 and Pip is installed on your machine
-
Next, install package dependencies by running:
pip3 install -r requirements.txt
-
Now, run:
python3 -m src.main tests/videos/input_1.mp4 -s tests/subtitles/subtitles_1.vtt -o output.pdf
to generate a PDF of this lecture video with these subtitles
Note: If you don't want subtitles in the pdf, you can use the
-S
flag, like:python3 -m src.main tests/videos/input_1.mp4 -S -o output.pdf
-
The generated PDF will be saved as output.pdf
- Install graphicsmagick, imagemagick, and pdftk on your machine
- To run all unit tests, run
python3 -m unittest discover
- To run a specific unit tests (ex: tests/test_main.py), run
python3 -m unittest tests/test_main.py
Note: Running the tests/test_main.py
takes a while
This application uses computer vision with OpenCV to detect when the instructor has moved on to the next PowerPoint slide, detect animations, etc.
You can adjust the sensitivity to video frame changes in the src/video_segment_finder.py
file. You can also visualize how well the application detect transitions and animations via the src/plot.py
tool.
- Automatically generate subtitles
- Wrap project into a web app?
Please note that this project is used for educational purposes and is not intended to be used commercially. We are not liable for any damages/changes done by this project.
Emilio Kartono, who made the entire project.
The fonts for generating the PDF is from DejaVu fonts
This project is protected under the GNU licence. Please refer to the LICENSE.txt for more information.