Skip to content

Instantly share code, notes, and snippets.

View lukasz-madon's full-sized avatar

Lukasz lukasz-madon

View GitHub Profile
I wanna write a small tool that will swap music from my youtube video. Currently it's binary
if override_audio:
o_cmd = ["ffmpeg", "-i", music_url, "-i", video_url, "-codec", "copy",
"-y", "-shortest", output_video]
logger.info(o_cmd)
code = sp.call(o_cmd)
else:
cmd = ["ffmpeg", "-i", music_url, "-i", video_url, "-filter_complex",
"amix=duration=shortest", "-vcodec", "copy", "-y", "-shortest",
output_video]
# given list [2, 3, 5, 78]
# return 1, 4, 6-77, 79-99
# the range is always <1, 100)
def get_ranges(lst, N=100):
s = set(lst)
filtered = (i for i in xrange(1, N) if not i in s)
output2 = []
prev = None
skipping = False
for num in filtered:
(function() {
window.S3Upload = (function() {
S3Upload.prototype.s3_object_name = 'default_name';
S3Upload.prototype.s3_sign_put_url = '/signS3put';
S3Upload.prototype.file_dom_selector = 'file_upload';