Skip to content

Repositório de um código que recebe um video e converte para um txt com os frames

Notifications You must be signed in to change notification settings

PedroPampolini/Videoscii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Videoscii - Português

Converte um vídeo em ASCII e salva em um arquivo.txt.

Exemplos

https://www.youtube.com/watch?v=jE7_ZoOF0I4

www.youtube.com/watch?v=rva3E0iga0w

Como usar

Para converter o vídeo em ASCII, crie uma instância da classe VideoToASCII passando como parâmetros o caminho do arquivo de vídeo e o caminho do arquivo de saída .txt:

from VideoToASCII import VideoToASCII

videoFilePath = "exemplo_video.mp4"
outputFilePath = "exemplo_video_ascii.txt"
songFilePath = "exemplo_video_audio.mp3"
v2a = VideoToASCII(videoFilePath, outputFilePath, songFilePath)
v2a.convert()

Após convertido, pode usar a clase playVideo para executar o video criado da seguinte forma:

from VideoToASCII import playVideo

inputFilePath = "exemplo_video_ascii.txt"
songFilePath = "exemplo_video_audio.mp3"
vid = VideoToASCII(intputFilePath, songFilePath)
vid.playVideo()

##Dependências Algumas bibliotecas são necessárias para esse projeto, sendo elas:

  • opencv: pip install opencv-python
  • pygame: pip install pygame
  • moviepy: pip install moviepy
  • numpy: pip install numpy

Videoscii - English

Converts a video to ASCII and saves it in a .txt file.

Examples

https://www.youtube.com/watch?v=jE7_ZoOF0I4

www.youtube.com/watch?v=rva3E0iga0w

How to Use

To convert the video to ASCII, create an instance of the VideoToASCII class by passing the video file path and the output .txt file path as parameters:

from VideoToASCII import VideoToASCII

videoFilePath = "exemplo_video.mp4"
outputFilePath = "exemplo_video_ascii.txt"
songFilePath = "exemplo_video_audio.mp3"
v2a = VideoToASCII(videoFilePath, outputFilePath, songFilePath)
v2a.convert()

Once it's converted, you can use the playVideo class to play the created video as follows:

from VideoToASCII import playVideo

inputFilePath = "exemplo_video_ascii.txt"
songFilePath = "exemplo_video_audio.mp3"
vid = VideoToASCII(intputFilePath, songFilePath)
vid.playVideo()

##Dependencies Some libraries are required for this project, which are:

  • opencv: pip install opencv-python
  • pygame: pip install pygame
  • moviepy: pip install moviepy
  • numpy: pip install numpy

About

Repositório de um código que recebe um video e converte para um txt com os frames

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages