0

I have video file and want to create one csv file which content every frame unix timestamp of video as every row of csv file??

I am using cv2 and moviepy package how can I get it.

import moviepy.editor as mpy

vid = mpy.VideoFileClip('DJI_0002.MOV')
for timestamp, raw_img in vid.iter_frames(with_times=True):
    print(timestamp)

  • Identify the FPS (Frame per Second) of the video, and dump using a simple integer for loop ? – Sawan Dec 09 '19 at 06:39
  • How can I get the Unix Timestamp when video has been shoot? – Milan Soliya Dec 09 '19 at 06:41
  • u can use [this](https://pypi.org/project/enzyme/) or [this](https://pypi.org/project/hachoir-metadata/1.3.3/) or refer [here] (https://stackoverflow.com/questions/51342429/how-to-extract-metadata-of-video-files-using-python-3-7) – Shijith Dec 09 '19 at 07:22
  • Another example to extract the creation date is here - https://stackoverflow.com/questions/21355316/getting-metadata-for-mov-video – Sawan Dec 09 '19 at 07:27
  • @Shijith It is possible to get timestamp in unix format from each frame and save to csv or dataframe?? – Milan Soliya Dec 09 '19 at 07:58

0 Answers0