GPS Logfile from Livestream

Hi there
I’m searching for a way to gather the GPS data and save them in a logfile (p.e. CSV). How do I do that?
I can connect the PC to my Skycontroller 3, pilot the drone with the controller and watch the live stream with HUD.
I found the libvideo-metadata library, but no tutorial or example. Can someone help me or give me a hint?
Thanks in advance
MrRamseier