This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from moviepy.video.io.VideoFileClip import VideoFileClip | |
def cortar_video(input_video_path, output_video_path, start_time, end_time): | |
# Carregar o vídeo | |
video = VideoFileClip(input_video_path) | |
# Cortar o vídeo entre os tempos especificados | |
video_cortado = video.subclip(start_time, end_time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import load_workbook | |
import io | |
import string | |
from PIL import Image | |
class SheetImageLoader: | |
"""Loads all images in a sheet""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://stackoverflow.com/questions/71466930/how-to-get-base64-img-src-and-insert-it-into-input-files | |
function dataURLtoFile(dataurl, filename) { | |
var arr = dataurl.split(','), | |
mime = arr[0].match(/:(.*?);/)[1], | |
bstr = atob(arr[1]), | |
n = bstr.length, | |
u8arr = new Uint8Array(n); | |
while (n--) { | |
u8arr[n] = bstr.charCodeAt(n); |