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
video streaming userbot (vsu) based on pytgcalls for streaming video trought the telegram video chat group.

VIDEO STREAM USERBOT ✨ an another telegram userbot for streaming video trought the telegram video chat. Environmental Variables 📌 API_ID : Get this v

levina 6 Oct 17, 2021
TkVideoplayer - This is a simple library to play video files in tkinter.

TkVideoplayer - This is a simple library to play video files in tkinter.

Art/Paul 38 Dec 23, 2022
Video-to-GIF-Converter - A small code snippet that can be used to convert any video to a gif

Video to GIF Converter Project Description: This is a small code snippet that ca

Hassan Shahzad 3 Jun 22, 2022
Video Editor for Linux

Project on break until late March. NEW RELEASE 2.8 IS OUT NOW. INSTALLING: see here. RELEASE NOTES AVAILABLE here. Introduction Features Releases Inst

1.9k Jan 07, 2023
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
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
Rembg Video Virtual Green Screen Edition

Rembg Virtual Greenscreen Edition is a tool to create a green screen matte for videos

Tim Scarfe 217 Jan 06, 2023
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
Simple VLC-based media player that can play multiple videos at the same time

Screenshots About Simple VLC-based media player that can play multiple videos at the same time. You can play as many videos as you like, the only limi

161 Jan 05, 2023
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
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
Add the dislike count back to my YouTube videos via a comment containing that information.

YouTube Dislikes Forrest Knight Python Version 3.0+ Only use if you know what the code actually does. I'm not responsible for your use of this code in

Forrest Knight 155 Dec 19, 2022
Source files for the data lake demo video using the AWS TICKIT database

Data Lake Demo Source code for video demonstration detailed in the post, Building a Simple Data Lake on AWS . Build a simple data lake on AWS using a

Gary A. Stafford 97 Dec 23, 2022
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
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
A Python extension that provides bindings to WebRTC M92

This project follows the W3C specification with some modifications and additions to make it work better with Python applications, with useful APIs like programmatic audio and video.

Il'ya 104 Dec 26, 2022
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
This is an example of building a video Question-Answer system using Jina.

example-video-search This is an example of building a video Question-Answer system using Jina. The index data is subtitle files of YouTube videos. Aft

Jina AI 9 Oct 18, 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
Automagically synchronize subtitles with video.

FFsubsync Language-agnostic automatic synchronization of subtitles with video, so that subtitles are aligned to the correct starting point within the

Stephen Macke 5.7k Jan 06, 2023