Core video - displaylink I need help interpreting CVTimeStamp

Key experts in the field of video, I am creating a custom video player for .mov files. I work with the .mov parser and use the QTCoreVideo101 sample that I am trying to reproduce.

I have a problem with getFrameForTime screen link. I do not know how to use temporary values โ€‹โ€‹to find the correct frame.

The values โ€‹โ€‹contained in CVTimeStamp don't make any sense to me. Below is a sample of the values โ€‹โ€‹requested for a video in 1 second. Can someone explain how I use these values โ€‹โ€‹to find the correct frame in the .mov file?

First Three Queries - CVTimeStamp Value

  • Video time: 489150134353920.000000 hostTime: 2026048145326080.000000 videoTimeScale: 241500000.000000 rateScalar: 1.000000 videoRefreshPeriod: 4028320.000000

  • video Time: 489150201462784.000000 hostTime: 2026048279543808.000000 videoTimeScale: 241500000.000000 rateScalar: 0.999985 videoRefreshPeriod: 4028320.000000

  • video Time: 489156643913728.000000 hostTime: 2026074988871680.000000 videoTimeScale: 241500000.000000 rateScalar: 1.000000 videoRefreshPeriod: 4028320.000000

+4
source share
1 answer

CVTimeStamp explained in the CVTimeStamp Reference Document . videoTimeScale - the number of units divided per second. Thus, for 30 frames per second, the video should be at least 30 (although this can be several multiple of 30-60, 120, 30000, etc.). videoTime is the time in the timeline where the current frame (or field) begins. Therefore, if your time base is 30,000 and you are on the 15th frame, your videoTimeScale will be 30,000 and your videoTime will be 15,000.

You can verify that the value is interpreted correctly by checking the smpteTime field and seeing if it matches what was expected. In the above example, it will be 0 hours, 0 minutes, 0 seconds, 15 frames (or 00: 00: 00: 15).

Is there a reason why you can just use the built-in video decoding tools in the OS?

0
source

All Articles