How to fetch both live video frame and timestamp from ffmpeg to python on Windows

后端 未结 3 1637
一生所求
一生所求 2020-12-30 13:29

Searching for an alternative as OpenCV would not provide timestamps for live camera stream (on Windows), which are required in my computer vision a

3条回答
  •  醉话见心
    2020-12-30 13:57

    You can use MoviePy:

    import moviepy.editor as mpy
    
    vid = mpy.VideoFileClip('e:\\sample.wmv')
    for timestamp, raw_img in vid.iter_frames(with_times=True):
        # do stuff
    

提交回复
热议问题