Python program - to extract slides from videos

Overview

O que esse programa faz?

Eu simplesmente não consigo aproveitar aulas online (e nem a maioria das presenciais), portanto estudo com slides e livros. Porém, nem todo professor disponibiliza os slides.

Esse programa recebe um arquivo de vídeo (em formato mp4, até onde testei) e extrai os slides exibidos ali, produzindo um arquivo em pdf que contém todos os slides mostrados no vídeo, sem faltar ou repetir.

Como esse programa funciona?

Você especifica, no cabeçalho, o total de minutos que o vídeo possui, o intervalo mínimo para procura e o nome do arquivo de vídeo.

# ----------------------------- Variáveis ----------------------------  
# Eu quero obter slides dos primeiros ... minutos do vídeo.  
total_minutos = 46  
# Se um slide é mostrado por menos de ... segundos, então ele não é importante.  
# Slides provavelmente não serão mostrados por menos de ... segundos.  
intervalo_segundos = 10  
# O arquivo de vídeo possui o nome ... (formatos testados: mp4)  
arquivo = "aula.mp4"

O programa então irá ler um frame do vídeo a cada intervalo especificado (no caso, 10 segundos) e comparar com o frame lido anteriormente. Se ambos forem bastante semelhantes, então o frame novo é descartado e uma nova leitura é feita, até que um frame diferente o suficiente seja encontrado. Quando isso acontece, ele é adicionado à uma galeria de imagens.

Ao final, as imagens são unidas para formar um arquivo em pdf semelhante à apresentação de slides que provavelmente foi usada no vídeo.

Após cada uso, você precisará apagar as imagens na pasta fotos. Os demais arquivos não precisam ser alterados.

Quais as suas limitações?

No momento, esse é um programa em Python. Ele requer que os usuários tenham algum conhecimento de Python para instalar as dependências necessárias e executá-los. Qualquer um é bem vindo para adaptá-lo em outras linguagens se assim desejar. Eu eventualmente tentarei fazer um executável com ele, ou rodá-lo no Google Colab.

O programa requer que você baixe um arquivo em vídeo, e o coloque no mesmo diretório de execução. Eventualmente, pretendo fazer com que ele baixe um link do YouTube.

O programa não possui garantias de detectar todos os slides, porém ele parte da premissa que slides mostrados por menos tempo do que o configurado (no caso, 10 segundos) não são relevantes. Em meus testes, todos os slides foram exportados.

É bastante provável que o programa não funcione bem em vídeos nos quais o professor aparece com câmera, mas deve ser possível contornar esse problema mudando o limite de detecção (já que agora os slides "mudam" mais do que antes mesmo sem transição). É quase certo que o programa não vai funcionar em vídeos como os da UNIVESP, nos quais os slides aparecem uma televisão.

Por fim, devem haver bugs. Vários bugs. Irei melhorá-lo no futuro, e você pode fazê-lo caso assim quiser.

Owner
Natanael Antonioli
Dono do canal Fábrica de Noobs no Youtube.
Natanael Antonioli
Splat a video into a mosaic by sampling a frame at regular intervals

Splat a video into a mosaic by sampling a frame at regular intervals. Useful for seeing the changes over time of an entire video or movie.

Ryan Fox 4 Oct 16, 2022
A way to run youtube videos in TTY

TTY youtube client its finally here, the one thing literally NO ONE ASKED FOR!! A way to run youtube videos in TTY Dependencies: (pip) yt-search (syst

1 Nov 28, 2021
A Telegram bot to convert videos into x265/x264 format via ffmpeg.

Video Encoder Bot A Telegram bot to convert videos into x265/x264 format via ffmpeg. Configuration Add values in environment variables or add them in

1 Mar 08, 2022
OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality v

OpenShot Studios, LLC 3.1k Jan 01, 2023
Stream anime from kaa.si with python

kaa.si-cli Stream anime using MPV player from kaa.si with python

Muhammad Rovino Sanjaya 52 Dec 24, 2022
Python bindings for FFmpeg - with complex filtering support

ffmpeg-python: Python bindings for FFmpeg Overview There are tons of Python FFmpeg wrappers out there but they seem to lack complex filter support. ff

Karl Kroening 7.7k Jan 03, 2023
Automatically logs into VTOP and can perform certain tasks

VTOP_Login Automatically logs into VTOP and can perform certain tasks To run the

Jatin 1 Jan 30, 2022
Convert lecture videos to slides in one line. Takes an input of a directory containing your lecture videos and outputs a directory containing .PDF files containing the slides of each lecture.

Convert lecture videos to slides in one line. Takes an input of a directory containing your lecture videos and outputs a directory containing .PDF files containing the slides of each lecture.

Sidharth Anand 12 Sep 10, 2022
基于BililiveRecorder 的集群录播客户端

高度自动化的录播服务端! 一、项目介绍 1、介绍 这是NGlive的录播服务器集群的客户端部分实现代码,它可以自动化的进行录制-压制-上传-通知,同时流程高度可自定义,并且可以任意受中心服务器的调度,有一定的错误修复能力。可以保证长期稳定的运行。 2、基本功能 这个客户端集 录制、转码压制、上传为一

NGWORKS 7 Jul 10, 2022
Streams video from raspberry pi to desktop T1 - Recognizes Faces on client T2

VideoStreamingServer Completed: Streams video from raspberry pi to desktop T1 - Recognizes Faces on client T2 In progress: Change the transmission Pro

1 Dec 06, 2021
Your own movie streaming service. Easy to install, easy to use. Download, manage and watch your favorite movies conveniently from your browser or phone. Install it on your server, access it anywhere and enjoy.

Vigilio Your own movie streaming service. Easy to install, easy to use. Download, manage and watch your favorite movies conveniently from your browser

Tugcan Olgun 141 Jan 06, 2023
Repository to create Ascii art in CMD based on video file.

Made to take any file format, and transform it into ascii art, displayed as a video in the cmd. If the cmd formatting is wrong, try zooming a little and remember to make cmd fullscreen. I made my cmd

60 Dec 17, 2022
Video Translation Into Text

2021/12/9 The project has been updated Added a home screen Just drag it onto the screen The final results \ 2021/12/9 项目已更新 添加了主界面 拖到即可 最后结果 \ Using t

10 Mar 12, 2022
A python generator that converts youtube videos to ascii art in your console.

Video To ASCII A python generator that converts youtube videos to ascii art in your console. This has not been tested for windows! Example Normal mode

Julian Jones 24 Nov 02, 2022
Vigia-youtube - The YouTube Watch bot is able to monitor channels on Google's video platform

Vigia do YouTube O bot Vigia do YouTube é capaz de monitorar canais na plataform

Alessandro Feitosa Jr 10 Oct 03, 2022
A simple Python Youtube Wachtime for YTbebot

Simple bot that was development in python 3.7, that automatically watch youtube videos. It can be used to give more views in your channel helping in the spread and increase the followers because your

Rian eka wiratma 1 Dec 05, 2021
Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3

Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3. No Third-party or special firmware required.

1.2k Jan 07, 2023
PyAV is a Pythonic binding for the FFmpeg libraries.

PyAV is a Pythonic binding for the FFmpeg libraries. We aim to provide all of the power and control of the underlying library, but manage the gritty details as much as possible.

PyAV 1.8k Jan 01, 2023
VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python

VIT VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python.

ShellTear 3 Mar 03, 2022
A python youtube search module

A python youtube search module

Fayas Noushad 4 Dec 01, 2021