0

I'm working on a project and I need to read and parse video metadata.(duration, date created,title,bit rate , ...) as far as I know there isn't any good package for Python 3.X for this issue.

1 -- I found these :

enzyme

hachoir-metadata

but they are designed for python 2.X

2 -- I also know how to use ffmpeg and other libraries that process video files. but they are so slow, I want to simply read the metadata from the windows file.

3 -- I tried to use exifread package to read video metadata , but as far as I found out , it doesn't work on video files.

4 -- there was this question that asked for a way to retrieve only length of videos, but it is unanswered.

I'm looking for this:

file = open(path_to_video_file)
props = python_video_info_parser.get_info(file)
print(props)

platform:

python 3.4 windows 10

1

1 Answer 1

0

I hope you found what you are looking for. :)

But if you did not or others are wondering.. I am researching the same sunject and I may have found a solution.

What I have found so far is a command-line tool called exiftool. If you download this software and use the command line feature you are able to run these commands with the subprocess module.

There is support for a lot of file formats, as shown in the documentation.

I will update this post as soon as I have found a working soltuion. :)

You can download the tool here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.