Answer the question
In order to leave comments, you need to log in
How to find out the length of an mp4 file?
There is an mp4 video. Need to know the length of this video in seconds
Answer the question
In order to leave comments, you need to log in
In google there are examples of a wagon and a small cart. You can search like this - "python get mp4 duration"
There are many libraries and wrappers for python. One of them is MoviePy. It is of course intended for video editing, but it can also be used to get the length of the video in seconds:
pip install moviepy
from moviepy.editor import VideoFileClip
clip = VideoFileClip("video.mp4")
print(clip.duration)
>>> 153.60
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question