OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
videoAII
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
22-01-25index.php
6.03 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
audio
-
01/22/2025 10:53:48 AM
rwxrwxrwx
📄
export.php
7.04 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
files
-
01/22/2025 05:04:49 AM
rwxrwxrwx
📄
index.php
6.26 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
script.js
7.77 KB
01/22/2025 05:33:18 AM
rw-r--r--
📄
styles.css
1.01 KB
01/22/2025 05:05:09 AM
rw-r--r--
📄
test.php
7.58 KB
05/19/2025 10:07:22 AM
rwxrwxrwx
📁
testing
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📁
uploads
-
01/22/2025 10:13:10 AM
rwxrwxrwx
📄
video_process.php
11.27 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zexport.php
3.56 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zindex.php
4.48 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zscript.js
5.78 KB
01/22/2025 05:05:09 AM
rw-r--r--
Editing: zexport.php
Close
<? include '../assets/php/validate.logged.php'; include '../assets/php/db_config.php'; include '../assets/php/function.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Export the Video | Knobly Cream Video AI</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/css/bootstrap.min.css"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="/assets/css/styles.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/5.3.3/js/bootstrap.min.js"></script> <script src="script.js"></script> </head> <body> <? include('../assets/php/navbar.php') ?> <div class="container"> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['video']) && isset($_POST['audio'])) { $serverBaseDir = escapeshellcmd('/var/www/cream/videoAI/'); // Fix the paths by concatenating correctly $videoPath = '/var/www/cream' . $_POST['video']; // Remove unnecessary escapeshellarg here $audioPath = $_POST['audio']; // Remove unnecessary escapeshellarg here // Validate the paths if (!file_exists($videoPath)) { echo "Video file does not exist: $videoPath"; exit; } if (!file_exists($audioPath)) { echo "Audio file does not exist: $audioPath"; exit; } // Generate the output path $timestamp = time(); $outputPath = $_SERVER['DOCUMENT_ROOT'] . '/videoAI/files/export/' . $timestamp . 'output.mp4'; // Ensure the output directory exists if (!is_dir(dirname($outputPath))) { mkdir(dirname($outputPath), 0755, true); } // FFmpeg command to merge video and audio $command = "ffmpeg -i $videoPath -i $audioPath -c:v copy -c:a aac -strict experimental $outputPath 2>&1"; // Execute the command and capture the output exec($command, $output, $returnVar); // // Debugging: Output the command result and logs // echo "<pre>"; // echo "Return Code: " . $returnVar . "\n"; // print_r($output); // echo "</pre>"; // Check the return value of the command if ($returnVar === 0) { // echo "Video and audio merged successfully. Output file: $outputPath"; echo '<video id="videoPreview" width="640" height="360" controls>'; echo '<source src="' . '/videoAI/files/export/' . $timestamp . 'output.mp4" type="video/mp4">'; echo 'Your browser does not support the video tag.'; echo '</video>'; } else { echo "Error merging audio and video."; } } else { echo "Please provide both video and audio paths."; } } else { echo "Invalid request method."; } ?> </div> </body>