<div dir="ltr"><div><div><div><div><div><div><div><div>Hello,<br><br></div>Thank you all for your earlier responses.<br><br></div>Here is how I transfer xyz(c) coordinates writen into video files to digiKam database so far:<br><a href="https://youtu.be/QpBJaSIPMCk">https://youtu.be/QpBJaSIPMCk</a><br><br></div>The "Copy GPS to clipboard script" reads the coordinates using mediainfo and converts them from something like this:<br>©xyz : +50.9003-114.0125/<br></div>to something like this:<br>geo:50.900300000,-114.012500000<br></div>Then I select the video in digikam, press Ctrl + Shift + G (for some reason you can only see "G" on the video) and paste the coordinates.<br></div>Works as a charm but it is not automated.<br><br></div>Next step would to automate this process which means the scipt would read the xyz(c) tag using mediainfo and write it to the sidecarfile.<br><br></div>Sidecar looks like this:<br><div><br><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><br><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"><br> <rdf:RDF xmlns:rdf="<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>"><br> <rdf:Description rdf:about=""<br> xmlns:xmp="<a href="http://ns.adobe.com/xap/1.0/">http://ns.adobe.com/xap/1.0/</a>"<br> xmlns:exif="<a href="http://ns.adobe.com/exif/1.0/">http://ns.adobe.com/exif/1.0/</a>"<br> xmlns:tiff="<a href="http://ns.adobe.com/tiff/1.0/">http://ns.adobe.com/tiff/1.0/</a>"<br> xmp:CreatorTool="digiKam-5.6.0"<br> exif:GPSLatitudeRef="N"<br> exif:GPSLongitudeRef="W"<br> exif:GPSVersionID="2.0.0.0"<br> exif:GPSLatitude="50,54.0180000N"<br> exif:GPSLongitude="114,0.7500000W"<br> exif:GPSMapDatum="WGS-84"<br> tiff:Software="digiKam-5.6.0"/><br> </rdf:RDF><br></x:xmpmeta><br><?xpacket end="w"?><br><br></div><div>As you see, the coordinates will need to be converted again.<br></div><div><br>Actually exiftool is able to see more GPS tags written to file and they look more similar to what digiKam is expecting to see in XMP:<br>...<br>[QuickTime] GPSCoordinates : 50 deg 54' 1.08" N, 114 deg 0' 45.00" W<br>...<br>[Composite] GPSLatitude : 50 deg 54' 1.08" N<br>[Composite] GPSLongitude : 114 deg 0' 45.00" W<br>...<br>[Composite] GPSPosition : 50 deg 54' 1.08" N, 114 deg 0' 45.00" W<br>...<br><br></div><div>Do you think that will be easy to accomplish?<br></div><div><br>So far tried inserting:<br> exif:GPSLatitudeRef="N"<br> exif:GPSLongitudeRef="W"<br> exif:GPSVersionID="2.0.0.0"<br> exif:GPSLatitude="50,54.0180000N"<br> exif:GPSLongitude="114,0.7500000W"<br> exif:GPSMapDatum="WGS-84"<br></div><div>to an XMP file but digiKam did not recognize it.<br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards, <br></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 16, 2017 at 1:10 AM, Mica Semrick <span dir="ltr"><<a href="mailto:mica@silentumbrella.com" target="_blank">mica@silentumbrella.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I'd be happy to help with the XML/XMP part of this; XML startlet is your friend. <br>
<br>
Find the tags you need using mediainfo and which XMP tags you want to write and let us know.<br>
<br>
-m<br><br><div class="gmail_quote">On May 15, 2017 3:14:38 PM PDT, <a href="mailto:aegoreev@gmail.com" target="_blank">aegoreev@gmail.com</a> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<pre class="m_7456051551856171141k9mail">Hello,<br><br>I am thinking of writing a script that would read GPS coordinates from a video <br>file using mediainfo and paste them to xmp sidecar for digiKam to be able to <br>read.<br>I am looking for a starting point. Does anyone have a script that writes <br>something in a text file?<br><br>I will probably be using MediaInfo to read the coordinates.<br><br>mediainfo FILE | grep "©xyz" | head -n 1<br><br>Thank you in advance for any ideas.<br><br></pre></blockquote></div></div></blockquote></div><br></div>