I would like to synchronize a video recorded by an Anafi UKR with the position logs.
To do this, I installed groundsdk-tools and extracted the video metadata using vmeta-extract.
I have access to the following information:
the time when the drone was powered on,
the time when the video recording started,
for each frame, the elapsed time since the beginning of the recording (though I’m not entirely sure what the exact unit is).
My goal is to compute the exact timestamp for each frame.
In theory, I could calculate:
recording_start_time + frame_elapsed_time
However, the recording start time is only given in the hh:mm:ss format.
I don’t know whether the recording actually starts at hh:mm:ss.00.
So my questions are:
Is the recording start time known with finer resolution than one second?
If so, where can this more accurate timestamp be found (e.g., in the video metadata or GroundSDK tools)?
Can you specify what you are calling “position logs”?
You can extract synchronized information about the drone location in each frame metadata with vmeta extract to ensure synchronization. (See the json output)
Is this a solution to your issue?
I was indeed able to extract this information using vmeta-extract, which gives me the drone’s GPS position for each image.
However, I don’t have the exact timestamp for when each image was captured—only the elapsed time since the start of the recording, which is only given in the hh:mm:ss format.
But I need the precise capture time (=hh:mm:ss.xx) in order to synchronize the drone’s position with the positions of other drones.
I just realized that it was from an Anafi USA that I was able to extract video metadata, including the GPS position (though still without the UTC timestamp).
Could this be due to an outdated version of vmeta-extract?
Or is there some configuration or additional step required to extract metadata on this model?
Hello,
The UTC timestamp was not available for Anafi USA, but you should be able to get it with Anafi UKR.
You should update your groundsdk-tools repository to be sure to have Anafi UKR metadata.
The UTC metadata is not available without the GPS, you probably need to make the recording outside to get proper GPS data. To be sure the GPS is available you can test with freeflight (the icon should be green if the GPS is available).
Is it the right way to build vmeta-extract? If it can help, in groundsdk-tolls/products, I only have groundsdk/linux. Am I supposed to extract https:// github. com/Parrot-Developers/libvideo-metadata somewhere?
./build.sh -p groundsdk-linux -t build -j/1
Should work, if you only want to build vmeta-extract, ./build.sh -p groundsdk-linux -A vmeta-extract -j/1 does the same
libvideo-metadata should be in ./packages/libvideo-metadata already
vmeta-extract - Parrot Drones video metadata extractor tool
Copyright (c) 2016 Parrot Drones SAS
duration: 227.50s
serial_number: Lav*******
Done!
The out.json is generated and contains
{
“session”:{
“serial_number”:“Lav*****”
}
}
Finally, ULOG_STDERR=y ./out/groundsdk-linux/staging/native-wrapper.sh vmeta-extract --pretty --json out.json <path_th_mp4> does not add anything, I get the same output as without ULOG_STDERR=y.
Does the serial number filed start with “Lavf…”? In that case it indicates that the video was (re)processed by ffmpeg and then Parrot’s metadata will not be present any more. The MP4 file must come directly from the drone’s memory without any modification.
Hello,
Thank you for your reply, this is indeed the explanation for my issue. I am actually able to extract the metadata from the raw video, frame by frame.