Created
March 21, 2019 14:19
-
-
Save nevadajames/615e8d5b8f1541bf008918845bce66d6 to your computer and use it in GitHub Desktop.
Check video length python script
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 | |
| from ffprobe import FFProbe | |
| import glob, os | |
| os.chdir("/downloads") | |
| for file in glob.glob("*.avi"): | |
| metadata=FFProbe(file) | |
| for stream in metadata.streams: | |
| if stream.isVideo(): | |
| print("Stream contains "+stream.frames()+" frames.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment