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
A youtube video link or id to video thumbnail python package.

Youtube-Video-Thumbnail A youtube video link or id to video thumbnail python package. Made with Python3

Fayas Noushad 10 Oct 21, 2022
pygamevideo module helps developer to embed videos into their Pygame display

pygamevideo module helps developer to embed videos into their Pygame display. Audio playback doesn't use pygame.mixer.

Kadir Aksoy 10 Dec 28, 2022
Add filters (background blur, etc) to your webcam on Linux.

Add filters (background blur, etc) to your webcam on Linux.

Jashandeep Sohi 480 Dec 14, 2022
Create a Video Membership app using FastAPI & NoSQL

Video Membership Create a Video Membership app using FastAPI & NoSQL. In this series, we're going to explore building a membership application using F

Coding For Entrepreneurs 69 Dec 25, 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
Adblocker for movie subtitles.

SubAdBlock Adblocker for movie subtitles. Usage Place "main.py" and "config.conf" in directory with subtitles and run "main.py". It will automatically

Marko Živić 1 Jan 09, 2022
Filtering user-generated video content(SberZvukTechDays)Filtering user-generated video content(SberZvukTechDays)

Filtering user-generated video content(SberZvukTechDays) Table of contents General info Team members Technologies Setup Result General info This is a

Roman 6 Apr 06, 2022
Real-time video and audio streams over the network, with Streamlit.

streamlit-webrtc Example You can try out the sample app using the following commands.

Yuichiro Tachibana (Tsuchiya) 648 Jan 01, 2023
All the code in these repos was created and explained by HashLips on the main YouTube channel.

Welcome to HashLips 👄 All the code in these repos was created and explained by HashLips on the main YouTube channel. To find out more please visit: ?

HashLips 6.7k Jan 06, 2023
Ffmpeg videostream - High speed video frame access in Python, using FFmpeg and FFshow

FFmpeg VideoStream High speed video frame access in Python, using FFmpeg and FFshow This script requires: Karl Kroening's 'ffmpeg-python' library. (ht

3 Sep 29, 2022
This will help you study and avoid moving mouse coz u dont need mouse for watching youtube videos

This will help you study and avoid moving mouse coz u dont need mouse for watching youtube videos. Neither u need it for pdfs just use your keyboard

KorryKatti 5 Jan 07, 2022
DICexport is a GUI (PyQt5) to export digital image correlation videos

DIC Video Exporter DICexport is a GUI (PyQt5) to export digital image correlation videos. It offers the flexibility to choose a selected range of a vi

Chaoyi Zhu 0 Jun 23, 2022
A Simple Telegram Bot By @Tellybots to add Subtitle Files in Video

Video-subtitle-merger A Simple Telegram Bot By @Tellybots to add Subtitle Files in Video Features Force Sub Button Added Soon Support Media Type Such

6 Dec 31, 2021
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
Tweet stream in OBS browser source

OBS-Twitter-Stream OBSなどの配信ソフトのブラウザソースで特定のキーワードを含んだツイートを表示します 使い方 使い方については以下のwikiを御覧ください https://github.com/CubeZeero/OBS-Twitter-Stream/wiki ダウンロード W

Cube 23 Dec 18, 2022
Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player

Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player without incurring ingress/egree traffic on EC2 Instance.

Syed Umar Arfeen 8 Mar 28, 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
720p FPGA Media Player (RISC-V + Motion JPEG + SD + HDMI on an Artix 7)

FPGA Media Player This project is a FPGA based media player which is capable of playing Motion JPEG encoded video over HDMI or VGA on commonly availab

179 Dec 02, 2022
Telegram Video Stream

Video Stream An Advanced VC Video Player created for playing video in the voice chats of Telegram Groups And Channel Configs TOKEN - Get bot token fro

mr_lokaman 46 Dec 25, 2022
Extracting frames from video and create video using frames

Extracting frames from video and create video using frames This program uses opencv library to extract the frames from video and create video from ext

1 Nov 19, 2021