{"id":49817,"date":"2020-08-03T03:01:38","date_gmt":"2020-08-02T17:01:38","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=49817"},"modified":"2020-08-02T14:42:38","modified_gmt":"2020-08-02T04:42:38","slug":"imagepdf-and-audiovideo-supervised-rotation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagepdf-and-audiovideo-supervised-rotation-tutorial\/","title":{"rendered":"Image\/PDF and Audio\/Video Supervised Rotation 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 Rotation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/media_rotation_flipflop.jpg\" title=\"Image\/PDF and Audio\/Video Supervised Rotation Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image\/PDF and Audio\/Video Supervised Rotation Tutorial<\/p><\/div>\n<p>It is the role of software to perform tasks for the user that fall into categories &#8230;<\/p>\n<ul>\n<li>quite difficult for the user<\/li>\n<li>inaccessible for the user<\/li>\n<li>tedious and\/or too boring for the user<\/li>\n<\/ul>\n<p> &#8230; in order to be useful.   Of course, there are loads of other roles software has been put to, but we prefer the motivations above.<\/p>\n<p>With media applications it might solve a user requirement to &#8230;<\/p>\n<ul>\n<li>be able to rotate the media through the four quadrants (ie. 0 (default), 90, 180 and 270 degree rotations) &#8230;<\/li>\n<li>flop (mirror vertically)<\/li>\n<li>flip (mirror horizontally)<\/li>\n<\/ul>\n<p> &#8230; and today we offer a subset of all these possibilities via emoji button clicks in the header of the web application&#8217;s webpage.<\/p>\n<p>Both <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a> (Audio\/Video) and <a target=_blank title='ImageMagick Image Conversion' href='https:\/\/imagemagick.org\/'>ImageMagick<\/a> (Image\/PDF) media helpers support these concepts, though ImageMagick appears not to support rotations and flip nor rotations and flop, and ffmpeg appears not to support flop, though your own research and development may get you more thorough results.<\/p>\n<p>Both <a target=_blank title='ffmpeg Audio\/Video Conversion' href='https:\/\/ffmpeg.org\/'>ffmpeg<\/a>&#8216;s &#8220;ffmpeg&#8221; command (for Audio\/Video) and <a target=_blank title='ImageMagick Image Conversion' href='https:\/\/imagemagick.org\/'>ImageMagick<\/a>&#8216;s &#8220;convert&#8221; command (for Image\/PDF) media work for us via a (PHP code) pattern &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    exec($verb . \" \" . $switchone . \" \" . $filename . \" \" . $switchtwo . \" \" . $outnameis . $cmdsuff . \" &lt; \/tmp\/macos.yes &gt; macos_ffmpeg_convert.out 2&gt; macos_ffmpeg_convert.err\");<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; and it is with that PHP variable <i>$switchtwo<\/i> that has more of our attention with this work as per the table below &#8230;<\/p>\n<table style=\"width:100%;font-size:8px;\">\n<tr>\n<th>Helper<\/th>\n<th>Command<br \/>(regarding $verb)<\/th>\n<th style='width:33%;'>Rotation (in degrees)<br \/>(regarding $switchtwo for 90<br \/>180<br \/>270)<\/th>\n<th style='width:33%;'>Flop<br \/>(regarding $switchtwo for 90<br \/>180<br \/>270)<\/th>\n<th>Flip<br \/>(regarding $switchtwo)<\/th>\n<\/tr>\n<tr>\n<td>ffmpeg<\/td>\n<td>ffmpeg<\/td>\n<td> -vf &#8220;transpose=2&#8221; <br \/>&minus;vf&nbsp;&#8220;transpose=2,transpose=2&#8221;<br \/> -vf &#8220;transpose=1&#8221; <\/td>\n<td> -vf &#8220;transpose=0&#8221; <br \/>&minus;vf&nbsp;&#8220;transpose=0,transpose=0&#8221;<br \/> -vf &#8220;transpose=3&#8221; <\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Image<br \/>Magick<\/td>\n<td>convert<\/td>\n<td> -rotate 90 <br \/> -rotate 180 <br \/> -rotate 270 <\/td>\n<td> -flop <\/td>\n<td> -flip <\/td>\n<\/tr>\n<\/table>\n<p>Today&#8217;s work, then, adds onto 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> progress with <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\">today&#8217;s 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 we recommend you copy to a (local web server) 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-rotation-tutorial\/'>Image\/PDF and Audio\/Video Supervised Rotation 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='#d49817' onclick='var dv=document.getElementById(\"d49817\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/rotation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49817' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It is the role of software to perform tasks for the user that fall into categories &#8230; quite difficult for the user inaccessible for the user tedious and\/or too boring for the user &#8230; in order to be useful. Of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagepdf-and-audiovideo-supervised-rotation-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,2223,2224,2730,576,590,1658,652,677,2020,2114,2408,3367,744,760,767,2092,877,913,932,997,3369,1072,2024,1176,1209,1212,1222,1319,3370,3368,1369,3348],"class_list":["post-49817","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-flip","tag-flop","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-rotation","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\/49817"}],"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=49817"}],"version-history":[{"count":21,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/49817\/revisions"}],"predecessor-version":[{"id":49838,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/49817\/revisions\/49838"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=49817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=49817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=49817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}