Skip to content

Instantly share code, notes, and snippets.

@policevideorequests
Created December 25, 2014 07:27
Show Gist options
  • Save policevideorequests/423a719eec36d16ecc9e to your computer and use it in GitHub Desktop.
Save policevideorequests/423a719eec36d16ecc9e to your computer and use it in GitHub Desktop.
#copyright 2014 timothyclemans GPL
#I'm using Windows. You need https://www.ffmpeg.org/download.html#build-windows and https://www.python.org/downloads/release/python-278/
#The directories need to be changed from the folder's on my girlfriend's laptop to those on the machine that will do the processing.
#This is the Python code:
import os
videos = [name for name in os.listdir("C:\Users\Christine\Desktop\over_redact\\") if name.endswith(".mp3")]
for video in videos:
print video
command = 'c:\\ffmpeg\\bin\\ffmpeg -i C:\\Users\\Christine\\Desktop\\over_redact\\%s -crf 18 -preset ultrafast -vf format=gray,format=yuv422p,"boxblur=6:4:cr=2:ar=2" -an C:\\Users\\Christine\\Desktop\\over_redacted\\%s' % (video,video)
print command
os.system(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment