Yesterdayโs Image/PDF and Audio/Video Supervised Concatenate Tutorialโs โฆ
- โ+โ functionality to โฆ
- concatenate โฆ or โฆ
- voiceover
โฆ is, today, joined by โฆ you guessed it โฆ
- โ-โ functionality to โฆ
- flatten animated GIF โฆ or โฆ
- flatten video
โฆ out to constituent image slides โฆ because we figure there are scenarios where a user wants โฆ
- one input media file โฆ to end up as โฆ
- several output media files
So far no sanity checks are made regarding how many image slides ffmpeg will create via our โ -r 1 โ switch โฆ
$switchtwo="";
if (isset($_GET['flattenit'])) {
if (str_replace("false","",$_GET['flattenit']) != "") {
$switchtwo=" -r 1 ";
}
} else if (isset($_POST['flattenit'])) {
if (str_replace("false","",$_POST['flattenit']) != "") {
$switchtwo=" -r 1 ";
}
}
โฆ applied to output one image slide per second (sample rate) of video input. But perhaps you โdoing the Mathโ would explain why we donโt want this functionality up at the rjmprogramming.com.au domain web server, though Usain Bolt would only trouble us with 11 image slides for his lightning fast 100 meter sprints!
Thanks to this link regarding Filmstrip CSS ideas.
Here again is thechanged macos_ffmpeg_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP should we be catching your attention yet!
Previous relevant Image/PDF and Audio/Video Supervised Concatenate Tutorial is shown below.
It is a combination of โฆ
- yesterdayโs Image/PDF and Audio/Video Supervised Multiple Tutorial โฆ with the previous โฆ
- Concatenating Video on Command Line Tutorial
โฆ that steers us into another couple of ideas our โ+โ logics could represent when we are talking about media, those being โฆ
- concatenate audio or concatenate video โฆ ie. string one media file onto another to achieve a final media file result
- add voiceover audio content(s) onto video(s)
โฆ all using the talents of the brilliant Open Source ffmpeg audio and/or video media editor and manager and creator.
The conduit we use to make these media manipulations happen revolves around a Javascript Ajax and FormData 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)) โฆ
<?php
echo โ
var concatbit='\"concat:';
var xzhr = new XMLHttpRequest();
var xform=new FormData();
for (jut=0; jut<infs.length; jut++) {
xform.append('command' + jut, '" . $verb . " -i ' + document.getElementById('path').value + infs[jut] + ' ' + document.getElementById('path').value + infs[jut].split('.')[0] + '.ts < /tmp/macos.yes');
if (concatbit.indexOf('.ts') == -1) {
concatbit+=document.getElementById('path').value + infs[jut].split('.')[0] + '.ts';
} else {
concatbit+='|' + document.getElementById('path').value + infs[jut].split('.')[0] + '.ts';
}
}
xform.append('command' + infs.length, '" . $verb . " -i ' + concatbit + '\" -c copy ' + document.getElementById('opath').value + document.getElementById('outputname').value.split('.')[0] + '_0.ts < /tmp/macos.yes');
var isofar=eval('' + infs.length);
isofar++;
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 + ' < /tmp/macos.yes');
for (jut=0; jut<infs.length; jut++) {
isofar++;
xform.append('command' + isofar, 'rm -f ' + infs[jut].split('.')[0] + '.ts < /tmp/macos.yes');
}
isofar++;
xform.append('command' + isofar, 'rm -f ' + document.getElementById('opath').value + document.getElementById('outputname').value.split('.')[0] + '_0.ts < /tmp/macos.yes');
isofar++;
xform.append('command' + isofar, 'open ' + document.getElementById('outputname').value);
xzhr.open('post', document.URL.split('?')[0].split('#')[0], true);
xzhr.send(xform);
โ;
?>
Here is thechanged macos_ffmpeg_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP.
Previous relevant Image/PDF and Audio/Video Supervised Multiple Tutorial is shown below.
Back at Image/PDF and Audio/Video Supervised Aesthetics Tutorial we had an assumption going that there would be a one to one correspondence of โฆ
- input media file โฆ to โฆ
- output media file
โฆ but there are quite a few scenarios where a user wants โฆ
- several input media files โฆ to end up as โฆ
- one output media file
โฆ and today we cater for โฆ
- several input image media files โฆ to end up as โฆ
- one output animated GIF
- one output video
- one output PDF
โฆ with more ideas to be tackled in days to come, based on the user involving a โ+โ character in their Input Media Textbox entries. Then it is likely that the user will browse for multiple local computer files as per โฆ
<input type=file accept=".pdf,image/*,video/*,audio/*" capture multiple></input>
For today, here is thechanged macos_ffmpeg_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP and helped out by thechanged tutorial_to_animated_gif
php animated GIF creator web application, or just use the Email functionality via live
run link.
Previous relevant Image/PDF and Audio/Video Supervised Aesthetics Tutorial is shown below.
That work of yesterdayโs โฆ
- Button Versus Input Type Equals Button Primer Tutorialโs button element improved approach to working with email addresses in consort with window.localStorage โmemoryโ (even between sessions) โฆ combines with โฆ
- the recent work of Image/PDF and Audio/Video Supervised Conversions Tutorial โฆ โsprinkled withโ โฆ
- some CSS aesthetic improvements โฆ
<style>
input[type=text] { background-color: #f0f0f0; border-radius: 5px; }
input[type=submit] { font-size: 18px; border-radius: 20px; }
button { font-size: 18px; border-radius: 20px; }
div[contenteditable=true] { font-size: 14px; border-radius: 5px; }
table { border-radius: 25px; }
</style>
โฆ add onto various bits of inline CSS styling such as โฆ
<body style="background: linear-gradient(to left, #ffffff 20%, #ffefba 80%); ">
โฆ and โฆ - some mobile platform functionality and emoji display improvements
โฆ to give a bit of a makeover to our โMediaโ conversions web application, today.
Why emojis (as such) regarding โmobileโ (platforms only)? Well, there is a โbehind the scenesโ dual purpose side to this web application on โmobileโ platforms for two reasons โฆ
- โmobileโ platforms do not support our ffmpeg nor ImageMagick conversion โhelpersโ โฆ and โฆ
- called โcaptureโ 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
โฆ are both reasons the web application might be more apt for your โmobileโ users to take a photo (we use emoji 🤳 ) and then email (we use emoji 📧
) 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โve tweaked things so that the conversion half of the web applicationโs functionality is not essential, but leave the โoutputโ half of the web application in even for โmobileโ users because a web application is what it is, for a user to work it as they will.
And what of the โcommand lineโ PHP โmode of useโ for this web application? Well, we recommend you download and use thecloned convert_audiovideo_pleaseksh Korn Shell script that can be a โlistenerโ for downloaded media off those email attachments (sent to emailees). You could execute this โlistenerโ as a macOS or Linux backup process via โฆ
ksh convert_audiovideo_please.ksh &
And so, here is thechanged macos_ffmpeg_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP or just use the Email functionality via live
run link.
Also for the Document Conversion web application that makeover is very similar whereby thechanged macos_textutil_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP or just use the Email functionality via Document
Conversion live run link.
Previous relevant Audio and Video Supervised Conversions Primer Tutorial is shown below.
Were you here, or remember, the blog posting called MacOS Document Conversion Primer Tutorial, when we surmised โฆ
A good thing about a โversion controlโ or โsource controlโ system is that you can โฆ
- โpick upโ from any version โฆ
- โcloneโ to another name โฆ
- โbranch offโ immediately into a new version โฆ
โฆ to effectively โcloneโ the suitable progress point from a previous project as the start to a new project.
โฆ ? Well, yesterdayโs Pandoc Document Conversion Email Tutorial felt like another such โcloningโ possibility, as it felt like a โprogress pointโ (to me and Nala). Such โcloningโ, to our mind, is a bit โover the topโ if there is no good reason. But we think there is. Lately, weโve been developing โDocumentโ conversion software. In Information Technology, under the banner of โdocument processingโ, that work is of interest. Another area of Information Technology software concerns media โฆ to us, that being โฆ
- image
- audio
- video
โฆ and it is in this โMediaโ field, starting out with just (the) โaudio and videoโ (options) above, we feel weโd like to start developing โMediaโ conversion software, because we know of a brilliant Open Source suite of software called ffmpeg that we want to work with here. Though you might say we are โthe hangers onersโ in this arrangement, it is true in a lot of lifeโs work that getting to the smart stuff is not as easy as youโd think, and the better you can arrange it, the more efficient will the users of all this software feel.
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 ffmpeg or not. For now, it is a โsuck it and seeโ approach. But we do not want to install ffmpeg up at our public rjmprogramming.com.au domain web server, and so we write this โMedia Conversionโ software with the thinking that on your local computer you may install ffmpeg and find it then useful to download thecloned macos_ffmpeg_convertphp PHP code to a place suitable to work it into the use of a PHP (perhaps Apache) local web server product such as MAMP. This PHP calls on our File API friend, achanged client_browsing
htm local file browser web application.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.