Extract duration of video file without external process in python

大兔子大兔子 提交于 2019-12-11 03:41:57

问题


Is there a way to extract the duration information from a video file's metadata (or maybe calculate the duration some other way) in python without invoking an external process. I've found a number of answers that reference using ffprobe but that isn't an option for me. I need this to be all self contained within the python app.

The file formats I need to process are .mp4, .mov, .mxf and preferably as many other common video file formats as possible.


Edit: I am using python 3.x so unfortunately it appears hachoir-metadata is not an option as it only operates with python 2.7

来源:https://stackoverflow.com/questions/38596983/extract-duration-of-video-file-without-external-process-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!