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
#!/home/jack/Desktop/FlaskAppArchitect_Flask_App_Creator/env/bin/python3 | |
from flask import Flask, request, render_template, redirect, url_for, flash, send_from_directory | |
import os | |
import subprocess | |
import random | |
import uuid | |
import shutil | |
from werkzeug.utils import secure_filename | |
import glob | |
import logging |
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
#!/home/jack/Desktop/StoryMaker/env/bin/python | |
from moviepy.editor import * | |
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, Response, flash, request, session,jsonify | |
from flask import send_file, g | |
import os | |
import pygame | |
from gtts import gTTS | |
import cv2 | |
import dlib | |
import numpy as np |
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 flask import Flask, render_template, request | |
import os | |
import numpy as np | |
import cv2 | |
import datetime | |
import matplotlib.pyplot as plt | |
from werkzeug.utils import secure_filename | |
import logging | |
app = Flask(__name__) |
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
#!/bin/bash | |
ffmpeg -framerate 17 -i %05d.jpg -c:v libx265 -r 30 -pix_fmt yuv420p -y start.mp4 | |
ls "$(pwd)/start.mp4" | |
# Print instructions for the user | |
echo "This script will process a video file located in the current directory." | |
echo "Please ensure that the 'start.mp4' file exists in this directory before proceeding." | |
echo "Press ENTER to continue, or CTRL+C to cancel." | |
read |
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
#!/home/jack/Desktop/StoryMaker/env/bin/python | |
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, Response,flash | |
from flask import send_file, make_response,g | |
import os | |
import subprocess | |
import shutil | |
import logging | |
import random | |
from random import randint | |
import glob |
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.editor import AudioFileClip | |
import random | |
from scipy.io import wavfile | |
import uuid | |
import glob | |
import random | |
# Function to find a random song in the Music directory | |
def music(): | |
MUSIC = random.choice(glob.glob("/home/jack/Desktop/HDD500/collections/Music/*.mp3")) | |
return MUSIC |
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.editor import * | |
from moviepy.audio.fx.all import audio_fadein | |
from MUSIC import music | |
# Load video and audio clips | |
video_clip = VideoFileClip("/home/jack/Desktop/StoryMaker/static/images/Elektra-Weapons/Final_End.mp4") | |
audio_clip = AudioFileClip(music()) | |
# Ensure the audio clip is the same duration as the video | |
if audio_clip.duration > video_clip.duration: |
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
import os | |
import random | |
import shutil | |
import uuid | |
from moviepy.editor import VideoFileClip, concatenate_videoclips | |
def get_random_video_clips(dir_path, num_clips=30, clip_duration=1, target_size=(512, 768), default_fps=30): | |
video_files = [] | |
for root, dirs, files in os.walk(dir_path): |
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
import cv2 | |
import numpy as np | |
from moviepy.editor import VideoFileClip | |
from sklearn.cluster import KMeans | |
# Define your own color palette as an array of RGB values | |
palette = np.array([[255, 0, 0], # Red | |
[0, 255, 0], # Green | |
[0, 0, 255], # Blue | |
[255, 255, 0], # Yellow | |
[255, 0, 255], # Magenta |
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
import random | |
import glob | |
import subprocess | |
from PIL import Image | |
from datetime import datetime | |
def tubevid(DIR): | |
image_files = glob.glob(DIR + "*.jpg") | |
random.shuffle(image_files) | |
# Determine the dimensions of the first image |