Skip to content

Instantly share code, notes, and snippets.

View russellaugust's full-sized avatar

Russell August Anderson russellaugust

View GitHub Profile
'''
evenly distributes n amount of numbers between x and y.
x and y are included in n's total
'''
def evenly_distribute(start, end, n):
step = (end - start) / (n - 1)
frames = [start + step * i for i in range(n)]
return (frames)
@russellaugust
russellaugust / PlexVideoSnippets.py
Last active December 18, 2017 14:25
Script that will grab a one minute clip from the current playhead of Plex. The idea is if you're watching Plex and see something funny/awesome/weird, you can click a button and grab that moment.
# Meant to allow you to grab and save 1 minute videos at any given moment while watching something on Plex.
# This also saves it to Dropbox. It needs to be run locally.
# This has a few dependencies. Needs moviepy, ffmpeg, anddddddd I think that's it.
import os
import urllib
import urllib2
import xml.etree.ElementTree as etree
from moviepy.editor import *