Created
August 19, 2010 05:36
-
-
Save bemasher/537131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
presets = {} | |
preset_list = ["default","fastfirstpass","hq","lossless_fast","lossless_max","lossless_medium","lossless_slow","lossless_slower","lossless_ultrafast","max","normal","slowfirstpass"] | |
for preset_file in preset_list: | |
current = map(lambda x: x.split("="), open(preset_file + ".ffpreset").read().splitlines()) | |
preset_name = preset_file.replace(".ffpreset", "") | |
presets[preset_name] = {} | |
for key, value in current: | |
presets[preset_name][key] = value | |
intersection = set([]) | |
first = 0 | |
for preset in presets.keys(): | |
if first == 0: | |
for key in presets[preset].keys(): | |
intersection.add(key) | |
first += 1 | |
else: | |
intersection &= set(presets[preset].keys()) | |
for preset in presets.keys(): | |
print presets[preset]["cmp"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment