commit ea1d421493bb9a49d293ab889bc9cbd78a1e39a0 Author: Jacob Cody Wimer Date: Thu Jan 12 22:51:44 2017 -0500 Initial commit - working on Windows and OSX diff --git a/README.md b/README.md new file mode 100644 index 0000000..819e8fe --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# README + +This project is for compressing video files. I use this to compress wrestling footage. + +How to use: +1. Put your files in the input folder +2. Double click convert-windows.bat +3. Select your resolution and output audio settings +4. Wait..... +5. Your converted files will be put in the output folder and your input files will remain in the input folder \ No newline at end of file diff --git a/convert-windows.bat b/convert-windows.bat new file mode 100644 index 0000000..e2de42e --- /dev/null +++ b/convert-windows.bat @@ -0,0 +1 @@ +python\python-3.5.3rc1-embed-amd64\python.exe ffmpeg-files.py \ No newline at end of file diff --git a/ffmpeg-files.py b/ffmpeg-files.py new file mode 100644 index 0000000..d04c0f2 --- /dev/null +++ b/ffmpeg-files.py @@ -0,0 +1,97 @@ +import os +import sys + +def clearScreen(): + os.system('cls' if os.name == 'nt' else 'clear') + +def convertFilesInImport(): + for filename in os.listdir('input'): + #os.path.splitext(filename)[0] gets ride of file extension + ffmpegcmd = getFfmpegPath() + " -i " + getInputPath() + filename + " -b " + getBitrateSetting() + " -minrate " + getBitrateSetting() + " -maxrate " + getBitrateSetting() + " -bufsize " + getBitrateSetting() + " -vcodec libx264" + getAudioSetting() + " -y " + getOutputPath() + os.path.splitext(filename)[0] + ".mp4" + os.system(ffmpegcmd) + +def getFfmpegPath(): + if(os.name == "nt"): + return "ffmpeg\\windows\\ffmpeg.exe" + elif(sys.platform == "darwin"): + return "ffmpeg/osx/ffmpeg" + else: + returnErrorAndExit("Your os is not supported. Try using Windows or OSX") + +def getOutputPath(): + if(os.name == "nt"): + return "output\\" + else: + return "output/" + +def getInputPath(): + if(os.name == "nt"): + return "input\\" + else: + return "input/" + +def askForResolution(): + inputresolution = "0" + while(inputresolution != "1" and inputresolution != "2" and inputresolution != "3" and inputresolution != "4" and inputresolution != "5" and inputresolution != "6" and inputresolution != "7" and inputresolution != "8"): + clearScreen() + print("Tell me about your source video.") + print("1. 4k at a slow frame rate (24, 25, 30)") + print("2. 1080p at a slow frame rate (24, 25, 30)") + print("3. 720p at a slow frame rate (24, 25, 30)") + print("4. 480p at a slow frame rate (24, 25, 30)") + print("5. 4k at a fast frame rate (48, 50, 60)") + print("6. 1080p at a fast frame rate (48, 50, 60)") + print("7. 720p at a fast frame rate (48, 50, 60)") + print("8. 480p at a fast frame rate (48, 50, 60)") + inputresolution = input("Please enter a number from above: ") + return inputresolution + +def askForAudioOutput(): + audioOutput = "0" + while(audioOutput != "1" and audioOutput != "2" and audioOutput != "3" and audioOutput != "4"): + clearScreen() + print("Tell me what you would like your audio to output as.") + print("1. For no audio") + print("2. For Mono audio") + print("3. For Stereo audio") + print("4. For 5.1 audio") + audioOutput = input("Please enter a number from above: ") + return audioOutput + +def getBitrateSetting(): + if(resolution == "1"): + return "44000k" + elif(resolution == "2"): + return "10000k" + elif(resolution == "3"): + return "6500k" + elif(resolution == "4"): + return "2500k" + elif(resolution == "5"): + return "66000k" + elif(resolution == "6"): + return "15000k" + elif(resolution == "7"): + return "9500k" + elif(resolution == "8"): + return "4000k" + +def getAudioSetting(): + if(audio == "1"): + return " -an" + elif(audio == "2"): + return " -ab 128k" + elif(audio == "3"): + return " -ab 384k" + elif(audio == "4"): + return " -ab 512k" + + +def returnErrorAndExit(message): + input(message) + sys.exit() + +#Run Program +resolution = askForResolution() +audio = askForAudioOutput() +convertFilesInImport() \ No newline at end of file diff --git a/ffmpeg/.DS_Store b/ffmpeg/.DS_Store new file mode 100644 index 0000000..e999e0f Binary files /dev/null and b/ffmpeg/.DS_Store differ diff --git a/ffmpeg/._.DS_Store b/ffmpeg/._.DS_Store new file mode 100644 index 0000000..94a48a8 Binary files /dev/null and b/ffmpeg/._.DS_Store differ diff --git a/ffmpeg/osx/._ffmpeg b/ffmpeg/osx/._ffmpeg new file mode 100644 index 0000000..3e3a851 Binary files /dev/null and b/ffmpeg/osx/._ffmpeg differ diff --git a/ffmpeg/osx/ffmpeg b/ffmpeg/osx/ffmpeg new file mode 100644 index 0000000..cbcb5c3 Binary files /dev/null and b/ffmpeg/osx/ffmpeg differ diff --git a/ffmpeg/windows/ffmpeg.exe b/ffmpeg/windows/ffmpeg.exe new file mode 100644 index 0000000..319ce50 Binary files /dev/null and b/ffmpeg/windows/ffmpeg.exe differ diff --git a/python/python-3.5.3rc1-embed-amd64/_bz2.pyd b/python/python-3.5.3rc1-embed-amd64/_bz2.pyd new file mode 100644 index 0000000..00ce517 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_bz2.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_ctypes.pyd b/python/python-3.5.3rc1-embed-amd64/_ctypes.pyd new file mode 100644 index 0000000..0b42280 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_ctypes.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_decimal.pyd b/python/python-3.5.3rc1-embed-amd64/_decimal.pyd new file mode 100644 index 0000000..a0601f6 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_decimal.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_elementtree.pyd b/python/python-3.5.3rc1-embed-amd64/_elementtree.pyd new file mode 100644 index 0000000..28ea10d Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_elementtree.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_hashlib.pyd b/python/python-3.5.3rc1-embed-amd64/_hashlib.pyd new file mode 100644 index 0000000..0146aec Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_hashlib.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_lzma.pyd b/python/python-3.5.3rc1-embed-amd64/_lzma.pyd new file mode 100644 index 0000000..595ae5c Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_lzma.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_msi.pyd b/python/python-3.5.3rc1-embed-amd64/_msi.pyd new file mode 100644 index 0000000..4f98f0d Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_msi.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_multiprocessing.pyd b/python/python-3.5.3rc1-embed-amd64/_multiprocessing.pyd new file mode 100644 index 0000000..a2a4372 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_multiprocessing.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_overlapped.pyd b/python/python-3.5.3rc1-embed-amd64/_overlapped.pyd new file mode 100644 index 0000000..5304731 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_overlapped.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_socket.pyd b/python/python-3.5.3rc1-embed-amd64/_socket.pyd new file mode 100644 index 0000000..149ff75 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_socket.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_sqlite3.pyd b/python/python-3.5.3rc1-embed-amd64/_sqlite3.pyd new file mode 100644 index 0000000..8dabcc3 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_sqlite3.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/_ssl.pyd b/python/python-3.5.3rc1-embed-amd64/_ssl.pyd new file mode 100644 index 0000000..d378483 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/_ssl.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/pyexpat.pyd b/python/python-3.5.3rc1-embed-amd64/pyexpat.pyd new file mode 100644 index 0000000..f9b6f73 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/pyexpat.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/pyshellext.dll b/python/python-3.5.3rc1-embed-amd64/pyshellext.dll new file mode 100644 index 0000000..4250476 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/pyshellext.dll differ diff --git a/python/python-3.5.3rc1-embed-amd64/python.exe b/python/python-3.5.3rc1-embed-amd64/python.exe new file mode 100644 index 0000000..1e888f8 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/python.exe differ diff --git a/python/python-3.5.3rc1-embed-amd64/python3.dll b/python/python-3.5.3rc1-embed-amd64/python3.dll new file mode 100644 index 0000000..9c7cc27 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/python3.dll differ diff --git a/python/python-3.5.3rc1-embed-amd64/python35.dll b/python/python-3.5.3rc1-embed-amd64/python35.dll new file mode 100644 index 0000000..e20019b Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/python35.dll differ diff --git a/python/python-3.5.3rc1-embed-amd64/python35.zip b/python/python-3.5.3rc1-embed-amd64/python35.zip new file mode 100644 index 0000000..15a59ec Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/python35.zip differ diff --git a/python/python-3.5.3rc1-embed-amd64/pythonw.exe b/python/python-3.5.3rc1-embed-amd64/pythonw.exe new file mode 100644 index 0000000..f4f974a Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/pythonw.exe differ diff --git a/python/python-3.5.3rc1-embed-amd64/pyvenv.cfg b/python/python-3.5.3rc1-embed-amd64/pyvenv.cfg new file mode 100644 index 0000000..28e4ef0 --- /dev/null +++ b/python/python-3.5.3rc1-embed-amd64/pyvenv.cfg @@ -0,0 +1 @@ +applocal = true diff --git a/python/python-3.5.3rc1-embed-amd64/select.pyd b/python/python-3.5.3rc1-embed-amd64/select.pyd new file mode 100644 index 0000000..bb28dc7 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/select.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/sqlite3.dll b/python/python-3.5.3rc1-embed-amd64/sqlite3.dll new file mode 100644 index 0000000..5414371 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/sqlite3.dll differ diff --git a/python/python-3.5.3rc1-embed-amd64/unicodedata.pyd b/python/python-3.5.3rc1-embed-amd64/unicodedata.pyd new file mode 100644 index 0000000..2ed1c8e Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/unicodedata.pyd differ diff --git a/python/python-3.5.3rc1-embed-amd64/vcruntime140.dll b/python/python-3.5.3rc1-embed-amd64/vcruntime140.dll new file mode 100644 index 0000000..52fe06b Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/vcruntime140.dll differ diff --git a/python/python-3.5.3rc1-embed-amd64/winsound.pyd b/python/python-3.5.3rc1-embed-amd64/winsound.pyd new file mode 100644 index 0000000..1a62506 Binary files /dev/null and b/python/python-3.5.3rc1-embed-amd64/winsound.pyd differ