Initial development. Not yet ready to use!

This commit is contained in:
janis
2022-09-04 17:54:26 +02:00
parent cfc3a0f361
commit 9ac016188d
12 changed files with 283 additions and 0 deletions

17
dev/get_metadata.py Normal file
View File

@@ -0,0 +1,17 @@
import ffmpeg
class MetaDataParser:
def __init__(self):
pass
def get_metadata(self, filepath):
return ffmpeg.probe(str(filepath))["streams"]
videometa = MetaDataParser().get_metadata("/mnt/storage/SORTED/Videos/OBS_Rec/Behalten/2019-12-19 18-21-36.mp4").pop(0)
duration = videometa.get("duration")
frames = videometa.get("nb_frames")
framerate = float(frames) / float(duration)
print(framerate)
print(videometa)