Can I get the frame timestamp data from .MOV format video?

조회 수: 15 (최근 30일)
Andre
Andre 2015년 3월 25일
댓글: Kathryn Liberman 2019년 3월 14일
I have 5 videos which will be recorded simultaneously in different locations. I am trying to find a way how to read the timestamp data on each frame of the videos in order to synchronise them together, since it is not possible to start capturing the videos all at the same time. The video shows the timestamps on the bottom left corner of each frame (see figure below), so I guess that the data can be found somewhere in the video file (maybe in the metadata?).
Apart from using the timestamp data to synchronise the videos together, I will also use the timestamps to set specific time-points along the timeline of the videos. These timepoints will be used to measure the time that a certain procedures takes to be performed. Ultimately this will lead to an assesment of how these said procedures are improved in order to save money.
I tried googling for methods of how to obtain this data using MATLAB but it was all in vain.
Thanks in advance for your help!
  댓글 수: 2
Thomas Keady
Thomas Keady 2018년 2월 27일
I have the same question. Were you able to find a solution?
Andre
Andre 2018년 2월 27일
Hi Thomas,
I did not manage to get access to the time-stamp data - it seems to be just hard-coded on each frame and it is not referenced anywhere else in the .mov file. I worked my way around it by synchronising the videos manually (using the time-stamp - visually) and then I cropped the videos according to the manual synchronisation of the 5 videos.
I hope this helps.
Regards, Andre

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 2월 27일
You could use VideoReader and after each frame you can access the time property. However this will only get you time relative to the beginning of the movie file. MATLAB calls out to external libraries to do the movie decoding. Mostly that ends up invoking operating system provided media routines.
  댓글 수: 4
Walter Roberson
Walter Roberson 2019년 3월 13일
%% to obtain timestamp for each frame in lice video for timeseries
for i=5:5 %specify video numbers to process, change as necessary
FileBase = ['/Volumes/SeaLiceBackup/5Dec18collection/' num2str(i) '/']; %create file directory for video stream
obj = VideoReader([FileBase, num2str(i) '.MP4']); %video
framecount = 0;
while hasFrame(obj)
readFrame(obj);
framecount = framecount + 1;
current_time(framecount) = obj.CurrentTime;
end
end
Kathryn Liberman
Kathryn Liberman 2019년 3월 14일
Thanks so much, Walter! I really appreciate the help. :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by