Getting the current time as timecode #74
Replies: 2 comments
-
Is there a particular use case? Real time and timecode are two different time domains and their units (hours, minutes, etc.) shouldn't be interchanged or assumed to be interchangeable. (This discussion post might help to explain.) You can convert total elapsed seconds to timecode (see Real Time conversion docs). So if you can convert the current time to floating-point elapsed seconds from midnight (24 hour clock) as timecode is always displayed as 24-hour. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your response! I thought I could convert the time from my phone to get timecode. But after studying the issue more deeply, it turned out that this was a stupid idea. I tried to study the issue of incrementing frames on timers in order to get the number of frames and then convert them into timecode. But Swift does not know how to use timers with such precision in microseconds. In addition, I read that there will be deviations and delays. Apparently, the most normal thing is to create an empty audio stream and attach timecode to it, this will be more or less accurate. But this is still beyond my skills, I will continue to look for a solution, thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello! Your library is wonderful. I'm new and I have a question. I want my phone's current time to be displayed as timecode.
For example, it is now 10:10:15 (ten hours, ten minutes, fifteen seconds)
I want to make it so that I can specify fps and the time is displayed with the frames. For example, 24 frames per second
10:10:15:23
10:10:16:00
10:10:16:01
etc
That is, the time is real, but the last number is the frame rate. I tried experimenting with CMTime, but it doesn't work. I will be grateful if you can tell me how to convert time to timecode
Beta Was this translation helpful? Give feedback.
All reactions