{"id":59492,"date":"2023-05-26T03:01:34","date_gmt":"2023-05-25T17:01:34","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=59492"},"modified":"2023-05-26T08:37:47","modified_gmt":"2023-05-25T22:37:47","slug":"ffmpeg-and-imagemagick-and-pdfimages-media-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-and-imagemagick-and-pdfimages-media-tutorial\/","title":{"rendered":"Ffmpeg and ImageMagick and Pdfimages Media Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg and ImageMagick and Pdfimages Media Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/imagemagick_and_pdfimages_and_ffmpeg_media_manipulations.gif\" title=\"Ffmpeg and ImageMagick and Pdfimages Media Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg and ImageMagick and Pdfimages Media Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Ffmpeg Rotate Video Tutorial' href='#frvt'>Ffmpeg Rotate Video Tutorial<\/a> left you with &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-rotate-video-tutorial\/'><p>\nWe now present those four in &#8220;an expanded out&#8221; (at least on non-mobile) dropdown HTML element.  Maybe you can guess why?\n<\/p><\/blockquote>\n<p> &#8230; and today we are deploying the framework parts and two new media manipulation options regarding PDF that add to our PHP web application&#8217;s functionality.<\/p>\n<p>Operating system commands can be thought of to start with &#8230;<\/p>\n<ul>\n<li>an action item (to be precise a desktop software file specification) &#8230; and, what we often think is, like &#8230;<\/li>\n<li>the command&#8217;s &#8220;verb&#8221; part <font size=1>(as funny as that is to think of a &#8220;noun&#8221; sounding desktop software file specification being like a &#8220;verb&#8221;)<\/font> &#8230; verbs being action items in a sentence &#8230; down to being essential in any sentence &#8230; to the point a &#8220;verb&#8221; can be the whole sentence<\/li>\n<\/ul>\n<p>We want to add functionality by adding to our first &#8220;verb&#8221; &#8230;<\/p>\n<ul>\n<li><a style=vertical-align:top; target=_blank title=ffmpeg href='\/\/ffmpeg.org'>ffmpeg<\/a> &#8230; two more media manipulation &#8220;verb&#8221; stars today &#8230;<\/li>\n<li><a target=_blank title='ImageMagick software suite' href='https:\/\/www.imagemagick.org\/'>ImageMagick<\/a> (can help us with new &#8220;Images to PDF&#8221; option)<\/li>\n<li><a target=_blank title='Pdfimages' href='https:\/\/www.xpdfreader.com\/pdfimages-man.html'>pdfimages<\/a> (can help us with new &#8220;PDF to Images&#8221; option)<\/li>\n<\/ul>\n<p> &#8230; and to help the &#8220;framework&#8221; ahead of &#8220;shelling peas&#8221; we lean on the experience we got from the <a target=_blank title='Animated GIF Creation on Windows MAMP via PDF Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-creation-on-windows-mamp-via-pdf-tutorial\/'>Animated GIF Creation on Windows MAMP via PDF Tutorial<\/a> thread of blog postings to deal with &#8230;<\/p>\n<ul>\n<li>software paths<\/li>\n<li>presenting two new &#8220;verb&#8221; ideas &#8230; and us being so fond of dropdowns, we decided to try, for our first time &#8230;\n<ol>\n<li>start to use three HTML option CSS <i>text-align<\/i> style choices being left (for ffmpeg), center (for ImageMagick) and right (for pdfimages) &#8230; as in &#8230;<br \/>\n<select size=7 data-onchange=process(this.value,this); style=display:inline-block;font-size:8px; id=schoices><option style=text-align:center; id=mydefopt title='Add Voiceover Audio to Video' value=''>&#10549; Image&#11015;Magick &#10550;<\/option><option value='Add Voiceover Audio to Video'> Add Voiceover Audio to Video&nbsp;<\/option><option style='text-align:center;' value='Images to PDF'>  Images to PDF<\/option><option style='text-align:right;' value='PDF to Images'>  PDF to Images<\/option><option value='Burn subtitles'>  Burn subtitles<\/option><option value='Concat demuxer'>  Concat demuxer<\/option><option value='Rotate a video'>  Rotate a video<\/option><\/select><br \/>\n &#8230; within &#8230;<\/p>\n<h4 id=myh1 style=vertical-align:top;><span id=mainspan style=vertical-align:top;>Add Voiceover Audio to Video<\/span><span style=vertical-align:top;> via <\/span><a style=vertical-align:top; target=_blank title=ffmpeg href='\/\/ffmpeg.org'>ffmpeg<\/a>&nbsp;<select size=7 data-onchange=process(this.value,this); style=display:inline-block;font-size:8px; id=schoices><option style=text-align:center; id=mydefopt title='Add Voiceover Audio to Video' value=''>&#10549; Image&#11015;Magick &#10550;<\/option><option value='Add Voiceover Audio to Video'> Add Voiceover Audio to Video&nbsp;<\/option><option style='text-align:center;' value='Images to PDF'>  Images to PDF<\/option><option style='text-align:right;' value='PDF to Images'>  PDF to Images<\/option><option value='Burn subtitles'>  Burn subtitles<\/option><option value='Concat demuxer'>  Concat demuxer<\/option><option value='Rotate a video'>  Rotate a video<\/option><\/select>&nbsp;<a style=vertical-align:top; target=_blank title=pdfimages href='\/\/www.xpdfreader.com\/pdfimages-man.html'>pdfimages<\/a><\/h4>\n<p> &#8230;<br \/>\n<code><br \/>\n&lt;select size=7 onchange=process(this.value,this); style=display:inline-block;font-size:8px; id=schoices&gt;&lt;option style=text-align:center; id=mydefopt title='Add Voiceover Audio to Video' value=''&gt;&amp;#10549; Image&amp;#11015;Magick &amp;#10550;&lt;\/option&gt;&lt;option value='Add Voiceover Audio to Video'&gt; Add Voiceover Audio to Video&nbsp;&lt;\/option&gt;&lt;option style='text-align:center;' value='Images to PDF'&gt;  Images to PDF&lt;\/option&gt;&lt;option style='text-align:right;' value='PDF to Images'&gt;  PDF to Images&lt;\/option&gt;&lt;option value='Burn subtitles'&gt;  Burn subtitles&lt;\/option&gt;&lt;option value='Concat demuxer'&gt;  Concat demuxer&lt;\/option&gt;&lt;option value='Rotate a video'&gt;  Rotate a video&lt;\/option&gt;&lt;\/select&gt;<br \/>\n<\/code><br \/>\n &#8230; and then in order to offer the &#8220;center&#8221; ImageMagick be a link back to the product we introduce some <font color=blue>new overlay code<\/font> &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  function overlay() {<br \/>\n   origval=document.getElementById('schoices').value;<br \/>\n   var rect=document.getElementById('fcommand').getBoundingClientRect();<br \/>\n   document.getElementById('moreb').style.position='absolute';<br \/>\n   document.getElementById('moreb').style.left='' + rect.left + 'px';<br \/>\n   document.getElementById('moreb').style.top='' + rect.top + 'px';<br \/>\n   document.getElementById('moreb').style.width='96%'; \/\/' + rect.width + 'px';<br \/>\n   document.getElementById('moreb').style.height='' + rect.height + 'px';<br \/>\n   document.getElementById('moreb').style.border='1px solid black';<br \/>\n   document.getElementById('moreb').style.paddingLeft='20px';<br \/>\n   document.getElementById('moreb').style.backgroundColor='#f9f9f9';<br \/>\n   document.getElementById('fcommand').style.opacity='0.0';<br \/>\n   document.getElementById('fcommand').style.cursor='pointer';<br \/>\n   document.getElementById('moreb').innerHTML='&lt;span id=precmds&gt;&lt;\/span&gt;&lt;span id=verb&gt;ffmpeg\" . $ffmpegsuf . \"&lt;\/span&gt; &lt;span id=prescbi&gt;&lt;\/span&gt;&lt;span id=minusi&gt; -i &lt;\/span&gt;&lt;span id=scbi&gt;&lt;iframe onload=checkif(this,\\\"inv.mp4\\\"); scrolling=no frameborder=0 id=cbi data-type=file data-value=inv.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:92px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=69075964842271&left=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt; &lt;span id=betweenis&gt;&lt;\/span&gt; &lt;span id=secondi&gt;-i &lt;span id=scbix&gt;&lt;iframe onload=checkiftwo(this,\\\"inva.mp4\\\"); scrolling=no frameborder=0 id=cbix data-type=file data-value=inva.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:106px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=69075964842271&right=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt;&lt;\/span&gt; &lt;span id=sswitches&gt;-c copy -map 0:v:0 -map 1:a:0 -shortest&lt;\/span&gt; out.mp4 &gt; &lt;a target=_blank title=ffimpdf.bad onclick=getvb(); style=cursor:pointer;text-decoration:underline; data-href=.\/ffimpdf.bad&gt;ffimpdf.bad&lt;\/a&gt;';<br \/>\n   if (firstdivih == '') { firstdivih=document.getElementById('moreb').innerHTML; }<br \/>\n   if (firstbutval == '') { firstbutval=document.getElementById('mysub').value; }<br \/>\n   document.getElementById('schoices').style.display='inline-block';<br \/>\n<br \/> <br \/>\n   <font color=blue>rect=document.getElementById('schoices').getBoundingClientRect();<br \/>\n<br \/> <br \/>\n   if (eval('' + rect.height) &gt; 100 || 1 == 1) {<br \/>\n   document.getElementById('doverlay').style.position='absolute';<br \/>\n   document.getElementById('doverlay').style.left='' + rect.left + 'px';<br \/>\n   document.getElementById('doverlay').style.top='' + rect.top + 'px';<br \/>\n   document.getElementById('doverlay').style.width='' + rect.width + 'px';<br \/>\n   if (eval('' + rect.height) &lt; 30) {<br \/>\n   document.getElementById('doverlay').style.height='' + rect.height + 'px';<br \/>\n   } else {<br \/>\n   document.getElementById('doverlay').style.height='' + eval(eval('' + rect.height) \/ eval('' + document.getElementById('schoices').size)) + 'px';<br \/>\n   }<br \/>\n   document.getElementById('doverlay').style.zIndex='96';<br \/>\n   document.getElementById('doverlay').style.textAlign='center';<br \/>\n   document.getElementById('doverlay').style.display='block';<br \/>\n   document.getElementById('doverlay').title=document.getElementById('mydefopt').title;<br \/>\n   \/\/document.getElementById('mydefopt').style.fontColor='transparent';<br \/>\n   document.getElementById('mydefopt').innerHTML='';<br \/>\n   setInterval(fhoc, 1000);<br \/>\n   }<\/font><br \/>\n<br \/> <br \/>\n  }<br \/>\n<br \/> <br \/>\n  <font color=blue>function fhoc() {<br \/>\n   var rectx=document.getElementById('schoices').getBoundingClientRect();<br \/>\n   document.getElementById('doverlay').style.left='' + rectx.left + 'px';<br \/>\n   document.getElementById('doverlay').title=document.getElementById('mydefopt').title;<br \/>\n   if (document.getElementById('scbi')) {<br \/>\n     if (document.getElementById('scbi').innerHTML.indexOf('&lt;') == -1) {<br \/>\n      if (document.getElementById('scbi').innerHTML.trim().indexOf(' ') != -1) {<br \/>\n        if (document.getElementById('scbi').innerHTML.trim().indexOf(String.fromCharCode(34)) == -1) {<br \/>\n          document.getElementById('scbi').innerHTML=String.fromCharCode(34) + document.getElementById('scbi').innerHTML.trim() + String.fromCharCode(34);<br \/>\n        }<br \/>\n      }<br \/>\n     }<br \/>\n   }<br \/>\n   if (document.getElementById('scbix')) {<br \/>\n     if (document.getElementById('scbix').innerHTML.indexOf('&lt;') == -1) {<br \/>\n      if (document.getElementById('scbix').innerHTML.trim().indexOf(' ') != -1) {<br \/>\n        if (document.getElementById('scbix').innerHTML.trim().indexOf(String.fromCharCode(34)) == -1) {<br \/>\n          document.getElementById('scbix').innerHTML=String.fromCharCode(34) + document.getElementById('scbix').innerHTML.trim() + String.fromCharCode(34);<br \/>\n        }<br \/>\n      }<br \/>\n     }<br \/>\n   }<br \/>\n  }<\/font><br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<\/ol>\n<\/li>\n<li>Javascript to set up the HTML div contenteditable=true look for these two new options &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n    if (newv == 'PDF to Images') {<br \/>\n       document.getElementById('moreb').innerHTML=firstdivih.replace(' out.mp4',' \" . $minuspng . \"');<br \/>\n       document.getElementById('secondi').innerHTML='';<br \/>\n       document.getElementById('sswitches').innerHTML=\\\"&lt;span id=sfolder contenteditable=false&gt;newfolder_\" . rand(0,784534) . str_replace(\"\\\\\",\"\\\\\\\\\",$ddn) . \"\\\" + '&lt;\/span&gt;ideas';<br \/>\n<br \/>\n       document.getElementById('precmds').innerHTML=' ';<br \/>\n       document.getElementById('verb').innerHTML='\" . $pdfimages . $pdfimagessuf . \"';<br \/>\n       document.getElementById('scbi').innerHTML=document.getElementById('scbi').innerHTML.replace(\/inv\\.mp4\/g,'inv.pdf      ');<br \/>\n       document.getElementById('minusi').innerHTML=' -j ';<br \/>\n<br \/>\n       document.getElementById('mysub').value=newv;<br \/>\n    } else if (newv == 'Images to PDF') {<br \/>\n       document.getElementById('moreb').innerHTML=firstdivih.replace('out.mp4','out.pdf');<br \/>\n<br \/>\n       document.getElementById('precmds').innerHTML=' ';<br \/>\n       document.getElementById('secondi').innerHTML='';<br \/>\n       document.getElementById('verb').innerHTML='\" . $magickverb . $magicksuf . \"';<br \/>\n       document.getElementById('sswitches').innerHTML='-auto-orient';<br \/>\n       document.getElementById('sswitches').title='To perform a folder of images (only, we suggest) right click or two finger guesture to left and enter the folder name only';<br \/>\n       document.getElementById('scbi').innerHTML=document.getElementById('scbi').innerHTML.replace(\/inv\\.mp4\/g,'inv.jpg      ');<br \/>\n       document.getElementById('minusi').innerHTML='';<br \/>\n       document.getElementById('scbi').setAttribute('contenteditable', true);<br \/>\n       document.getElementById('scbi').onblur=function(event) {  if (document.getElementById('mydefopt').title == 'Images to PDF') {  if (event.target.innerHTML.replace(\/\\&nbsp\\;\/g,' ').trim() == '') { event.target.innerHTML='folder' + \\\"\" . str_replace(\"\\\\\",\"\\\\\\\\\",$ddn) . \"*\\\";  } if (event.target.innerHTML.toLowerCase().indexOf('.txt') == -1) {  if (event.target.innerHTML.indexOf('.') != -1) { document.getElementById('ifs').innerHTML+='&lt;iframe id=voaskfor' + ifile + ' style=display:none; src=\\\".\/voiceover.php?infilegetsize=' + encodeURIComponent(listtxt + ';' + event.target.innerHTML) + '\\\"&gt;&lt;\/iframe&gt;';  ifile++;    if (document.getElementById('moreb').title.indexOf(\\\"file '\\\" + event.target.innerHTML.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'') + \\\"'\\\") == -1) {     document.getElementById('moreb').title+=String.fromCharCode(10) + \\\"file '\\\" + event.target.innerHTML.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'') + \\\"'\\\"; } } } event.target.innerHTML=listtxt; if (document.getElementById('minusi')) { document.getElementById('minusi').innerHTML='';  }  }  };<br \/>\n       document.getElementById('moreb').onblur=function(event) {  if (document.getElementById('mydefopt').title == 'Images to PDF') { if (document.getElementById('minusi')) { var thingos=document.getElementById('minusi').innerHTML.replace(\/\\&nbsp\\;\/g,' ').trim().split('-i '); if (thingos.length &gt; 1) { if (thingos[1].trim() != '' && (thingos[1] + '~').toLowerCase().indexOf('.txt~') == -1) { spanfill(thingos[1]); }  } document.getElementById('minusi').innerHTML='';  }  if (!document.getElementById('scbi')) { event.target.innerHTML=event.target.innerHTML.replace('&lt;span id=\\\"between', '&lt;span id=scbi contenteditable=true&gt;' + listtxt + '&lt;\/span&gt; &lt;span id=\\\"between');  putbackonblur(); if (event.target.innerHTML.indexOf('&gt; -i &lt;\/span&gt;&lt;span id=\\\"scbi\\\"') == -1) { event.target.innerHTML=event.target.innerHTML.replace('&lt;\/span&gt;' + event.target.innerHTML.split('&lt;span id=\\\"scbi\\\"')[0].split('&lt;\/span&gt;')[-1 + eval(event.target.innerHTML.split('&lt;span id=\\\"scbi\\\"')[0].split('&lt;\/span&gt;').length)],'&lt;\/span&gt;');   } } }  };<br \/>\n       document.getElementById('moreb').oncontextmenu=function(event) { document.getElementById('scbi').innerHTML='folder' + \\\"\" . str_replace(\"\\\\\",\"\\\\\\\\\",$ddn) . \"*\\\"; };<br \/>\n<br \/> <br \/>\n       document.getElementById('mysub').value=newv;<br \/>\n    }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<li>the performing of those two new &#8220;verb&#8221; ideas &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n   $pfolder='';<br \/>\n   $ppdf='';<br \/>\n<br \/>\n   \/\/ ... later ...<br \/>\n   $cmdis=str_replace('+',' ',urldecode($_GET['fcommand']));<br \/>\n   if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') {<br \/>\n     if ($ffmpegpre != '' && strpos($cmdis, 'ffmpeg.') !== false && strpos($cmdis, $ffmpegpre) === false) {<br \/>\n       $cmdis=str_replace('ffmpeg.', $ffmpegpre . 'ffmpeg.', $cmdis);<br \/>\n     }<br \/>\n     if ($magickpre != '' && strpos($cmdis, $magickverb . '.') !== false && strpos($cmdis, $magickpre) === false) {<br \/>\n       $cmdis=str_replace($magickverb . '.', $magickpre . $magickverb . '.', $cmdis);<br \/>\n     }<br \/>\n     if ($pdfimagespre != '' && strpos($cmdis, 'pdfimages.') !== false && strpos($cmdis, $pdfimagespre) === false) {<br \/>\n       $cmdis=str_replace('pdfimages.', $pdfimagespre . 'pdfimages.', $cmdis);<br \/>\n     }<br \/>\n   }<br \/>\n<br \/>\n   $precmd=explode('&gt;', $cmdis);<br \/>\n   if (strpos($cmdis, 'pdfimages') !== false && strpos($cmdis, 'newfolder_') !== false) {<br \/>\n     $pfolder='newfolder_' . explode(DIRECTORY_SEPARATOR, explode('newfolder_', $cmdis)[1])[0];<br \/>\n     $beforep=explode($pfolder, $cmdis)[0];<br \/>\n     $afterp=explode($pfolder, $cmdis)[1];<br \/>\n     while (file_exists($pfolder)) {<br \/>\n       $pfolder='newfolder' . '_' . explode('newfolder', $pfolder)[1];<br \/>\n       $cmdis=$beforep . $pfolder . $afterp;<br \/>\n     }<br \/>\n     if (!file_exists($pfolder)) { mkdir($pfolder); }<br \/>\n   }<br \/>\n<br \/>\n   \/\/ ... later ...<br \/>\n      $outf=$subcmd[1];<br \/>\n   \/\/ ... later ...<br \/>\n      if (strpos(strtolower(trim($outf) . '~'), '.pdf~') !== false) {<br \/>\n        $ppdf=trim($outf);<br \/>\n      }<br \/>\n<br \/>\n   \/\/ ... later ...<br \/>\n   $rs=shell_exec($cmdis);<br \/>\n<br \/>\n   \/\/ ... later ...<br \/>\n   if ($pfolder != '') {<br \/>\n     $rs.=\"&lt;br&gt;&lt;br&gt;\";<br \/>\n     foreach (glob($pfolder . DIRECTORY_SEPARATOR . '*.*') as $ifilename) {<br \/>\n       $rs.='&lt;img title=\"' . $ifilename . '\" src=\"' . $ifilename . '?rand=' . rand(0,7654532) . '\"&gt;&lt;\/img&gt;';<br \/>\n     }<br \/>\n   }<br \/>\n   if ($ppdf != '') {<br \/>\n     $outf='';<br \/>\n     $rs.=\"&lt;br&gt;&lt;br&gt;&lt;iframe style='width:98%;height:800px;' src='\" . $ppdf . \"?rand=\" . rand(0,7654532) . \"' title='\" . $ppdf . \"'&gt;&lt;\/iframe&gt;\";<br \/>\n   }<br \/>\n<\/code><br \/>\n?&gt;\n<\/li>\n<\/ul>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php--------GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php--------GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/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\/ffmpeg-and-imagemagick-and-pdfimages-media-tutorial\/'>Ffmpeg and ImageMagick and Pdfimages Media Tutorial<\/a>.<\/p-->\n<hr>\n<p id='frvt'>Previous relevant <a target=_blank title='Ffmpeg Rotate Video Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-rotate-video-tutorial\/'>Ffmpeg Rotate Video Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Rotate Video Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rotate_a_video.jpg\" title=\"Ffmpeg Rotate Video Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Rotate Video Tutorial<\/p><\/div>\n<p>It&#8217;s getting closer to &#8220;shelling peas&#8221;, are today&#8217;s &#8220;Rotate a video via <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a>&#8221; changes, but we are not there yet.   Yes, most programmers want to be &#8220;shelling peas&#8221; adding functionality to web applications, once they have set up a framework in which they are happy to work.  Yesterday&#8217;s <a title='Ffmpeg Concat Demuxer Tutorial' href='#fcdt'>Ffmpeg Concat Demuxer Tutorial<\/a> <a href='#pdefence'>&#8220;defence talk&#8221;<\/a> is getting us closer to that &#8220;shelling peas&#8221; &#8220;homeostasis feel&#8221; <font size=1>(with an &#8220;Intranet&#8221; pike, no doubt?!)<\/font> as you can see from a Javascript &#8220;Rotate a video&#8221; code snippet below &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nif (newv == 'Rotate a video') {<br \/>\n       document.getElementById('moreb').innerHTML=firstdivih;<br \/>\n<br \/>\n       document.getElementById('precmds').innerHTML=' ';<br \/>\n       document.getElementById('secondi').innerHTML='';<br \/>\n<br \/> <br \/>\n       document.getElementById('sswitches').innerHTML='&lt;span id=notranspose contenteditable=false&gt;-vf \\\"transpose=&lt;\/span&gt;&lt;span id=transpose contenteditable=true&gt;1&lt;\/span&gt;&lt;span id=nottranspose contenteditable=false&gt;\\\" &lt;\/span&gt;';<br \/>\n       document.getElementById('sswitches').title='\" . str_replace(\"\\n\", \"' + String.fromCharCode(10) + '\",$rotateadvice) . \"';<br \/>\n       document.getElementById('sswitches').oncontextmenu=function(event) { alert(event.target.title); };<br \/>\n<br \/>\n       document.getElementById('mysub').value=newv;<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; effectively straightjacketing the crucial &#8230;<\/p>\n<p><code><br \/>\n -vf \"transpose=1\"<br \/>\n<\/code><\/p>\n<p> &#8230; ffmpeg switch definition, by the user, to changing that <i>1<\/i> above as per the hover over advice, to help the user, straight from <a target=_blank href='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'>Mux Video and Audio from another Video<\/a>, thanks, to advise &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$rotateadvice=\"Rotate a video<br \/>\n<br \/>\nRotate 90 clockwise:<br \/>\n<br \/>\nffmpeg -i in.mov -vf \\\"transpose=1\\\" out.mov<br \/>\nFor the transpose parameter you can pass:<br \/>\n<br \/>\n0 = 90CounterCLockwise and Vertical Flip (default)<br \/>\n1 = 90Clockwise<br \/>\n2 = 90CounterClockwise<br \/>\n3 = 90Clockwise and Vertical Flip<br \/>\n<br \/>\nUse -vf \\\"transpose=2,transpose=2\\\" for 180 degrees.\";<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p>Yes, the user can still put a bad entry there, but at least the web application has attempted to point them in the right direction, here.<\/p>\n<p>If you examine the changes <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php-------GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php-------GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/a>), am sure that <font color=blue>you will concur<\/font> &#8230;<\/p>\n<ul>\n<li><i>Concat demuxer<\/i> concatenation of videos <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> functionality, onto the &#8220;as of yesterday&#8221; &#8230;<\/li>\n<li><i>Voiceovers<\/i> &#8230; and  &#8230;<\/li>\n<li><i>Burn subtitles<\/i><\/li>\n<li><i><font color=blue>Rotate a video<\/font><\/i><\/li>\n<\/ul>\n<p> &#8230; was the simplest functionality component, yet, of the four.  We now present those four in &#8220;an expanded out&#8221; (at least on non-mobile) dropdown HTML element.  Maybe you can guess why?<\/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\/ffmpeg-rotate-video-tutorial\/'>Ffmpeg Rotate Video Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fcdt'>Previous relevant <a target=_blank title='Ffmpeg Concat Demuxer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-concat-demuxer-tutorial\/'>Ffmpeg Concat Demuxer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Concat Demuxer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/concat_demux.jpg\" title=\"Ffmpeg Concat Demuxer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Concat Demuxer Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Ffmpeg Burn Subtitles Tutorial' href='#fbst'>Ffmpeg Burn Subtitles Tutorial<\/a> work we&#8217;re still not up to &#8220;shelling any peas&#8221; adding in &#8230;<\/p>\n<ul>\n<li><i>Concat demuxer<\/i> concatenation of videos <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> functionality, onto the &#8220;as of yesterday&#8221; &#8230;<\/li>\n<li><i>Voiceovers<\/i> &#8230; and  &#8230;<\/li>\n<li><i>Burn subtitles<\/i><\/li>\n<\/ul>\n<p> &#8230; progress.<\/p>\n<p>What&#8217;s different this time?  Well, ffmpeg works the command, we again thank <a target=_blank href='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'>Mux Video and Audio from another Video<\/a> for (regarding &#8220;the plan&#8221;), using an interim file &#8230;<\/p>\n<blockquote cite='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'><p>\nConcat demuxer<br \/>\n<br \/>\nFirst, make a text file.<br \/>\n<br \/>\nfile &#8216;in1.mp4&#8217;<br \/>\nfile &#8216;in2.mp4&#8217;<br \/>\nfile &#8216;in3.mp4&#8217;<br \/>\nfile &#8216;in4.mp4&#8217;<br \/>\n<br \/>\nThen, run ffmpeg :<br \/>\n<br \/>\nffmpeg -f concat -i list.txt -c copy out.mp4\n<\/p><\/blockquote>\n<p> &#8230; and for File API browsing (with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html--------------------------------GETME\">our, once again, tweaked<\/a> inhouse <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html--------------------------------GETME\">client_browsing.htm<\/a>) there will be a delay, deriving the file path in &#8220;second call PHP&#8221;.  We handle this by writing two new Javascript functions &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  var ifile=0, ibfile=0;<br \/>\n<br \/>\n  function takeoffone() {<br \/>\n    ibfile--;<br \/>\n    if (ibfile &lt;= 0) {<br \/>\n      document.getElementById('mysub').style.cursor='pointer';<br \/>\n    } else {<br \/>\n      document.getElementById('mysub').style.cursor='progress';<br \/>\n    }<br \/>\n  }<br \/>\n<br \/>\n  function organizefilenamesize(fn, fs) {<br \/>\n    document.getElementById('ifs').innerHTML+='&lt;iframe id=voaskfor' + ifile + ' style=display:none; src=\\\".\/voiceover.php?concat=' + encodeURIComponent('list.txt') + '&filename=' + encodeURIComponent(fn) + '&haveasleep=' + eval(3 * eval('' + ifile)) + '&filesize=' + fs + '\\\"&gt;&lt;\/iframe&gt;';<br \/>\n    if (ibfile == 0) {<br \/>\n      document.getElementById('mysub').style.cursor='progress';<br \/>\n    }<br \/>\n    ifile++;<br \/>\n    ibfile++;<br \/>\n    if (document.getElementById('moreb').title.indexOf(\\\"file '\\\" + fn.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'') + \\\"'\\\") == -1) {<br \/>\n    document.getElementById('moreb').title+=String.fromCharCode(10) + \\\"file '\\\" + fn.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'') + \\\"'\\\";<br \/>\n    }<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; available to call from child iframes via <i>parent.takeoneoff();<\/i> (from voiceover.php second PHP call) and <i>parent.organizefilenamesize(files[ij].name, files[ij].size);<\/i> (from client_browsing.htm) respectively, to facilitate a progress cursor on the submit button to remind the user we&#8217;d like more time.   Along the way, too, <font color=blue>we found<\/font> &#8230;<\/p>\n<p><code><br \/>\nffmpeg -f concat <font color=blue>-safe 0<\/font> -i list.txt -c copy out.mp4<br \/>\n<\/code><\/p>\n<p> &#8230; thanks to the excellent advice we found <a target=_blank title='Excellent advice' href='https:\/\/nono.ma\/says\/concat-unsafe-file-name-operation-not-permitted'>at this webpage<\/a>.<\/p>\n<p>You can see this work in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php------GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php------GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/a>).<\/p>\n<p id=pdefence><b><i>Did you know?<\/i><\/b><\/p>\n<p>Just like the use of &#8230;<\/p>\n<ul>\n<li>div <a target=_blank title='Global contenteditable attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_global_contenteditable.asp'>contenteditable<\/a>=true<\/li>\n<li><a target=_blank title='HTML span element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_span.asp'>span<\/a><sub>izing<\/sub> within that div<\/li>\n<li><a target=_blank title='HTML DOM innerText property info from W3schools'  href='https:\/\/www.w3schools.com\/jsref\/prop_node_innertext.asp'>innerText<\/a><\/li>\n<\/ul>\n<p> &#8230; are the <a target=_blank title='Trios' href='https:\/\/facts.net\/famous-trios\/'>SpongeBob, Patrick, and Squidward<\/a> of the online woooorrrrllllddd, in an &#8220;offence&#8221; line of &#8220;piecing together an operating system command&#8221; thinking, thinking &#8220;defence&#8221; regarding this we added one <font size=1>(we were pleasantly surprised to discover worked, so as)<\/font> to have &#8230;<\/p>\n<ul>\n<li>div contenteditable=true<\/li>\n<li>span<sub>izing<\/sub> within that div<\/li>\n<li>innerText<\/li>\n<li>mask off parts the programmer wants left untouched via span contenteditable=false<\/li>\n<\/ul>\n<p> &#8230; being like the Hall and Oates meets Everything But the Girl <font size=1>(on a yacht, <a target=_blank title='?' href='https:\/\/en.wikipedia.org\/wiki\/Yacht_rock'>of course<\/a>)<\/font> step back into the &#8217;80s!<\/p>\n<p>Take a look at <font color=blue>some tweaks<\/font> &#8230;<\/p>\n<p><code><br \/>\n   if (newv == 'Burn subtitles') {<br \/>\n       document.getElementById('moreb').innerHTML=firstdivih;<br \/>\n       <font color=blue>\/\/<\/font>document.getElementById('precmds').innerHTML=document.getElementById('verb').innerHTML + ' ' + document.getElementById('secondi').innerHTML.replace(\/inva\\.mp4\/g,'sub.srt      ') + ' sub.ass; ';<br \/>\n       document.getElementById('precmds').innerHTML=document.getElementById('verb').innerHTML + ' ' + document.getElementById('secondi').innerHTML.replace(\/inva\\.mp4\/g,'sub.srt      ') + ' <font color=blue>&lt;span id=subass contenteditable=false&gt;<\/font>sub.ass;<font color=blue>&lt;\/span&gt;<\/font> ';<br \/>\n       document.getElementById('secondi').innerHTML='';<br \/>\n       <font color=blue>\/\/<\/font>document.getElementById('sswitches').innerHTML='-vf ass=sub.ass';<br \/>\n       document.getElementById('sswitches').innerHTML='-vf<font color=blue>&lt;span id=asssubass contenteditable=false&gt;<\/font> ass=sub.ass <font color=blue>&lt;\/span&gt;<\/font>';<br \/>\n       document.getElementById('mysub').value=newv;<br \/>\n    }<br \/>\n<\/code><\/p>\n<p> &#8230; in a &#8220;Burn subtitles&#8221; relevant Javascript code snippet.<\/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\/ffmpeg-concat-demuxer-tutorial\/'>Ffmpeg Concat Demuxer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fbst'>Previous relevant <a target=_blank title='Ffmpeg Burn Subtitles Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-burn-subtitles-tutorial\/'>Ffmpeg Burn Subtitles Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Burn Subtitles Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ffmpeg_first_suboption.jpg\" title=\"Ffmpeg Burn Subtitles Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Burn Subtitles Tutorial<\/p><\/div>\n<p>The initial inspiration for this current <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> themed series of blog posting was, and still is, <a target=_blank href='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'>Mux Video and Audio from another Video<\/a>, thanks.  So many great ideas, we found, that today we add onto the &#8230;<\/p>\n<ul>\n<li>first idea of <i>Voiceovers<\/i> we&#8217;ve established to work with MAMP in macOS and Windows over the previous days, allowing us to now think to add a first suboption idea of &#8230;<\/li>\n<li><i>Burn subtitles<\/i> &#8230; as per our link&#8217;s &#8230;<br \/>\n<blockquote cite='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'><p>\nBurn subtitles<br \/>\nUse the libass library (make sure your ffmpeg install has the library in the configuration &#8211;enable-libass).<br \/>\n<br \/>\nFirst convert the subtitles to .ass format:<br \/>\n<br \/>\nffmpeg -i sub.srt sub.ass<br \/>\nThen add them using a video filter:<br \/>\n<br \/>\nffmpeg -i in.mp4 -vf ass=sub.ass out.mp4<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<p> &#8230; as a useful video piece of functionality we&#8217;d say.<\/p>\n<p>To get this going, easily (from a programming perspective) &#8230;<\/p>\n<ul>\n<li>our textarea element remains as the form conduit to the ffmpeg command via the <a target=_blank title='Javascript onsubmit event information from W3schools' href='https:\/\/www.w3schools.com\/tags\/ev_onsubmit.asp'>onsubmit<\/a> event final analysis of the &#8230;<\/li>\n<li>underlying div contenteditable=true is <font color=blue>&#8220;spanned&#8221; up a lot more<\/font> as per &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n   document.getElementById('moreb').innerHTML='<font color=blue>&lt;span id=precmds&gt;&lt;\/span&gt;<\/font><font color=blue>&lt;span id=verb&gt;<\/font>ffmpeg\" . $ffmpegsuf . \"<font color=blue>&lt;\/span&gt;<\/font> -i &lt;span id=scbi&gt;&lt;iframe onload=checkif(this,\\\"inv.mp4\\\"); scrolling=no frameborder=0 id=cbi data-type=file data-value=inv.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:92px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=9075964842271&left=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt;<font color=blue> &lt;span id=betweenis&gt;&lt;\/span&gt;<\/font> <font color=blue>&lt;span id=secondi&gt;<\/font>-i &lt;span id=scbix&gt;&lt;iframe onload=checkiftwo(this,\\\"inva.mp4\\\"); scrolling=no frameborder=0 id=cbix data-type=file data-value=inva.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:106px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=9075964842271&right=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt;<font color=blue>&lt;\/span&gt;<\/font> <font color=blue>&lt;span id=sswitches&gt;<\/font>-c copy -map 0:v:0 -map 1:a:0 -shortest<font color=blue>&lt;\/span&gt;<\/font> out.mp4 &gt; &lt;a target=_blank title=ffm.bad onclick=getvb(); style=cursor:pointer;text-decoration:underline; data-href=.\/ffm.bad&gt;ffm.bad&lt;\/a&gt;';<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<br \/>\n &#8230; and at the onsubmit event Javascript the <a target=_blank title='DOM innerText attribute' href='https:\/\/www.w3schools.com\/jsref\/prop_node_innertext.asp'>innerText<\/a> attribute usage makes it fairly easy <font color=blue>to say<\/font> &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  function mergechanges() {<br \/>\n     if (document.getElementById('scbi').innerHTML.indexOf('&lt;') == -1) {<br \/>\n       <font color=blue>if (document.getElementById('precmds').innerHTML != '') {<br \/>\n       document.getElementById('fcommand').value=document.getElementById('moreb').innerText;<br \/>\n       } else {<\/font><br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.replace(' inv.mp4 ', ' ' + document.getElementById('scbi').innerHTML + ' ');<br \/>\n       <font color=blue>}<\/font><br \/>\n       \/\/alert('not oops ' + document.getElementById('fcommand').value);<br \/>\n     } \/\/else {<br \/>\n       \/\/alert('oops');<br \/>\n     \/\/}<br \/>\n     if (document.getElementById('scbix').innerHTML.indexOf('&lt;') == -1) {<br \/>\n       \/\/alert('zoops');<br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.replace(' inva.mp4 ', ' ' + document.getElementById('scbix').innerHTML + ' ');<br \/>\n     }<br \/>\n     if (document.getElementById('moreb').innerText.indexOf(' -c ') != -1 && document.getElementById('fcommand').value.indexOf(' -c ') != -1) {<br \/>\n      \/\/alert('azoops');<br \/>\n      if (document.getElementById('moreb').innerText.split(' -c ')[1] != document.getElementById('fcommand').value.split(' -c ')[1]) {<br \/>\n       \/\/alert('bzoops');<br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.split(' -c ')[0] + ' -c ' + document.getElementById('moreb').innerText.split(' -c ')[1];<br \/>\n      }<br \/>\n     }<br \/>\n     return true;<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<br \/>\n &#8230; to slice through that &#8220;span&#8221; complexity like margarine <font size=1>(or butter that&#8217;s been left out on a hot day for approximately 7 hours 17 minutes 23 seconds)<\/font>\n<\/li>\n<\/ul>\n<p>And so, onto yesterday&#8217;s <a title='Ffmpeg Improved Windows Media Browsing Tutorial' href='#fiwmbt'>Ffmpeg Improved Windows Media Browsing Tutorial<\/a> feel free to see this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php----GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php----GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/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\/new-ffmpeg-improved-windows-media-browsing-tutorial\/'>Ffmpeg Improved Windows Media Browsing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fiwmbt'>Previous relevant <a target=_blank title='Ffmpeg Improved Windows Media Browsing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-improved-windows-media-browsing-tutorial\/'>Ffmpeg Improved Windows Media Browsing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Improved Windows Media Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover_windows_dir.jpg\" title=\"Ffmpeg Improved Windows Media Browsing Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Improved Windows Media Browsing Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial' href='#fmvawmbt'>Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial<\/a> taught us a lesson, as a side issue, that what we said when we presented <a target=_blank title='Animated GIF Creation on Windows MAMP via PDF Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-creation-on-windows-mamp-via-pdf-tutorial\/'>Animated GIF Creation on Windows MAMP via PDF Tutorial<\/a>  &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-creation-on-windows-mamp-via-pdf-tutorial\/'>\n<p>No matter how we tried, we could not get a Windows command line command like &#8230;<\/p>\n<p>\n<code><br \/>\nforfiles \/P \"[PathToFileBestGuess]\" \/S \/M \"[FileBaseName]\" \/C \"cmd \/c echo @path@fsize\" | find \"[FileSizeInBytes]\"<br \/>\n<\/code><br \/>\n<\/p>\n<p> &#8230; to work out a file path when supplied a file base name and a file size and you call as above with starting folders.  That works well (for deriverability <font size=1>(if that is a word!)<\/font>) in the &#8220;cmd&#8221; window but not when called under the auspices of PHP exec or shell_exec.  It could be that you lose a lot of a Windows user environment when asking PHP to do some operating system work.<\/p>\n<\/blockquote>\n<p> &#8230; was &#8220;only partially&#8221; the story.  We found out that that &#8221; | find &#8221; command piping could cause problems on Windows MAMP using shell_exec or exec to do some operating system functionality.  But before your enthusiasm oozes over the edges, Windows &#8220;forfiles&#8221; is still very hard to get working with PHP shell_exec or exec, even using PHP to perform that &#8221; | find &#8221; filtering of results.<\/p>\n<p>However, on revisiting the issue in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php---GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php---GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/a>) there were dual purpose motivations going on, for us, because <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'>our changed animated GIF creator<\/a> PHP <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php--------------------------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <font size=1>(that if you download to MAMP would best go to Document Root PHP\/animegif folder along with the wonderful <a target=_blank title='GIFEncoder.class.php' href='https:\/\/gist.github.com\/Xeoncross\/ecccb07454d0b69d9eba'>GIFEncoder.class.php<\/a> &#8230; thanks)<\/font> <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>inhouse animated GIF creator web application<\/a> and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/php_calls_pdfimages.php----------------GETME\">the changed PDF parts to animated GIF creation helper<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/php_calls_pdfimages.php----------------GETME\">php_calls_pdfimages.php<\/a> <font size=1>(also a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/php_calls_pdfimages.php\">standalone proposition<\/a>)<\/font> PHP code could be fixed up at the same time, with a new PHP <i>ourshell_exec<\/i> function <font color=blue>interventional code snippet<\/font> up at the top &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\nfunction ourshell_exec($onea, $twoa = NULL, $threea = NULL) {<br \/>\n   $folder='';<br \/>\n   $pattern='';<br \/>\n   $size='';<br \/>\n   $filesa=[];<br \/>\n   if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows' || (strpos(('~@!' . $onea), '~@!forfiles \/P \"') !== false && strpos(('~@!' . $onea), '\/M \"') !== false && strpos(('~@!' . $onea), 'find \"') !== false)) {<br \/>\n     <font color=blue>$folder=explode('\"', explode('forfiles \/P \"', $onea)[1])[0]; \/\/ . substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, 0, 1);<br \/>\n     if (7 == 7) {<br \/>\n       $folder=explode('\"', explode('forfiles \/P \"', $onea)[1])[0]; \/\/ . substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, 0, 1);<br \/>\n       $pattern=explode('\"', explode('\/M \"', $onea)[1])[0];<br \/>\n       $size=explode('\"', explode('find \"', $onea)[1])[0];<br \/>\n       $thiscmd=trim(explode(\" | find \", $onea)[0]);<br \/>\n       if (strpos($pattern, ' ') === false) {  $thiscmd=str_replace('\/M \"' . $pattern . '\"', '\/M ' . $pattern, $thiscmd);  }<br \/>\n       if (strpos($folder, ' ') === false) {  $thiscmd=str_replace('\/P \"' . $folder . '\"', '\/P ' . $folder, $thiscmd);  }<br \/>\n       if (strpos($thiscmd, '\"cmd \/c ') !== false && substr($thiscmd,-1,1) != '\"') { $thiscmd.='\"'; }<br \/>\n       if (strpos($thiscmd, \"\/P C:\\\\ \") !== false) {<br \/>\n            if (strpos($thiscmd, \"\/P C:\\\\ \") !== false) {<br \/>\n                     if (strpos($pattern, \" \") === false) {<br \/>\n                            $thiscmd=\"DIR C:\\\\\" . $pattern . \" \/S \/-C\";<br \/>\n                     } else {<br \/>\n                            $thiscmd=\"DIR \\\"C:\\\\\" . $pattern . \"\\\" \/S \/-C\";<br \/>\n                     }<br \/>\n            }<br \/>\n       }<br \/>\n\/\/file_put_contents('xxx.xxx',file_get_contents('xxx.xxx'). \"\\n\" . '' . $size . ' ' . $thiscmd);<br \/>\n       $nofind=shell_exec($thiscmd . ' 2&gt; nul');<br \/>\n<br \/>\n\/\/file_put_contents('xxxx.xxxx',file_get_contents('xxxx.xxxx'). \"\\n\" . '' . $size . ' ' . $nofind);<br \/>\n\/\/exit;<br \/>\n       $findings=explode(\"\\n\", $nofind);<br \/>\n       $bitbefore='';<br \/>\n       for ($ifindgs=0; $ifindgs&lt;sizeof($findings); $ifindgs++) {<br \/>\n         if (strpos(str_replace(\"\\r\",\"\",$findings[$ifindgs]), 'Directory of ') !== false) {<br \/>\n             $bitbefore=explode('Directory of ', str_replace(\"\\r\",\"\",$findings[$ifindgs]))[1] . \"\\\\\";<br \/>\n         }<br \/>\n         if (strpos((str_replace(\"\\r\",\"\",$findings[$ifindgs]) . '~'), $size . '~') !== false) {<br \/>\n            return str_replace('~','',str_replace($size . '~', '', (str_replace(\"\\r\",\"\",$findings[$ifindgs]) . '~')));<br \/>\n         } else if (strpos((str_replace(\"\\r\",\"\",$findings[$ifindgs]) . ''), $size . ' ') !== false) {<br \/>\n\/\/file_put_contents('xxxxx.xxxxx',$bitbefore . explode($size . ' ', (str_replace(\"\\r\",\"\",$findings[$ifindgs]) . ''))[1]);<br \/>\n           return $bitbefore . explode($size . ' ', (str_replace(\"\\r\",\"\",$findings[$ifindgs]) . ''))[1];<br \/>\n         }<br \/>\n       }<br \/>\n       if ($folder == \"C:\\\\\") { return ''; }<br \/>\n     }<\/font><br \/>\n\/\/ more code<br \/>\n\/\/ as per usual<br \/>\n\/\/ stays here ...<br \/>\n   }<br \/>\n   return shell_exec($onea, $twoa, $threea);<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; where we substitute in Windows <i>DIR C:\\ \/S \/-C<\/i> thinking in place of <i>forfiles<\/i> (via shell_exec minus the &#8221; | find &#8221; piping, <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=PtR4cWb4HNg'>that is<\/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\/ffmpeg-burn-subtitles-tutorial\/'>Ffmpeg Burn Subtitles Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fmvawmbt'>Previous relevant <a target=_blank title='Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-mux-video-and-audio-windows-media-browsing-tutorial\/'>Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover_windows.jpg\" title=\"Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Mux Video and Audio Windows Media Browsing Tutorial<\/p><\/div>\n<p>You know it&#8217;s &#8220;Intranet feely land&#8221;?<\/p>\n<p>You look out the train window <font size=1>(tee hee)<\/font> and see macOS racing through their usual routine.<\/p>\n<p>Of course you&#8217;ll pick the buffet car containing the rice bubbles ahead of the vegemite corn flakes?!<\/p>\n<p>But do we need to reiterate that in &#8220;Intranet feely land&#8221; you&#8217;ve got your macOS typ<strike>os<\/strike>e of work not suiting <a target=_blank title=? href='https:\/\/www.youtube.com\/watch?v=7PUtiIFOsrs'>&#8220;arch Windows&#8221;<\/a> methodologies?  Take the case of &#8230;<\/p>\n<blockquote><p>\nAt least, with macOS MAMP there is the excellent command line <a target=_blank title='macOS file command' href='https:\/\/ss64.com\/osx\/file.html'>&#8220;file&#8221;<\/a> we can use to show information about some potential input files you could use in this, so far, user unfriendly, &#8220;first draft&#8221; version of the PHP.\n<\/p><\/blockquote>\n<p> &#8230; to the beach, would be nice &#8230; but we digress.  Well, in any case, we asked Google <font size=1>(not via the &#8220;arch Window&#8221;)<\/font> <a target=_blank title='Google search, thanks' href='https:\/\/www.google.com\/search?q=does+windows+have+the+equivalent+of+linux+file+command&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=does+windows+have+the+equivalent+of+linux+file+command&#038;aqs=chrome..69i57j33i160l2.15353j0j4&#038;sourceid=chrome&#038;ie=UTF-8'>does windows have the equivalent of linux file command&#8221;<\/a> and got to the helpful <a target=_blank title=Useful href='https:\/\/superuser.com\/questions\/272338\/what-is-the-equivalent-to-the-linux-file-command-for-windows' title='What is the equivalent to the Linux File command for windows? - Super User'>What is the equivalent to the Linux File command for windows? &#8211; Super User<\/a>, thanks, and then ended up at the really useful <a target=_blank title='Really useful' href='https:\/\/gnuwin32.sourceforge.net\/packages\/file.htm'>third party &#8220;file.exe&#8221; for <font size=1>(non-arch)<\/font> Windows usage<\/a> and proceeded with it, working off  <a title='Ffmpeg Mux Video and Audio Media Browsing Tutorial' href='#fmvambt'>Ffmpeg Mux Video and Audio Media Browsing Tutorial<\/a>, to start being able to develop this &#8220;reveal&#8221; details\/summary arrangement in either macOS or Windows <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> environments, that &#8220;ffmpeg&#8221; voiceover command, which normally works a lot better than &#8230;<\/p>\n<blockquote><p>\nI command thee mux, hey you, with audible you, over yonder, by dale and meadow be, yea!\n<\/p><\/blockquote>\n<p> &#8230; when it occurred to us we could turn the base filename parts of those &#8220;file<sub>.exe<\/sub>&#8221; reports into links that when clicked mapped those clicked files into place into the &#8220;ffmpeg&#8221; command being developed above (as alternative input file designator idea to browsing or div contenteditable=true typing ways), in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php--GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php--GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder) and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/a>.<\/p>\n<p>And so, we reckon the work day got worth it!<\/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-ffmpeg-mux-video-and-audio-media-browsing-tutorial\/'>New Ffmpeg Mux Video and Audio Media Browsing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fmvambt'>Previous relevant <a target=_blank title='Ffmpeg Mux Video and Audio Media Browsing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-mux-video-and-audio-media-browsing-tutorial\/'>Ffmpeg Mux Video and Audio Media Browsing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Mux Video and Audio Media Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover_more.jpg\" title=\"Ffmpeg Mux Video and Audio Media Browsing Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Mux Video and Audio Media Browsing Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Ffmpeg Mux Video and Audio Primer Tutorial' href='#fmvapt'>Ffmpeg Mux Video and Audio Primer Tutorial<\/a> &#8230;<\/p>\n<blockquote><p>\nThere be a flowerin&#8217; of inner warmth and glo&#8217; towards all our readers, youngins and oldins alike &#8230; like!\n<\/p><\/blockquote>\n<p>Yes, we&#8217;re involving good ol&#8217; HTML5 <a target=_blank title='Great link' href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/'>File API<\/a> Object Javascript logic, so our &#8220;Intranet&#8221; savvy downloaders out there &#8230;<\/p>\n<blockquote><p>\nFull o&#8217; inner warmth and glo&#8217; towards each other &#8230; like!\n<\/p><\/blockquote>\n<p> &#8230; can easily browse for their two media input files, and for the first time ever integrating <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html-------------------------------GETME\">our ever tweaked<\/a> inhouse <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.html-------------------------------GETME\">client_browsing.htm<\/a> <font size=1>(also a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/client_browsing.htm\">standalone proposition<\/a>)<\/font> (we&#8217;d like you to download to MAMP Document Root&#8217;s HTMLCSS subfolder) we add <a target=_blank title='Event oncontextmenu information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/obj_mouseevent.asp'>&#8220;oncontextmenu&#8221;<\/a> event changes to its input type=file browser <font color=blue>hosting parent iframe element onload event Javascript function as per <\/font> &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  var voaf='', voaftwo='';<br \/>\n<br \/>\n  function checkif(iois, ival) {<br \/>\n    if (iois.src.indexOf('?d=') != -1) {<br \/>\n    var aconto = (iois.contentWindow || iois.contentDocument);<br \/>\n    if (aconto != null) {<br \/>\n       if (aconto.document) { aconto = aconto.document; }<br \/>\n       if (aconto.getElementById('files')) {<br \/>\n         if (voaf == '') {<br \/>\n         voaf=iois.src;<br \/>\n         iois.setAttribute('data-parentspan', 's' + ival.replace('inv.mp4','cbi').replace('inva.mp4','cbix'));<br \/>\n         document.getElementById('myh1').title='s' + ival.replace('inv.mp4','cbi').replace('inva.mp4','cbix');<br \/>\n         document.getElementById('myh1').setAttribute('data-url', iois.src);<br \/>\n         setInterval(voaff, 1000);<br \/>\n         } else if (voaftwo == '') {<br \/>\n         voaftwo=iois.src;<br \/>\n         iois.setAttribute('data-parentspan', 's' + ival.replace('inv.mp4','cbi').replace('inva.mp4','cbix'));<br \/>\n         document.getElementById('myh3').title='s' + ival.replace('inv.mp4','cbi').replace('inva.mp4','cbix');<br \/>\n         document.getElementById('myh3').setAttribute('data-url', iois.src);<br \/>\n         \/\/alert(iois.id + ' data-parentspan=' + iois.getAttribute('data-parentspan'));<br \/>\n         }<br \/>\n         \/\/alert(iois.id + ' data-parentspan=' + iois.getAttribute('data-parentspan'));<br \/>\n         aconto.getElementsByTagName('h1')[0].style.opacity='0.0';<br \/>\n         \/\/alert('here');<br \/>\n         aconto.getElementById('files').style.position='absolute';<br \/>\n         aconto.getElementById('files').style.left='0px';<br \/>\n         aconto.getElementById('files').style.top='0px';<br \/>\n         aconto.getElementById('files').style.zIndex='99';<br \/>\n         aconto.getElementById('files').style.marginLeft='10px';<br \/>\n         aconto.getElementById('files').style.marginTop='8px';<br \/>\n         aconto.getElementById('files').style.visibility='visible';<br \/>\n         aconto.getElementById('files').style.display='block';<br \/>\n         aconto.getElementById('files').style.backgroundColor='#eeeeee';<br \/>\n         aconto.getElementById('files').setAttribute('data-hostcont', ival);<br \/>\n         aconto.getElementById('files').setAttribute('data-hostspan', 's' + ival.replace('inv.mp4','cbi').replace('inva.mp4','cbix'));<br \/>\n         <font color=blue>aconto.getElementById('files').oncontextmenu = function(event) { var suf=event.target.getAttribute('data-hostspan');  parent.document.getElementById(suf).innerHTML=\\\"\" . str_replace(\"\\\\\",\"\\\\\\\\\",dirname(__FILE__) . DIRECTORY_SEPARATOR) . \"\\\" + event.target.getAttribute('data-hostcont');  }<\/font><br \/>\n         if (ival == 'inv.mp4') {<br \/>\n           aconto.getElementById('files').accept='video\/*';<br \/>\n           aconto.getElementById('files').title='Click to browse for video else right click or two finger gesture to make disappear.';<br \/>\n         } else {<br \/>\n           aconto.getElementById('files').accept='video\/*,audio\/*';<br \/>\n           aconto.getElementById('files').title='Click to browse for video or audio else right click or two finger gesture to make disappear.';<br \/>\n         }<br \/>\n         \/\/alert('there');<br \/>\n         aconto.getElementById('dwstyle').innerHTML+=\\\"&lt;style&gt; #files::before { content: '\\\" + ival + \\\"'; } &lt;\/style&gt;\\\";<br \/>\n       }<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; to allow a user who prefers the overlayed <strong>div contenteditable=true alternative (which speaks back to the HTML form textarea conduit when that form&#8217;s <a target=_blank title='Event oncontextmenu information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_onsubmit.asp'>&#8220;onsubmit&#8221;<\/a> <font color=purple>event is called<\/font>) onto yesterday&#8217;s <i>exclusively textarea<\/i> methodology<\/strong> &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  function overlay() {<br \/>\n   var rect=document.getElementById('fcommand').getBoundingClientRect();<br \/>\n   document.getElementById('moreb').style.position='absolute';<br \/>\n   document.getElementById('moreb').style.left='' + rect.left + 'px';<br \/>\n   document.getElementById('moreb').style.top='' + rect.top + 'px';<br \/>\n   document.getElementById('moreb').style.width='96%'; \/\/' + rect.width + 'px';<br \/>\n   document.getElementById('moreb').style.height='' + rect.height + 'px';<br \/>\n   document.getElementById('moreb').style.border='1px solid black';<br \/>\n   document.getElementById('moreb').style.paddingLeft='20px';<br \/>\n   document.getElementById('moreb').style.backgroundColor='#f9f9f9';<br \/>\n   document.getElementById('fcommand').style.opacity='0.0';<br \/>\n   document.getElementById('moreb').innerHTML='ffmpeg\" . $ffmpegsuf . \" -i &lt;span id=scbi&gt;&lt;iframe onload=checkif(this,\\\"inv.mp4\\\"); scrolling=no frameborder=0 id=cbi data-type=file data-value=inv.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:92px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=975964842271&left=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt; -i &lt;span id=scbix&gt;&lt;iframe onload=checkiftwo(this,\\\"inva.mp4\\\"); scrolling=no frameborder=0 id=cbix data-type=file data-value=inva.mp4 data-accept=\\\"video\/*\\\" style=\\\"display:inline-block;height:40px;width:106px;vertical-align:middle;\\\" src=\\\"\/HTMLCSS\/client_browsing.htm?d=975964842271&right=y\\\"&gt;&lt;\/iframe&gt;&lt;\/span&gt; -c copy -map 0:v:0 -map 1:a:0 -shortest out.mp4 &gt; voiceover.bad';<br \/>\n  }<br \/>\n<br \/>\n  <font color=purple>function mergechanges() {<br \/>\n     if (document.getElementById('scbi').innerHTML.indexOf('&lt;') == -1) {<br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.replace(' inv.mp4 ', ' ' + document.getElementById('scbi').innerHTML + ' ');<br \/>\n       \/\/alert('not oops ' + document.getElementById('fcommand').value);<br \/>\n     } \/\/else {<br \/>\n       \/\/alert('oops');<br \/>\n     \/\/}<br \/>\n     if (document.getElementById('scbix').innerHTML.indexOf('&lt;') == -1) {<br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.replace(' inva.mp4 ', ' ' + document.getElementById('scbix').innerHTML + ' ');<br \/>\n     }<br \/>\n     if (document.getElementById('moreb').innerText.indexOf(' -c ') != -1 && document.getElementById('fcommand').value.indexOf(' -c ') != -1) {<br \/>\n      if (document.getElementById('moreb').innerText.split(' -c ')[1] != document.getElementById('fcommand').value.split(' -c ')[1]) {<br \/>\n       document.getElementById('fcommand').value=document.getElementById('fcommand').value.split(' -c ')[0] + ' -c ' + document.getElementById('moreb').innerText.split(' -c ')[1];<br \/>\n      }<br \/>\n     }<br \/>\n     return true;<br \/>\n  }<\/font><br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; reign supreme collecting their media file specification information in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php-GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php-GETME\">voiceover.php<\/a> PHP (we&#8217;d want you to download to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server&#8217;s Document Root folder) and which you can <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run that PHP there<\/a>.<\/p>\n<p>The previous work of <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-creation-install-paths-tutorial\/' title='Animated GIF Creation Install Paths Tutorial'>Animated GIF Creation Install Paths Tutorial<\/a>&#8216;s thread of blog postings has been a great help with this ffmpeg &#8220;Intranet feeling&#8221; integration work we use, around here, in conjunction with macOS or Windows operating system <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache local web server environments.<\/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\/ffmpeg-mux-video-and-audio-media-browsing-tutorial\/'>Ffmpeg Mux Video and Audio Media Browsing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='fmvapt'>Previous relevant <a target=_blank title='Ffmpeg Mux Video and Audio Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-mux-video-and-audio-primer-tutorial\/'>Ffmpeg Mux Video and Audio 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\/PHP\/voiceover.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Ffmpeg Mux Video and Audio Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.jpg\" title=\"Ffmpeg Mux Video and Audio Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Ffmpeg Mux Video and Audio Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve got another &#8220;Intranet feeling&#8221; PHP web application  &#8220;first draft&#8221; for you today.  The reason we&#8217;re opting for &#8220;Intranet feeling&#8221; (ie. we&#8217;re asking you to download the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php_GETME\">voiceover.php<\/a> PHP to a local <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> Apache web server and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/voiceover.php\">run the PHP there<\/a> from its Document Root folder) is that we want to further explore the brilliant &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> -i inv.mp4 -i inva.mp4 -c copy -map 0:v:0 -map 1:a:0 -shortest out.mp4<br \/>\n<\/code><\/p>\n<p> &#8230; we got inspired to try via <a target=_blank href='https:\/\/gist.github.com\/steven2358\/ba153c642fe2bb1e47485962df07c730'>Mux Video and Audio from another Video<\/a> and <a target=_blank href='https:\/\/stackoverflow.com\/questions\/12938581\/ffmpeg-mux-video-and-audio-from-another-video-mapping-issue'>FFMPEG mux video and audio (from another video) &#8211; mapping issue<\/a> &#8230; thanks and thanks &#8230; to add audio to a video stream from two different sources.<\/p>\n<p>At least, with macOS MAMP there is the excellent command line <a target=_blank title='macOS file command' href='https:\/\/ss64.com\/osx\/file.html'>&#8220;file&#8221;<\/a> we can use to show information about some potential input files you could use in this, so far, user unfriendly, &#8220;first draft&#8221; version of the PHP.<\/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='#d59397' onclick='var dv=document.getElementById(\"d59397\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/video\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59397' 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='#d59407' onclick='var dv=document.getElementById(\"d59407\"); 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='d59407' 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='#d59425' onclick='var dv=document.getElementById(\"d59425\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/mamp\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59425' 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='#d59438' onclick='var dv=document.getElementById(\"d59438\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/dir\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59438' 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='#d59447' onclick='var dv=document.getElementById(\"d59447\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/subtitle\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59447' 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='#d59454' onclick='var dv=document.getElementById(\"d59454\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/iframe\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59454' 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='#d59472' onclick='var dv=document.getElementById(\"d59472\"); 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='d59472' 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='#d59492' onclick='var dv=document.getElementById(\"d59492\"); 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='d59492' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s Ffmpeg Rotate Video Tutorial left you with &#8230; We now present those four in &#8220;an expanded out&#8221; (at least on non-mobile) dropdown HTML element. Maybe you can guess why? &#8230; and today we are deploying the framework parts and &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-and-imagemagick-and-pdfimages-media-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":[4,12,14,29,37],"tags":[3028,84,85,2236,113,1993,3531,174,233,234,4345,3358,2442,4346,4347,327,334,342,1750,360,405,415,418,419,452,576,578,587,1658,611,614,624,714,744,760,4341,3987,870,1712,894,4306,932,946,997,1071,1072,3942,1168,4137,4344,4342,1218,1254,3003,1262,1296,1319,4348,1369,4343,4136,4138,1435],"class_list":["post-59492","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-event-driven-programming","category-operating-system","category-tutorials","tag-action","tag-animation-2","tag-apache","tag-append","tag-audio","tag-browse","tag-browsing","tag-button","tag-command","tag-command-line","tag-concat","tag-concatenation","tag-contenteditable","tag-demux","tag-demuxer","tag-did-you-know","tag-dir","tag-div","tag-document-root","tag-download","tag-exec","tag-ffmpeg","tag-file","tag-file-api","tag-form","tag-html","tag-html5","tag-iframe","tag-imagemagick","tag-install","tag-integration","tag-intranet","tag-local-web-server","tag-mamp","tag-media","tag-mux","tag-oncontextmenu","tag-onload","tag-onsubmit","tag-overlay","tag-pdfimages","tag-php","tag-pipe","tag-programming","tag-rotate","tag-rotation","tag-shell_exec","tag-software-integration","tag-srt","tag-srt-file","tag-subtitle","tag-subtitles","tag-text","tag-text-align","tag-textarea","tag-track","tag-tutorial","tag-verb-command","tag-video","tag-video-track","tag-vtt","tag-vtt-file","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59492"}],"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=59492"}],"version-history":[{"count":16,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59492\/revisions"}],"predecessor-version":[{"id":59513,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59492\/revisions\/59513"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=59492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=59492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=59492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}