{"id":2202,"date":"2011-08-05T00:00:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/johnjohnston.info\/blog\/?e=2202"},"modified":"2017-02-05T11:27:37","modified_gmt":"2017-02-05T11:27:37","slug":"mapping-iphone-video","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/mapping-iphone-video\/","title":{"rendered":"Mapping iPhone Video"},"content":{"rendered":"\n<p>I&#8217;ve <a href=\"http:\/\/johnjohnston.info\/blog\/archive\/2011\/04\/02\/field-recording-at-the-scottish-music-centre\" title=\"Field Recording at the Scottish Music Centre - John's World Wide Wall Display\">blogged<\/a> before about the wonderful <a href=\"http:\/\/charlesveasey.net\/projects\/?content=hmsg-spiral#1\">Hmsg Spiral Map<\/a> a project that combines video, audio and google maps into a mesmerising meditative experience.<\/p>\n<p>Recently I noticed that iPhoto shows the location of videos as well as audio which got me thinking a wee bit. I checked out a few exif tools and found that the location was stored in exif data in the same way as photos.<\/p>\n<p> I already had made some <a href=\"http:\/\/johnjohnston.info\/blog\/archive\/2009\/06\/08\/more-mapping\" title=\"More mapping - John's World Wide Wall Display\">crude tools<\/a> to <a href=\"http:\/\/johnjohnston.info\/where\/walklist.php\" title=\"Mapped Walks\">map walks<\/a> on google maps and made an odd foray into adding sounds to the photos: <a href=\"http:\/\/johnjohnston.info\/where\/walks.php?f=090516_Cochno_Duncolm&amp;i=12\" title=\"A Mapped Walk\">burn<\/a>, so though I might be able to knit together some video and maps.<\/p>\n<p>After a few false starts I manage to do this:<\/p>\n<p style=\"text-align:center\"><a href=\"http:\/\/johnjohnston.info\/where\/vmaps\/loch_humprey\/\" title=\"A Loch Humprey Walk\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/johnjohnston.info\/blog\/images\/2011-08\/2011-08-03_loch_hump_screen.jpg\" alt=\"Loch Hump Screen\" height=\"260\" width=\"480\"><\/a><br  \/><a href=\"http:\/\/johnjohnston.info\/where\/vmaps\/loch_humprey\/\">A Loch Humphrey Walk<\/a><\/p>\n<p>This is a webpage that shows a series of videos with a couple of maps pointing to the location the video was shot at. When one video ends the next is automatically loaded. You can jump around by clicking the numbers.It information: videos urls, locations and time shot is stored in an xml file, this is loaded by some javascript (<a href=\"http:\/\/jquery.com\/\" title=\"jQuery: The Write Less, Do More, JavaScript Library\">jquery<\/a>)<\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/johnjohnston.info\/blog\/images\/2011-08\/2011-08-03_bideomapfolder.jpg\" alt=\"Bideomapfolder\" height=\"158\" width=\"196\" style=\"float:right;padding:2px;border:solid 1px #B3B3B3;margin:4px\"><\/p>\n<p> The list of movies and locations are loaded from an xml file that is a very simple list:<br  \/><em>&lt;item&gt;&lt;file&gt;loch_humprey_02.m4v&lt;\/file&gt;&lt;loc&gt;55.9323,-004.4594&lt;\/loc&gt;&lt;dc&gt;  2011:08:02 21:27:10&lt;\/dc&gt;&lt;\/item&gt;<\/em><br  \/>I though xml was a good idea as it would allow reuse to display the movie in different ways. As the movies are shown the location is used to show a couple of images using the <a href=\"http:\/\/code.google.com\/apis\/maps\/documentation\/staticmaps\/\">google maps static api<\/a>. This first <a href=\"http:\/\/johnjohnston.info\/videomaptest\/\" title=\"Video Map Experiment\">Video Map Experiment<\/a> was cobbled together using a couple of command line tools (pcastaction, built into Mac OS X and <a href=\"http:\/\/www.sno.phy.queensu.ca\/~phil\/exiftool\/\">ExifTool by Phil Harvey<\/a>). I am not knowledgeable about shell stuff but it can often help do interesting things and once you figure it out is easy to reuse.<\/p>\n<p>After a couple of tries I&#8217;ve made a <a href=\"http:\/\/www.supercard.us\/\" title=\"SuperCard on Lion\">Supercard<\/a>  project that sorts this all out, here is what I did to make the <a href=\"http:\/\/johnjohnston.info\/where\/vmaps\/loch_humprey\/\">A Loch Humphrey Walk<\/a><\/p>\n<ol>\n<li>Take videos on iPhone<\/li>\n<li>Trim on iPhone<\/li>\n<li>import into iphoto<\/li>\n<li>Drag videos from iphoto on to a field in a SuperCard project I&#8217;ve made.<\/li>\n<li>\tClick a button on said project which:\n<ol>\n<li>Asks me to choose a folder<\/li>\n<li>Gathers locations &amp; date\/time from the video files<\/li>\n<li>Makes a copy of videos in the folder, shrinking file size &amp; dimensions (this take a few minutes)<\/li>\n<li>Creates an xml file &amp; and index.html file in the folder to show videos <\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p style=\"text-align:center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/johnjohnston.info\/blog\/images\/2011-08\/2011-08-05_video_mapssc45.jpg\" alt=\"Video Maps.sc45\" height=\"363\" width=\"490\"><\/p>\n<p>I then upload folder to server via ftp.<\/p>\n<p>Getting the JavaScript stuff sorted out took me a wee while and quite a few wrong turnings, but it all seems to work on both Mac &amp; Windows with FireFox, Safari or IE now. I started to write about the gory details in this post, but decided to split them off and I&#8217;ll put them up somewhere else sometime soon. I also hope to make the <a href=\"http:\/\/www.supercard.us\/\" title=\"SuperCard on Lion\">Supercard<\/a> Project available for anyone who is interested. (If you want to see an early version let me know)<\/p>\n<p>I hope this could be an interesting way to tell a story, record a trip or describe a place. I&#8217;d be interested to know what other folk think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve blogged before about the wonderful Hmsg Spiral Map a project that combines video, audio and google maps into a mesmerising meditative experience. Recently I noticed that iPhoto shows the location of videos as well as audio which got me thinking a wee bit. I checked out a few exif tools and found that the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[19,200,45,86,197,154,84],"post_format":[],"class_list":{"0":"post-2202","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-wwwd","7":"tag-googlemaps","8":"tag-gps","9":"tag-ios","10":"tag-iphone","11":"tag-maps","12":"tag-mashup","13":"tag-video","14":"kind-article","16":"h-entry","17":"hentry"},"better_featured_image":null,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-zw","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/2202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=2202"}],"version-history":[{"count":1,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/2202\/revisions"}],"predecessor-version":[{"id":4560,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/2202\/revisions\/4560"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=2202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=2202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=2202"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=2202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}