Skip to content

Instantly share code, notes, and snippets.

@dajo
Last active November 29, 2015 19:20
Show Gist options
  • Save dajo/9f55571be05a84e92719 to your computer and use it in GitHub Desktop.
Save dajo/9f55571be05a84e92719 to your computer and use it in GitHub Desktop.
#!/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