embed timestamp (date and time in video)
Great Library. Is it possible to embed a timestamp (showing date and time)? I don't want to make an overlay but that the timestamp is included in the streaming video? Something like a surveillance camera.
We were thinking to first generate a bitmap from a label and then draw it on the Surfaceview. Any ideas?
Yes, you can do this, with streaming mode MODE_MEDIACODEC_API_2 on the video track. Then draw the bitmap in a similar manner to how the video is drawn. Take a look at create2D Texture in GLUtil and the official android docs for drawing in opengl.
Thank you sbaar for your reply. Sounds reassuring that it is possible. Could the code here: [http://pastebin.com/ThGKiHi2]
be suitable to adapt to my needs? I have never used OpenGL before so any advice would be most appreciated.
Yes, that type of code, although try it with a solid color bitmap before text to make sure you have it working. Then use the shaders and tutorial here http://developer.android.com/training/graphics/opengl/draw.html
Remember you can't use the same shader that's being used for the surface texture.
Do you know if there are any drawbacks using MODE_MEDIACODEC_API_2 instead of the suggested MODE_MEDIARECORDER_API?
Media Recorder is just the default because it's the oldest. Both have bugs, wrt android and this library's implementation, but at least with Media Codec you have visibility to fix them. Media Recorder was a hacky solution because it has to break apart the file and make an educated guess to make the audio sync.
You're an encyclopedia! Many thanks for you sharing your knowledge. I will try what you suggested tomorrow. Many thanks again.
@moster67 - did you manage to embed timestamp on running video and record same? Can you share the sample code.?