How to add real time stamp on the streaming and recording video for every frame in Swift?

1k views Asked by At

My app uses VideoCore project for live streaming to Wowza server and store the video. Also it uses AVCaptureMovieFileDataOutput to record the offline video.

I want to embed the video capturing time stamp on top-left of video, and it is not a static time. It means it is not only a static watermark but also a real video capturing time display.

For the streaming case, I have no idea for now. For the offline case, I tried to utilize AVCaptureAudioDataOutput to get every frame to add time text overlay. But this causes preview screen freezes.

Any tips are helpful. Thank you.

My platform is Xcode7.3 + Swift2

1

There are 1 answers

1
Cristian Sepulveda On

I did some similar thing using transcodig on wowza, the transcodig menu enables image overlay, this image could be refreshed every second (or less), so if you create an image with timestamps every second, wowza takes it and put it on the stream every second. you can define where to put the image, the size and transparency.

to create the image I use PHP, but you could use another tool that enables image creation.