Last active
November 29, 2015 19:20
-
-
Save dajo/9f55571be05a84e92719 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import os | |
import re | |
if len(sys.argv) > 1: | |
USER = sys.argv[1] | |
else: | |
print "usage: python video_check.py [filename]" | |
sys.exit(0) | |
t = os.popen('ffmpeg -err_detect buffer -i "%s" -f null - 2>&1' % sys.argv[1]).read() | |
t = re.sub(r"frame=.+?\r", "", t) | |
t = re.sub(r"\[null.*\r", "", t) | |
# t = re.sub(r"\[(.+?) @ 0x.+?\]", "[\\1]", t) | |
print t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment