# method1
src_video_path="tmp.mp4"
from moviepy.editor import VideoFileClip
float(VideoFileClip(src_video_path).duration)
# method2
src_video_path="tmp.mp4"
import cv2
v = cv2.VideoCapture(src_video_path)
v.get(7) / v.get(5)
# method1
src_video_path="tmp.mp4"
from moviepy.editor import VideoFileClip
float(VideoFileClip(src_video_path).duration)
# method2
src_video_path="tmp.mp4"
import cv2
v = cv2.VideoCapture(src_video_path)
v.get(7) / v.get(5)
本文标题:2020-01-10 获得视频时长的办法
本文链接:https://www.haomeiwen.com/subject/hcnmactx.html
网友评论