问题
In my application I am recording video using MediaRecorder
. Is there a way how I can count up a timestamp (as precise as possible) durring recording a video. I need this timestamp in order to synchronize some data with the recorded video afterwards.
回答1:
You can get the timestamp by calling to:
Long timestamp = System.currentTimeMillis()
Just call it after you call start()
.
回答2:
I think you can get timestamp from SurfaceTextur getTimestamp().
The base time (zero point) will be set by the source who is updating SurfaceTexture using updateTexImage(). I assume for you it will be camera.
来源:https://stackoverflow.com/questions/26502238/mediarecorder-get-timestamps-while-recording