{"id":50,"date":"2013-09-23T20:54:10","date_gmt":"2013-09-23T19:54:10","guid":{"rendered":"http:\/\/axotron.se\/blog\/?p=50"},"modified":"2013-10-27T20:57:18","modified_gmt":"2013-10-27T19:57:18","slug":"making-a-time-lapse-video","status":"publish","type":"post","link":"https:\/\/axotron.se\/blog\/making-a-time-lapse-video\/","title":{"rendered":"Making a time-lapse video"},"content":{"rendered":"<p><a href=\"time-lapse-shutter-release-based-on-arduino\">The previous post<\/a> was about building the hardware for a remote release timer, programming it and capturing a (large) number of JPEG files. This post is about going from there to creating a video.<\/p>\n<h3>Making a video<\/h3>\n<p>So here comes the part that was most difficult for me and where I had to learn a couple of new things. I have hardly worked at all with video before and turned to Google to figure out how I could accomplish some results without buying expensive commercial software. After all, this is just a minor hobby project.<\/p>\n<p>After some iterations, these are the steps I went through to produce a video:<\/p>\n<ol>\n<li>Crop the images to 16:9 format (and also scale them down to 1920&#215;1080).<\/li>\n<li>Assemble and code the images into an MPEG 4\/H.264 file at 30 fps.<\/li>\n<li>Find some suitable free music to use as soundtrack.<\/li>\n<li>(Edit the music to fit the length of the video.)<\/li>\n<li>Add some title text before the main video and some more text after it.<\/li>\n<li>Publish it all on Youtube.<\/li>\n<\/ol>\n<p>Here is how I did it on a computer running Windows 7:<\/p>\n<h5>Cropping and rescaling<\/h5>\n<p>I had the excellent free (image) viewer <a href=\"http:\/\/www.irfanview.com\/\" target=\"_blank\">Irfanview<\/a> already installed and it turns out that it is the perfect tool for batch cropping and rescaling of photos. I found <a href=\"http:\/\/www.tekany.com\/content\/batch-crop-images-using-irfanview-free\" target=\"_blank\">this tutorial<\/a> that explains how to do it, but basically you just select File -&gt; Batch Conversion\/Rename, add the files you want to crop, click &#8220;Advanced batch conversion settings&#8221; and set up all the relevant parameters there. See screenshots below.<\/p>\n<p>I had to crop from 2144&#215;1424 to 2144&#215;1206 (to get the 16:9 aspect ratio) and then I also let Irfanview rescale to 1920&#215;1080 and place the resulting files in a subdirectory.<\/p>\n<figure id=\"attachment_46\" aria-describedby=\"caption-attachment-46\" style=\"width: 935px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_batch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-46\" alt=\"Batch processing dialog in Irfanview. Select files here and click on Advanced to set up the cropping and scaling.\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_batch.png\" width=\"935\" height=\"814\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_batch.png 935w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_batch-300x261.png 300w\" sizes=\"auto, (max-width: 935px) 100vw, 935px\" \/><\/a><figcaption id=\"caption-attachment-46\" class=\"wp-caption-text\">Batch processing dialog in Irfanview. Select files here and click on Advanced to set up the cropping and scaling.<\/figcaption><\/figure>\n<figure id=\"attachment_45\" aria-describedby=\"caption-attachment-45\" style=\"width: 783px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_advanced_options.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-45\" alt=\"Advanced batch processing options in Irfanview.\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_advanced_options.png\" width=\"783\" height=\"522\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_advanced_options.png 783w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/irfanview_advanced_options-300x200.png 300w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/a><figcaption id=\"caption-attachment-45\" class=\"wp-caption-text\">Advanced batch processing options in Irfanview.<\/figcaption><\/figure>\n<h5>Images to video<\/h5>\n<p>I found a wonderfully unbloated and straightforward &#8211; yet functional &#8211; tool to do the conversion from JPEGs to an mp4 video, namely &#8220;<a href=\"http:\/\/en.cze.cz\/Images-to-video\" target=\"_blank\">Images to video<\/a>&#8220;. The program needs no installation and has a single window (it can also be used from the command line). Below is a screenshot of it.<\/p>\n<figure id=\"attachment_44\" aria-describedby=\"caption-attachment-44\" style=\"width: 420px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/images_to_video.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-44\" alt=\"The only window in the program &quot;Images to video&quot;\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/images_to_video.png\" width=\"420\" height=\"530\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/images_to_video.png 420w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/09\/images_to_video-237x300.png 237w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a><figcaption id=\"caption-attachment-44\" class=\"wp-caption-text\">The only window in the program &#8220;Images to video&#8221;<\/figcaption><\/figure>\n<p>After setting up this dialog, you just press Convert and after a (relatively short) while, a video file pops out. Since the cropping and scaling was done using Irfanview we do not have to worry about it here, which is good since I could not figure out how the cropping features here worked. As soon as I set any of the crop values to higher than 0, the resulting video file came out empty.<\/p>\n<h5>Soundtrack<\/h5>\n<p>A video is more interesting to view if it has some sound. It turns out that there exists quite a bit of music released under a Creative Commons license. <a href=\"http:\/\/www.seabreezecomputers.com\/tips\/freemusic.htm\" target=\"_blank\">This page<\/a> has a list of links to various sites with royalty free music. I found what I was looking for at <a href=\"http:\/\/incompetech.com\/music\/royalty-free\/index.html\" target=\"_blank\">incompetech.com<\/a>, where Kevin MacLeod has published a large number of tunes. You just need to <a href=\"http:\/\/incompetech.com\/music\/royalty-free\/faq.html\" target=\"_blank\">credit him appropriately<\/a> if you use the music.<\/p>\n<h5>Edit the music<\/h5>\n<p>You may or may not need to edit the music. If you want to e.g. cut out a part of a tune and have detailed control over fade it in and fade out, <a href=\"http:\/\/audacity.sourceforge.net\/\" target=\"_blank\">Audacity<\/a> seems like a good choice. I used this at first, but the options in Windows Movie Maker (see next section) turned out to be enough for my humble needs at this point.<\/p>\n<h5>Bringing it all together<\/h5>\n<p>To compose a video with a title screen, some information after the actual video and a soundtrack, I used Microsoft&#8217;s <a href=\"http:\/\/windows.microsoft.com\/en-us\/windows-live\/movie-maker#t1=overview\" target=\"_blank\">Movie Maker<\/a> that you can download for free. The program does not give you a lot of control, but it is straightforward to use and was good enough for this project.<\/p>\n<h5>Putting it on Youtube<\/h5>\n<p>This part is very easy. Just create a Youtube account unless you already have one and upload the video.<\/p>\n<h3>The results<\/h3>\n<p>So, what did become of all this? Below are some of the crude results of my efforts as a fledgling time-lapse video creator.<\/p>\n<p>Magnetic putty devouring a magnet<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/odlAwnNYZ-E?rel=0\" height=\"480\" width=\"640\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p>Magnetic putty sneaking up on a magnet.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/_d1xstU-QxU?rel=0\" height=\"480\" width=\"640\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The previous post was about building the hardware for a remote release timer, programming it and capturing a (large) number of JPEG files. This post is about going from there to creating a video. Making a video So here comes the part that was most difficult for me and where I had to learn a &hellip; <a href=\"https:\/\/axotron.se\/blog\/making-a-time-lapse-video\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Making a time-lapse video<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[8,9],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-photography","tag-time-lapse-photography","tag-video"],"_links":{"self":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":4,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}