-2

I need to know the duration of a mp4 file with python 3.3. I search and try to do this with enzyme, atom, but i can't find the way to obtain these.

Thanks for your time.

Allanon
  • 21
  • 1
  • 1
  • 2
  • [How to get video duration in Python or Django?](http://stackoverflow.com/questions/3844430/how-to-get-video-duration-in-python-or-django) might help. – OGHaza Nov 20 '13 at 14:15

1 Answers1

9

A number of previously answered questions deal with this issue:

Community
  • 1
  • 1
mbaytas
  • 2,676
  • 7
  • 26
  • 37
  • Thanks, i don't find these answer before. when i try to use the solution of the first link, y obtain these error: File "C:\Users\garanda\Desktop\py.py", line 28, in getLength('C:/videosFinal/000/Cam01.MP4') File "C:\Users\garanda\Desktop\py.py", line 25, in getLength return [x for x in result.stdout.readlines() if "Duration" in x] File "C:\Users\garanda\Desktop\py.py", line 25, in return [x for x in result.stdout.readlines() if "Duration" in x] TypeError: Type str doesn't support the buffer API – Allanon Nov 20 '13 at 14:41
  • I have to confess that I have not tried the code in those pages myself. I'm sure they will help you if you post your problem as a comment on the related answer. It may help if you be more explicit about your code and [format it so it reads easier](https://help.github.com/articles/github-flavored-markdown). – mbaytas Nov 21 '13 at 08:51