Me gustaría saber como generar un vídeo a partir de imágenes y audio subido desde php.
<?php
$exito = 0;
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
foreach ($_FILES['imgToUpload']['name'] as $i => $name) {
if (strlen($_FILES['imgToUpload']['name'][$i]) > 1) {
if (move_uploaded_file($_FILES['imgToUpload']['tmp_name'][$i], 'upload/'.$name)) {
$exito=1;
}
}
}
if (strlen($_FILES['audioupload']['name']) > 1) {
if (move_uploaded_file($_FILES['audioupload']['tmp_name'], 'upload/audioPrincipal.mp3')) {
$exito=2;
}
}
if (strlen($_FILES['audio2upload']['name']) > 1) {
move_uploaded_file($_FILES['audio2upload']['tmp_name'], 'upload/audioSecundario.mp3');
}
}
if ($exito >= 2) {
echo "<p style='color: green'>Subida con éxito</p>";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
Imagenes: <input name="imgToUpload[]" id="imgToUpload" type="file" multiple="" /><br>
Audio: <input type="file" name="audioupload" value="audioupload" id="audioupload"><br>
Audio secundario(opcional): <input type="file" name="audio2upload" value="audio2upload" id="audio2upload"><br>
<!-- Audio secundario reducirle el volumen sobre el otro audio -->
<input type="submit" value="Generar">
</form>
</body>
</html>