{"id":49807,"date":"2020-08-02T03:01:30","date_gmt":"2020-08-01T17:01:30","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=49807"},"modified":"2020-08-01T21:26:24","modified_gmt":"2020-08-01T11:26:24","slug":"imagepdf-and-audiovideo-supervised-flatten-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagepdf-and-audiovideo-supervised-flatten-tutorial\/","title":{"rendered":"Image\/PDF and Audio\/Video Supervised Flatten Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image\/PDF and Audio\/Video Supervised Flatten Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/media_flatten.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Flatten Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image\/PDF and Audio\/Video Supervised Flatten Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Image\/PDF and Audio\/Video Supervised Concatenate Tutorial' href='#i\/pdfa\/vsct'>Image\/PDF and Audio\/Video Supervised Concatenate Tutorial<\/a>&#8216;s &#8230;<\/p>\n<ul>\n<li>&#8220;+&#8221; functionality to &#8230;\n<ol>\n<li>concatenate &#8230; or &#8230;<\/li>\n<li>voiceover<\/li>\n<\/ol>\n<p> &#8230; is, today, joined by <font size=1>&#8230; you guessed it &#8230;<\/font>\n<\/li>\n<li>&#8220;-&#8221; functionality to &#8230;\n<ol>\n<li>flatten animated GIF &#8230; or &#8230;<\/li>\n<li>flatten video<\/li>\n<\/ol>\n<p> &#8230; out to constituent image slides &#8230; because we figure there are scenarios where a user wants &#8230;<\/p>\n<ul>\n<li>one input media file &#8230; to end up as &#8230;<\/li>\n<li>several output media files<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>So far no sanity checks are made regarding how many image slides <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> will create via our &#8221; -r 1 &#8221; switch &#8230;<\/p>\n<p><code><br \/>\n$switchtwo=\"\";<br \/>\nif (isset($_GET['flattenit'])) {<br \/>\n  if (str_replace(\"false\",\"\",$_GET['flattenit']) != \"\") {<br \/>\n    $switchtwo=\" -r 1 \";<br \/>\n  }<br \/>\n} else if (isset($_POST['flattenit'])) {<br \/>\n  if (str_replace(\"false\",\"\",$_POST['flattenit']) != \"\") {<br \/>\n    $switchtwo=\" -r 1 \";<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; applied to output one image slide per second (sample rate) of video input.  But perhaps you &#8220;doing the Math&#8221; would explain why we don&#8217;t want this functionality up at the rjmprogramming.com.au domain web server, though Usain Bolt would only trouble us with 11 image slides <a target=_blank title='100m' href='https:\/\/en.wikipedia.org\/wiki\/100_metres'>for his lightning fast 100 meter sprints<\/a>!<\/p>\n<p>Thanks to <a target=_blank title='Filmstrip CSS ideas, thanks' href='https:\/\/codepen.io\/chrissp26\/pen\/OPNKXm'>this link<\/a> regarding Filmstrip CSS ideas.<\/p>\n<p>Here again is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php------GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php------GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> should we be catching your attention yet!<\/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\/image\/pdf-and-audio\/video-supervised-flatten-tutorial\/'>Image\/PDF and Audio\/Video Supervised Flatten Tutorial<\/a>.<\/p-->\n<hr>\n<p id='i\/pdfa\/vsct'>Previous relevant <a target=_blank title='Image\/PDF and Audio\/Video Supervised Concatenate Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image\/pdf-and-audio\/video-supervised-concatenate-tutorial\/'>Image\/PDF and Audio\/Video Supervised Concatenate Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image\/PDF and Audio\/Video Supervised Concatenate Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/media_concatenate.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Concatenate Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image\/PDF and Audio\/Video Supervised Concatenate Tutorial<\/p><\/div>\n<p>It is a combination of &#8230;<\/p>\n<ul>\n<li>yesterday&#8217;s <a title='Image\/PDF and Audio\/Video Supervised Multiple Tutorial' href='#i\/pdfa\/vsmt'>Image\/PDF and Audio\/Video Supervised Multiple Tutorial<\/a> &#8230; with the previous &#8230;<\/li>\n<li><a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/concatenating-video-on-command-line-tutorial\/' title='Concatenating Video on Command Line Tutorial'>Concatenating Video on Command Line Tutorial<\/a><\/li>\n<\/ul>\n<p> &#8230; that steers us into another couple of ideas our &#8220;+&#8221; logics could represent when we are talking about media, those being &#8230;<\/p>\n<ul>\n<li>concatenate audio or concatenate video &#8230; ie. string one media file onto another to achieve a final media file result<\/li>\n<li>add voiceover audio content(s) onto video(s)<\/li>\n<\/ul>\n<p> &#8230; all using the talents of the brilliant Open Source <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> audio and\/or video media editor and manager and creator.<\/p>\n<p>The conduit we use to make these media manipulations happen revolves around a Javascript <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> and <a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> object logic solution with (PHP writing Javascript) code like (where $verb points to where ffmpeg resides and infs[] array contains input media file files (with no path)) &#8230;<\/p>\n<p>&lt;?php<br \/>\n echo &#8221;<br \/>\n<code><br \/>\n  var concatbit='\\\"concat:';<br \/>\n  var xzhr = new XMLHttpRequest();<br \/>\n  var xform=new FormData();<br \/>\n  for (jut=0; jut&lt;infs.length; jut++) {<br \/>\n  xform.append('command' + jut, '\" . $verb . \" -i ' + document.getElementById('path').value + infs[jut] + ' ' + document.getElementById('path').value + infs[jut].split('.')[0] + '.ts &lt; \/tmp\/macos.yes');<br \/>\n  if (concatbit.indexOf('.ts') == -1) {<br \/>\n  concatbit+=document.getElementById('path').value + infs[jut].split('.')[0] + '.ts';<br \/>\n  } else {<br \/>\n  concatbit+='|' + document.getElementById('path').value + infs[jut].split('.')[0] + '.ts';<br \/>\n  }<br \/>\n  }<br \/>\n  xform.append('command' + infs.length, '\" . $verb . \" -i ' + concatbit + '\\\" -c copy ' + document.getElementById('opath').value + document.getElementById('outputname').value.split('.')[0] + '_0.ts &lt; \/tmp\/macos.yes');<br \/>\n  var isofar=eval('' + infs.length);<br \/>\n  isofar++;<br \/>\n  xform.append('command' + isofar, '\" . $verb . \" -i ' + document.getElementById('opath').value + document.getElementById('outputname').value.split('.')[0] + '_0.ts ' + document.getElementById('opath').value + document.getElementById('outputname').value + ' &lt; \/tmp\/macos.yes');<br \/>\n  for (jut=0; jut&lt;infs.length; jut++) {<br \/>\n  isofar++;<br \/>\n  xform.append('command' + isofar, 'rm -f ' + infs[jut].split('.')[0] + '.ts &lt; \/tmp\/macos.yes');<br \/>\n  }<br \/>\n  isofar++;<br \/>\n  xform.append('command' + isofar, 'rm -f ' + document.getElementById('opath').value + document.getElementById('outputname').value.split('.')[0] + '_0.ts &lt; \/tmp\/macos.yes');<br \/>\n  isofar++;<br \/>\n  xform.append('command' + isofar, 'open ' + document.getElementById('outputname').value);<br \/>\n  xzhr.open('post', document.URL.split('?')[0].split('#')[0], true);<br \/>\n  xzhr.send(xform);<br \/>\n<\/code><br \/>\n&#8220;;<br \/>\n?&gt;<\/p>\n<p>Here is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php-----GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php-----GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/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\/image\/pdf-and-audio\/video-supervised-concatenate-tutorial\/'>Image\/PDF and Audio\/Video Supervised Concatenate Tutorial<\/a>.<\/p-->\n<hr>\n<p id='i\/pdfa\/vsmt'>Previous relevant <a target=_blank title='Image\/PDF and Audio\/Video Supervised Multiple Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image\/pdf-and-audio\/video-supervised-multiple-tutorial\/'>Image\/PDF and Audio\/Video Supervised Multiple Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image\/PDF and Audio\/Video Supervised Multiple Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/media_multiple.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Multiple Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image\/PDF and Audio\/Video Supervised Multiple Tutorial<\/p><\/div>\n<p>Back at <a title='Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial' href='#i\/pdfa\/vsat'>Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial<\/a> we had an assumption going that there would be a one to one correspondence of &#8230;<\/p>\n<ul>\n<li>input media file &#8230; to &#8230;<\/li>\n<li>output media file<\/li>\n<\/ul>\n<p> &#8230; but there are quite a few scenarios where a user wants &#8230;<\/p>\n<ul>\n<li>several input media files &#8230; to end up as &#8230;<\/li>\n<li>one output media file<\/li>\n<\/ul>\n<p> &#8230; and today we cater for &#8230;<\/p>\n<ul>\n<li>several input image media files &#8230; to end up as &#8230;\n<ol>\n<li>one output animated GIF<\/li>\n<li>one output video<\/li>\n<li>one output PDF<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; with more ideas to be tackled in days to come, based on the user involving a &#8220;+&#8221; character in their Input Media Textbox entries.  Then it is likely that the user will browse for multiple local computer files <font color=red>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n&lt;input type=file accept=\".pdf,image\/*,video\/*,audio\/*\" <font color=blue><a target=_blank title='input capture' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Attributes\/capture#:~:text=The%20capture%20attribute%20is%20supported,of%20one%20of%20those%20types.&#038;text=The%20user%2Dfacing%20camera%20and%2For%20microphone%20should%20be%20used.'>capture<\/a><\/font> <font color=red>multiple<\/font>&gt;&lt;\/input&gt;<br \/>\n<\/code><\/p>\n<p>For today, here is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php----GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php----GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> and helped out by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---------------------GETME\" title=\"tutorial_to_animated_gif.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---------------------GETME\" title=\"tutorial_to_animated_gif.php\">tutorial_to_animated_gif.php<\/a> animated GIF creator web application, or just use the Email functionality via <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\">live run<\/a> link.<\/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\/new-image\/pdf-and-audio\/video-supervised-multiple-tutorial\/'>New Image\/PDF and Audio\/Video Supervised Multiple Tutorial<\/a>.<\/p-->\n<hr>\n<p id='i\/pdfa\/vsat'>Previous relevant <a target=_blank title='Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image\/pdf-and-audio\/video-supervised-aesthetics-tutorial\/'>Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/ffmpeg_supervisor_better_look.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image\/PDF and Audio\/Video Supervised Aesthetics Tutorial<\/p><\/div>\n<p>That work of yesterday&#8217;s &#8230;<\/p>\n<ul>\n<li><a target=_blank title='Button Versus Input Type Equals Button Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/Button Versus Input Type Equals Button Primer Tutorial\/'>Button Versus Input Type Equals Button Primer Tutorial<\/a>&#8216;s button element improved approach to working with email addresses in consort with window.<a target=_blank title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp'>localStorage<\/a> &#8220;memory&#8221; (even between sessions) &#8230; combines with &#8230;<\/li>\n<li>the recent work of <a title='Image\/PDF and Audio\/Video Supervised Conversions Tutorial' href='#i\/pdfa\/vsct'>Image\/PDF and Audio\/Video Supervised Conversions Tutorial<\/a> &#8230; &#8220;sprinkled with&#8221; &#8230;<\/li>\n<li>some CSS aesthetic improvements &#8230;<br \/>\n<code><br \/>\n&lt;style&gt;<br \/>\n  input[type=text] { background-color: #f0f0f0;  border-radius: 5px; }<br \/>\n  input[type=submit] { font-size: 18px; border-radius: 20px; }<br \/>\n  button { font-size: 18px; border-radius: 20px; }<br \/>\n  div[contenteditable=true] { font-size: 14px; border-radius: 5px; }<br \/>\n  table { border-radius: 25px; }<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><br \/>\n &#8230; add onto various bits of inline CSS styling <font color=blue>such as<\/font> &#8230;<br \/>\n<code><br \/>\n&lt;body <font color=blue>style=\"background: linear-gradient(to left, #ffffff 20%, #ffefba 80%); \"<\/font>&gt;<br \/>\n<\/code><br \/>\n &#8230; and &#8230;<\/li>\n<li>some mobile platform functionality and emoji display improvements<\/li>\n<\/ul>\n<p> &#8230; to give a bit of a makeover to our &#8220;Media&#8221; conversions web application, today.<\/p>\n<p>Why emojis (as such) regarding &#8220;mobile&#8221; (platforms only)?  Well, there is a &#8220;behind the scenes&#8221; dual purpose side to this web application on &#8220;mobile&#8221; platforms for two reasons &#8230;<\/p>\n<ol>\n<li>&#8220;mobile&#8221; platforms do not support our <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> nor <a target=_blank title='ImageMagick Image Conversion' href='https:\/\/imagemagick.org\/'>ImageMagick<\/a> conversion &#8220;helpers&#8221; &#8230; and &#8230;<\/li>\n<li>called &#8220;capture&#8221; attribute of the called Local File Browsing opens the door to a user capturing their media via their smart device, and the natural urge here to share via email<\/li>\n<\/ol>\n<p> &#8230; are both reasons the web application might be more apt for your &#8220;mobile&#8221; users to take a photo (we use emoji &amp;#129331; &#129331;) and then email (we use emoji &amp;#128231; &#128231;) and remind the user of this possibility, because their gaze is quite likely to fall onto these two emoji concepts on the screen.  Meanwhile, in the code, we&#8217;ve tweaked things so that the conversion half of the web application&#8217;s functionality is not essential, but leave the &#8220;output&#8221; half of the web application in even for &#8220;mobile&#8221; users because a web application is what it is, for a user to work it as they will.<\/p>\n<p>And what of the &#8220;command line&#8221; PHP &#8220;mode of use&#8221; for this web application?  Well, we recommend you download and use <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/convert_audiovideo_please.ksh-GETME\" title=\"The changed\">the cloned<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/convert_audiovideo_please.ksh-GETME\" title=\"The changed\">convert_audiovideo_please.ksh<\/a> Korn Shell script that can be a &#8220;listener&#8221; for downloaded media off those email attachments (sent to emailees).  You could execute this &#8220;listener&#8221; as a macOS or Linux backup process via &#8230;<\/p>\n<p><code><br \/>\nksh convert_audiovideo_please.ksh &<br \/>\n<\/code><\/p>\n<p>And so, here is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php---GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php---GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> or just use the Email functionality via <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\">live run<\/a> link.<\/p>\n<p>Also for the Document Conversion web application that makeover is very similar whereby <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_textutil_convert.php------GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_textutil_convert.php------GETME\" title=\"macos_textutil_convert.php\">macos_textutil_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> or just use the Email functionality via <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_textutil_convert.php\">Document Conversion live run<\/a> link.<\/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\/new-image\/pdf-and-audio\/video-supervised-conversions-tutorial\/'>New Image\/PDF and Audio\/Video Supervised Conversions Tutorial<\/a> ...<\/p>\n\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='i\/pdfa\/vsct'>Previous relevant <a target=_blank title='Image\/PDF and Audio\/Video Supervised Conversions Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image\/pdf-and-audio\/video-supervised-conversions-tutorial\/'>Image\/PDF and Audio\/Video Supervised Conversions Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"Image\/PDF and Audio\/Video Supervised Conversions Tutorial\"]<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image\/PDF and Audio\/Video Supervised Conversions Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/imagemagick_img_pdf.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Conversions Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>Yesterday's <a title='Audio and Video Supervised Conversions Primer Tutorial' href='#avscpt'>Audio and Video Supervised Conversions Primer Tutorial<\/a> \"Media Conversions\" web application started with ...<\/p>\n\n\n\n\n\n<ul>\n\n\n<li>audio<\/li>\n\n\n\n\n<li>video<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p> ... using the <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> \"middle audio\/video converter player\", and for today's work we want to add ...<\/p>\n\n\n\n\n\n<ul>\n\n\n<li>image<\/li>\n\n\n\n\n<li>PDF<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p> ... that \"PDF\" representing the online world's \"hardcopy\" (or printout) format of most popularity that can include imagery and text.<\/p>\n\n\n\n\n\n<p>In order to support these two new \"media\" forms, we need to remind you of the stupendous <a target=_blank title='ImageMagick Image\/PDF Conversion' href='https:\/\/imagemagick.org\/'>ImageMagick<\/a> product we installed on our local macOS Mojave 10.14.5 (MacBook Pro) computer via ...<\/p>\n\n\n\n<code>\n$ brew install imagemagick\n$ brew install ghostscript\n<\/code>\n\n\n\n<p>Involving PDF in the mix is an important step also, because it is where that <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/macos-document-conversion-primer-tutorial\/' title='MacOS Document Conversion Primer Tutorial'>\"Document\" woooooorrrrllllld<\/a> can meet this \"Media\" woooooorrrrrlllld, to the extent that in a two part conversion you could convert a video via an animated GIF to a PDF (but beware the size of resultant media files ... hence us not offering all this functionality up at the public rjmprogramming.com.au domain web server).<\/p>\n\n\n\n\n\n<p>Let's tabulate which helper helps out where ...<\/p>\n\n\n\n\n\n<table style=width:100%;>\n\n\n<tr>\n\n<th>From Media<\/th>\n\n\n\n<th>To Media<\/th>\n\n\n\n<th>Helper (and special switches)<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Video<\/td>\n\n\n\n<td>Image (ie. Animated GIF most likely)<\/td>\n\n\n\n<td>ffmpeg (<i>-i<\/i>)<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>PDF<\/td>\n\n\n\n<td>Image (ie. Animated GIF most likely)<\/td>\n\n\n\n<td>ImageMagick (<i>-delay 200<\/i>)<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Audio<\/td>\n\n\n\n<td>Audio<\/td>\n\n\n\n<td>ffmpeg<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Video<\/td>\n\n\n\n<td>Video<\/td>\n\n\n\n<td>ffmpeg<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Video<\/td>\n\n\n\n<td>Audio<\/td>\n\n\n\n<td>ffmpeg<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Audio<\/td>\n\n\n\n<td>Video<\/td>\n\n\n\n<td>ffmpeg<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Image<\/td>\n\n\n\n<td>Image<\/td>\n\n\n\n<td>ImageMagick<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>Image<\/td>\n\n\n\n<td>PDF<\/td>\n\n\n\n<td>ImageMagick<\/td>\n\n<\/tr>\n\n\n<\/table>\n\n\n\n\n\n<p> ... and one wonders what happens with other combinations?!<\/p>\n\n\n\n\n\n<p>Again, you'll notice with our blog posting title there being no mention of macOS or Mac OS X today.  Yes, today's \"media\" helper is Open Source across operating systems and we so far are not checking that you have installed <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> and\/or  <a target=_blank title='ImageMagick Image\/PDF Conversion' href='https:\/\/imagemagick.org\/'>ImageMagick<\/a> or not.  For now, it is a \"suck it and see\" approach, and it would be useful to download <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php--GETME\" title=\"The changed\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php--GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a>.  This PHP calls on our File API friend, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html----------------GETME\">a changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html----------------GETME\">client_browsing.htm<\/a> local file browser web application.<\/p>\n\n \n\n<!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/imagepdf-and-audiovideo-supervised-conversions-tutorial\/'>Image\/PDF and Audio\/Video Supervised Conversions Tutorial<\/a>.<\/p-->\n<hr>\n<p id='avscpt'>Previous relevant <a target=_blank title='Audio and Video Supervised Conversions Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/audio-and-video-supervised-conversions-primer-tutorial\/'>Audio and Video Supervised Conversions 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\/macos_ffmpeg_convert.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Audio and Video Supervised Conversions Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/ffmpeg_supervised.jpg\" title=\"Audio and Video Supervised Conversions Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Audio and Video Supervised Conversions Primer Tutorial<\/p><\/div>\n<p>Were you here, or remember, the blog posting called <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/macos-document-conversion-primer-tutorial\/' title='MacOS Document Conversion Primer Tutorial'>MacOS Document Conversion Primer Tutorial<\/a>, when we surmised &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/macos-document-conversion-primer-tutorial\/'>\n<p>A good thing about a &#8220;version control&#8221; or &#8220;source control&#8221; system is that you can &#8230;<\/p>\n<p><\/p>\n<ul>\n<li>&#8220;pick up&#8221; from any version &#8230;<\/li>\n<li>&#8220;clone&#8221; to another name &#8230;<\/li>\n<li>&#8220;branch off&#8221; immediately into a new version &#8230;<\/li>\n<\/ul>\n<p><\/p>\n<p> &#8230; to effectively &#8220;clone&#8221; the suitable progress point from a previous project as the start to a new project.<\/p>\n<\/blockquote>\n<p> &#8230; ?  Well, yesterday&#8217;s <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/pandoc-document-conversion-email-tutorial\/' title='Pandoc Document Conversion Email Tutorial'>Pandoc Document Conversion Email Tutorial<\/a> felt like another such &#8220;cloning&#8221; possibility, as it felt like a &#8220;progress point&#8221; (to me and <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/nala.php' title='?'>Nala<\/a>).  Such &#8220;cloning&#8221;, to our mind, is a bit &#8220;over the top&#8221; if there is no good reason.  But we think there is.  Lately, we&#8217;ve been developing &#8220;Document&#8221; conversion software.  In Information Technology, under the banner of &#8220;document processing&#8221;, that work is of interest.  Another area of Information Technology software concerns media &#8230; to us, that being &#8230;<\/p>\n<ul>\n<li>image<\/li>\n<li>audio<\/li>\n<li>video<\/li>\n<\/ul>\n<p> &#8230; and it is in this &#8220;Media&#8221; field, starting out with just (the) &#8220;audio and video&#8221; (options) above, we feel we&#8217;d like to start developing &#8220;Media&#8221; conversion software, because we know of a brilliant Open Source suite of software called <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> that we want to work with here.  Though you might say we are &#8220;the hangers on<font size=1>ers<\/font>&#8221; in this arrangement, it is true in a lot of life&#8217;s work that getting to the smart stuff is not as easy as you&#8217;d think, and the better you can arrange it, the more efficient will the users of all this software feel.<\/p>\n<p>You&#8217;ll notice with our blog posting title there being no mention of macOS or Mac OS X today.  Yes, today&#8217;s &#8220;media&#8221; helper is Open Source across operating systems and we so far are not checking that you have installed <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> or not.  For now, it is a &#8220;suck it and see&#8221; approach.  But we do not want to install ffmpeg up at our public rjmprogramming.com.au domain web server, and so we write this &#8220;Media Conversion&#8221; software with the thinking that on your local computer you may install ffmpeg and find it then useful to download <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php-GETME\" title=\"The cloning\">the cloned<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/macos_ffmpeg_convert.php-GETME\" title=\"macos_ffmpeg_convert.php\">macos_ffmpeg_convert.php<\/a> PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a>.  This PHP calls on our File API friend, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html---------------GETME\">a changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html---------------GETME\">client_browsing.htm<\/a> local file browser web application.<\/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='#d49745' onclick='var dv=document.getElementById(\"d49745\"); 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='d49745' 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='#d49755' onclick='var dv=document.getElementById(\"d49755\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/imagemagick\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49755' 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='#d49776' onclick='var dv=document.getElementById(\"d49776\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/emoji\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49776' 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='#d49790' onclick='var dv=document.getElementById(\"d49790\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/multiple\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49790' 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='#d49799' onclick='var dv=document.getElementById(\"d49799\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/concatenate\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49799' 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='#d49807' onclick='var dv=document.getElementById(\"d49807\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/rate\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49807' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s Image\/PDF and Audio\/Video Supervised Concatenate Tutorial&#8216;s &#8230; &#8220;+&#8221; functionality to &#8230; concatenate &#8230; or &#8230; voiceover &#8230; is, today, joined by &#8230; you guessed it &#8230; &#8220;-&#8221; functionality to &#8230; flatten animated GIF &#8230; or &#8230; flatten video &#8230; &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagepdf-and-audiovideo-supervised-flatten-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":[2,4,12,14,29,37],"tags":[2419,69,83,113,1993,174,2503,2509,234,3318,263,281,385,415,3371,2730,576,590,1658,652,677,2020,2114,2408,3367,744,760,767,2092,877,913,932,997,3369,2024,1176,1209,1212,1222,1319,3370,3368,1369,3348],"class_list":["post-49807","post","type-post","status-publish","format-standard","hentry","category-ajax","category-animation","category-elearning","category-event-driven-programming","category-operating-system","category-tutorials","tag-aesthetics","tag-ajax","tag-animated-gif","tag-audio","tag-browse","tag-button","tag-clone","tag-cloning","tag-command-line","tag-concatenate","tag-conversion","tag-css","tag-emoji","tag-ffmpeg","tag-filmstrip","tag-formdata","tag-html","tag-image","tag-imagemagick","tag-javascript","tag-korn-shell","tag-linear-gradient","tag-listener","tag-local-storage","tag-local-web-browser","tag-mamp","tag-media","tag-memory","tag-multiple","tag-open-source","tag-pdf","tag-php","tag-programming","tag-rate","tag-session","tag-source-control","tag-style","tag-styling","tag-supervisor","tag-tutorial","tag-usain-bolt","tag-version","tag-video","tag-voiceover"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/49807"}],"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=49807"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/49807\/revisions"}],"predecessor-version":[{"id":49816,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/49807\/revisions\/49816"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=49807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=49807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=49807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}