Skip to content

Instantly share code, notes, and snippets.

@billyshambrook
Created November 13, 2013 17:39
Show Gist options
  • Save billyshambrook/7453136 to your computer and use it in GitHub Desktop.
Save billyshambrook/7453136 to your computer and use it in GitHub Desktop.
Parse FFMPEG detect interlacing filter output in python
import re
pattern = "\\[(.*)] Multi (.+):(.+):(?P\\w+) (.+):(?P\\w+) (.+):(?P\\w+) (.+):(?P\\w+)"
match = re.search(pattern, output)
scan = dict((k, int(v)) for k, v in match.groupdict().iteritems())
scan = max(scan, key=scan.get)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment