{"id":55170,"date":"2022-03-18T03:01:43","date_gmt":"2022-03-17T17:01:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55170"},"modified":"2022-04-26T10:23:18","modified_gmt":"2022-04-26T00:23:18","slug":"making-of-biology-resources-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/making-of-biology-resources-primer-tutorial\/","title":{"rendered":"Making of Biology Resources Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/red-wriggler-output.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Making of Biology Resources Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/making__of_red_wriggler_concatenation_of_still_images_to_video.gif\" title=\"Making of Biology Resources Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Making of Biology Resources Primer Tutorial<\/p><\/div>\n<p>We hope some readers might be interested in the process of how we created the <a href='#wormvideo' title='Inhouse worm video made up of two separate sources'>&#8220;two data source&#8221; video<\/a> of yesterday&#8217;s <a title='Biology Resources Primer Tutorial' href='#brpt'>Biology Resources Primer Tutorial<\/a>, because, as we said about those two data sources &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/biology-resources-primer-tutorial\/'>\n<ul>\n<li>.MOV video via Camera app<\/li>\n<li>.jpg images via Camera app (trying pinch zooming in)<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; it might be of interest for users out there to want to combine these two (alas of different dimensions) into the one output video .. albeit not of &#8220;Hollywood&#8221; blockbuster status, but we leave the expertise and panache for you to add?!<\/p>\n<p>It took many many goes to turn these iPhone Camera app derived media files into <a href='#wormvideo' title='Inhouse worm video made up of two separate sources'>what we ended up with<\/a>, but it was early on that we decided the modus operandi would be the great, in our case macOS, command line <a target=_blank title=ffmpeg href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> video editing tool.  Now, it bears saying, that you may find this a doddle with some GUI app that lets you drop media in, perhaps, but at this blog, we tend to gravitate towards freeware solutions.  So roughly and precisely speaking, what steps were involved?<\/p>\n<ol>\n<li>used the iPhone Photos app Mail sharing option to email myself, here on this MacBook Air, the media as above (the video being short enough) &#8230;<\/li>\n<li>on the MacBook Air <a target=_blank title='Gmail' href='https:\/\/gmail.com'>Gmail<\/a> website, do all the downloads and use macOS Finder app to copy into <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'>MAMP<\/a> Document Root folder (purely because we think better doing work here) renaming the .MOV to red_wriggler.mov<\/li>\n<li>rename image files (via macOS Terminal application) to suit a <i>red_wriggler-%02d.jpg<\/i> paradigm that ffmpeg eats <font size=2>(for dinner<\/font><font size=1>, for lunch, we&#8217;re not sure, but eating only happens if there is a file in the range 0-4 present &#8230; of course<\/font><font size=2>)<\/font> &#8230;<\/li>\n<li>ffmpeg &#8230; convert .mov video to .mp4 &#8230;<br \/>\n<code><br \/>\nffmpeg -i red_wriggler.mov red_wriggler.mp4<br \/>\n<\/code>\n<\/li>\n<li>ffmpeg &#8230; convert image stills to .mp4 &#8230;<br \/>\n<code><br \/>\nffmpeg -framerate 0.2 -i red_wriggler-%2d.jpg -vf fps=10 -pix_fmt yuv420p red_wriggler_stills.mp4<br \/>\n<\/code>\n<\/li>\n<li>ffmpeg &#8230; make the scales of the two videos the same, else concatenation, with ffmpeg, is not possible (and we decided the iPhone Camera video dimensions be attended to here, at the expense of the resolution of the &#8220;stills video&#8221;) &#8230;<br \/>\n<code><br \/>\nffmpeg -i red_wriggler.mp4 -vf scale=1080:1920,setsar=1:1 red-wriggler.mp4<br \/>\nffmpeg -i red_wriggler_stills.mp4 -vf scale=1080:1920,setsar=1:1 red-wriggler-stills.mp4<br \/>\n<\/code>\n<\/li>\n<li>ffmpeg &#8230; concatenate two .mp4 videos into a final .mp4 video &#8230;<br \/>\n<code><br \/>\necho file red-wriggler.mp4 > mylist.txt<br \/>\necho file red-wriggler-stills.mp4 >> mylist.txt<br \/>\nffmpeg -f concat -i mylist.txt -c copy red-wriggler-output.mp4<br \/>\nopen red-wriggler-output.mp4<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p>Above is just one idea regarding concatenating video via the command line, but for a more extensive discussion we&#8217;d recommend the excellent <a target=_blank title='How to Merge Videos Together' href='https:\/\/www.videoproc.com\/video-process\/how-to-merge-videos-together.htm#method-11'>How to Merge Videos Together<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/making-of-biology-resources-primer-tutorial\/'>Making of Biology Resources Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='brpt'>Previous relevant <a target=_blank title='Biology Resources Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/biology-resources-primer-tutorial\/'>Biology Resources Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/red-wriggler-output.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Biology Resources Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/making_of_red_wriggler_concatenation_of_still_images_to_video.gif\" title=\"Biology Resources Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Biology Resources Primer Tutorial<\/p><\/div>\n<p>Relatively soon after the Internet started as a defence network, the scientific benefits of sharing information freely in a worldwide network was recognized.<\/p>\n<p>Most of us know <a target=_blank title='Wikipedia' href='https:\/\/wikipedia.org'>Wikipedia<\/a> as a public repository of some of this scientific information, but there are also lots of universities and schools and museums out there getting better and better at disseminating information, from a basis of expertise, to we other laypeople.  Thanks, everyone.<\/p>\n<p>And so, when I came upon a worm in an odd place, the gutter, during a really wet period hereabouts, my first thought about following up on trying to find out more about it, turned to our <a target=_blank title='Australian Museum' href='https:\/\/australian.museum\/'>Australian Museum<\/a> as a place to visit, having many years ago got such a sweet reply to my query about a snake in our Newtown backyard <font size=1>(that we had just moved into)<\/font> which included back and fro questions about size and texture, to end in the diagnosis &#8230;<\/p>\n<blockquote><p>\nIt&#8217;s a rubber snake\n<\/p><\/blockquote>\n<p> &#8230; and yes, it was &#8230; but we digress.   Except that this event made us a little sheepish to renew acquaintances, which is as it should be if you can do your own research with their website help combined with other great resources, the best visual, we often think, being a <a target=_blank title='Google' href='https:\/\/www.google.com\/search?q=red+wiggler+worms+australia&#038;sxsrf=APq-WBta68bLuVHL7Jb4UlwryzikYzJzcA:1647394903876&#038;source=lnms&#038;tbm=isch&#038;sa=X&#038;ved=2ahUKEwj2i7OgwMn2AhVaM94KHd_rAMcQ_AUoAnoECAEQBA&#038;biw=1440&#038;bih=743&#038;dpr=1'>Google image search<\/a> to try to match the iPhone created media you might have created &#8230;<\/p>\n<ul>\n<li>.MOV video via Camera app<\/li>\n<li>.jpg images via Camera app (trying pinch zooming in)<\/li>\n<\/ul>\n<p> &#8230; to online evidence.  There was also <i>the placing of the worm on some grass and seeing it disappear within five minutes<\/i> to go on, also, as evidence that what we had here was a case of &#8230;<\/p>\n<blockquote><p>\nRed Wriggler worms\n<\/p><\/blockquote>\n<p>Kind of common, but there you are!<\/p>\n<p><video id=wormvideo style='width:100%;' controls><source type='video\/mp4' src='http:\/\/www.rjmprogramming.com.au\/Mac\/red-wriggler-output.mp4'><\/source><\/video><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55165' onclick='var dv=document.getElementById(\"d55165\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/biology\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55165' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55170' onclick='var dv=document.getElementById(\"d55170\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ffmpeg\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55170' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We hope some readers might be interested in the process of how we created the &#8220;two data source&#8221; video of yesterday&#8217;s Biology Resources Primer Tutorial, because, as we said about those two data sources &#8230; .MOV video via Camera app &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/making-of-biology-resources-primer-tutorial\/\">Continue reading <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":[12,37],"tags":[3935,2082,183,3932,3318,380,3937,415,436,503,513,590,621,631,738,744,760,3934,866,3938,1725,1018,1057,3933,1100,1111,1133,1252,1319,1369,1431,3936],"class_list":["post-55170","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-australian-museum","tag-biology","tag-camera","tag-classification","tag-concatenate","tag-email","tag-evidence","tag-ffmpeg","tag-finder","tag-gmail","tag-google","tag-image","tag-internet","tag-iphone","tag-mail","tag-mamp","tag-media","tag-museum","tag-online","tag-online-query","tag-photos","tag-query","tag-research","tag-reserach","tag-science","tag-search-engine","tag-share","tag-terminal","tag-tutorial","tag-video","tag-wikipedia","tag-world-wide-web"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55170"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=55170"}],"version-history":[{"count":12,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55170\/revisions"}],"predecessor-version":[{"id":55523,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55170\/revisions\/55523"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}