OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
videoAI
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
export.php
1.63 KB
09/16/2024 01:28:39 PM
rw-r--r--
📁
files
-
09/16/2024 02:37:49 PM
rwxrwxrwx
📄
index.html
3.99 KB
09/16/2024 01:28:39 PM
rw-r--r--
📄
script.js
5.78 KB
09/16/2024 01:28:39 PM
rw-r--r--
📄
styles.css
929 bytes
09/16/2024 01:28:39 PM
rw-r--r--
📄
video_process.php
10.29 KB
09/16/2024 02:39:15 PM
rw-r--r--
Editing: export.php
Close
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['video']) && isset($_POST['audio'])) { $videoPath = $_SERVER['DOCUMENT_ROOT'] . escapeshellarg($_POST['video']); $audioPath = $_SERVER['DOCUMENT_ROOT'] . escapeshellarg($_POST['audio']); $timestamp = time(); // $outputPath = $_SERVER['DOCUMENT_ROOT'] . '/cream/export/' . $timestamp . 'output.mp4'; // Path for the output video file //localhost $outputPath = $_SERVER['DOCUMENT_ROOT'] . '/videoAI/files/export/' . $timestamp . 'output.mp4'; // Path for the output video file //Server // Command to merge audio and video using FFmpeg $command = "ffmpeg -i $videoPath -i $audioPath -c:v copy -c:a aac -strict experimental $outputPath 2>&1"; // Execute the command and capture output exec($command, $output, $returnVar); // // Print output for debugging // echo "<pre>"; // echo "Return Code: " . $returnVar . "\n"; // print_r($output); // echo "</pre>"; if ($returnVar === 0) { echo "Video and audio merged successfully. Output file: $outputPath"; ?> <video id="videoPreview" width="640" height="360" controls> <source src="<?= '/cream/export/' . $timestamp . 'output.mp4' ?>" type="video/mp4"> Your browser does not support the video tag. </video> <? } else { echo "Error merging audio and video."; } } else { echo "Please provide both video and audio paths."; } } else { echo "Invalid request method."; } ?>