{"id":2291,"date":"2017-08-04T20:42:52","date_gmt":"2017-08-04T19:42:52","guid":{"rendered":"http:\/\/johnjohnston.info\/106\/?p=2291"},"modified":"2017-08-04T20:47:11","modified_gmt":"2017-08-04T19:47:11","slug":"tdc2034","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/106\/tdc2034\/","title":{"rendered":"#tdc2034"},"content":{"rendered":"<p class=\"single-title\"><a href=\"http:\/\/daily.ds106.us\/tdc2034\/\">#tdc2034 Today be on the lookout for your one tree!<\/a><\/p>\n<p>Prerequisites, you need ffmpeg installed. I did that with <a href=\"https:\/\/brew.sh\/\">Homebrew <\/a>.<\/p>\n<p>In Photos app. search from Tree, this works pretty well.<\/p>\n<p><a href=\"http:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/trees.png.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2295\" src=\"https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/trees.png.jpg\" alt=\"\" width=\"900\" height=\"590\" srcset=\"https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/trees.png.jpg 900w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/trees.png-300x197.jpg 300w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/trees.png-768x503.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>Export all the photos to a folder.<\/p>\n<p>You need to rename all the photos to be sequential, 0001.jpg, 0002.jpg etc.<\/p>\n<p>So open the terminal and cd to the folder of images. Write the following to a file, rename.sh and run with <code> .\/rename.sh<\/code><\/p>\n<pre><code>a=1\nfor i in *.jpg; do\n  new=$(printf \"%04d.jpg\" \"$a\") #04 pad to length of 4\n  mv -i -- \"$i\" \"$new\"\n  let a=a+1\ndone<\/code><\/pre>\n<p>This give you a nice sequence of images. I made an extra image with the music credits too.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2292\" src=\"https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226-1024x768.jpg\" alt=\"\" width=\"840\" height=\"630\" srcset=\"https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226-1024x768.jpg 1024w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226-300x225.jpg 300w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226-768x576.jpg 768w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226-1200x900.jpg 1200w, https:\/\/johnjohnston.info\/106\/wp-content\/uploads\/2017\/08\/0226.jpg 1280w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><br \/>\nthen:<\/p>\n<p><code>ffmpeg -f image2 -i %04d.jpg -c:v libx264 -pix_fmt yuv420p trees-1.mp4<\/code><\/p>\n<p>slow it down a bit<\/p>\n<p><code>ffmpeg -i trees-1.mp4 -filter:v \"setpts=4.0*PTS\" trees-2.mp4<\/code><\/p>\n<p>and add some music from an mp3 file in the same folder.<\/p>\n<p><code>ffmpeg -i trees-2.mp4 -i Faster_Does_It.mp3 -map 0 -map 1 -codec copy -codec:a aac -strict experimental -b:a 192k -shortest tree-audio.mp4<\/code><\/p>\n<p>Upload to YouTube:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"#tdc2034\" width=\"840\" height=\"630\" src=\"https:\/\/www.youtube.com\/embed\/yM5StBSqFts?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<p>5 minute job.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#tdc2034 Today be on the lookout for your one tree! Prerequisites, you need ffmpeg installed. I did that with Homebrew . In Photos app. search from Tree, this works pretty well. Export all the photos to a folder. You need to rename all the photos to be sequential, 0001.jpg, 0002.jpg etc. So open the terminal &hellip; <a href=\"https:\/\/johnjohnston.info\/106\/tdc2034\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;#tdc2034&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[81,91,229],"tags":[179,249],"class_list":["post-2291","post","type-post","status-publish","format-standard","hentry","category-dailycreate","category-mashup","category-video","tag-ffmpeg","tag-tdc2034"],"better_featured_image":null,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s3RLlC-tdc2034","_links":{"self":[{"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/posts\/2291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/comments?post=2291"}],"version-history":[{"count":4,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/posts\/2291\/revisions"}],"predecessor-version":[{"id":2297,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/posts\/2291\/revisions\/2297"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/media?parent=2291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/categories?post=2291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/106\/wp-json\/wp\/v2\/tags?post=2291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}