Created
November 14, 2020 16:56
-
-
Save zmarffy/f89956bd3ae87c97501066d57f150471 to your computer and use it in GitHub Desktop.
Get the bitrate of an input file
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 re | |
import subprocess | |
import sys | |
print(re.findall(r"(?<=rate: ).+(?=\n)", | |
subprocess.run(["ffmpeg", "-i", sys.argv[1]], stderr=subprocess.PIPE).stderr.decode())[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment