Skip to content

Instantly share code, notes, and snippets.

@D221
D221 / dyn_rotate.py
Last active January 15, 2024 19:40
dynamic video rotation / spin for TikTok etc using ffmpeg+ffprobe
import argparse
import json
import os
import subprocess
IMAGE_DIR = "./images/"
WEBM_DIR = "./mp4/"
TEMP_VIDEO = "./temp.mp4"
SEQUENCE_LIST = "./mylist.txt"
VIDEO_NAME = "./video.mp4"
import socks
import requests
import socket
import time
# example url for testing
url = "https://raw.githubusercontent.com/monosans/proxy-list/main/proxies_geolocation/socks5.txt"
response = requests.get(url) # retrieve data from the url
data = response.content.decode(