OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
videoAI21-1-25
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
π
audio
-
01/22/2025 07:07:41 AM
rwxrwxrwx
π
export.php
6.97 KB
05/19/2025 10:07:22 AM
rw-r--r--
π
files
-
01/22/2025 07:01:42 AM
rwxrwxrwx
π
index.php
4.93 KB
05/19/2025 10:07:22 AM
rw-r--r--
π
script.js
6.46 KB
01/22/2025 07:01:36 AM
rw-r--r--
π
styles.css
929 bytes
01/22/2025 07:01:36 AM
rw-r--r--
π
video_process.php
11.12 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 07:01:36 AM
rw-r--r--
Editing: export.php
Close
<?php 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> <!-- Modern Bootstrap CDN --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="/assets/css/styles.css"> <!-- Custom styles --> <style> body { background-color: #f8f9fa; font-family: 'Arial', sans-serif; /* padding-top: 20px; */ } .container { /* background-color: #ffffff; */ border-radius: 10px; /* padding: 10px; */ /* box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1); */ max-width: 900px; margin: 0 auto; } h1, h3 { font-family: 'Arial', sans-serif; font-weight: bold; color: #343a40; } .btn { border-radius: 25px; padding: 10px 20px; } .btn-primary { background-color: #007bff; border-color: #007bff; } .btn-primary:hover { background-color: #0056b3; border-color: #0056b3; } .btn-success { background-color: #28a745; border-color: #28a745; } .btn-success:hover { background-color: #218838; border-color: #1e7e34; } .btn-info { background-color: #17a2b8; border-color: #17a2b8; } .btn-info:hover { background-color: #138496; border-color: #117a8b; } .btn-linkedin { background-color: #0077b5; border-color: #0077b5; } .btn-linkedin:hover { background-color: #005582; border-color: #004c6e; } .video-container { border: 1px solid #444; display: flex; justify-content: center; align-items: center; flex-direction: column; margin: 30px 0; } video { max-width: 100%; border-radius: 10px; /* box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1); */ } .share-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-top: 20px; } .share-buttons a { font-size: 14px; font-weight: bold; } .url-section { text-align: center; margin-top: 20px; } .url-section a { color: #007bff; text-decoration: none; font-weight: bold; width: 100%; } .url-section a:hover { text-decoration: underline; } </style> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <?php 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/'); $videoPath = '/var/www/cream' . $_POST['video']; $audioPath = $_POST['audio']; 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'; 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"; exec($command, $output, $returnVar); if ($returnVar === 0) { // Generate the URL for the video file $videoURL = 'https://' . $_SERVER['HTTP_HOST'] . '/videoAI/files/export/' . $timestamp . 'output.mp4'; ?> <!-- // Display the video preview --> <div class="video-container"> <h3>Video Preview:</h3>'; <video id="videoPreview" width="640" height="360" controls> <source src="<?= $videoURL ?>" type="video/mp4"> <? echo "Your browser does not support the video tag." ?> </video> </div> <!-- // Provide download button --> <div class="text-center"> <a href="<?= $videoURL ?>" download class="btn btn-primary">Download Video</a> </div> <!-- // Social media sharing options --> <div class="share-buttons"> <a href="https://wa.me/?text=<?= urlencode($videoURL) ?>" target="_blank" class="btn btn-success">Share on WhatsApp</a> <a href="https://www.facebook.com/sharer/sharer.php?u=<?= urlencode($videoURL) ?>" target="_blank" class="btn btn-primary">Share on Facebook</a> <a href="https://twitter.com/intent/tweet?url=<?= urlencode($videoURL) ?>" target="_blank" class="btn btn-info">Share on Twitter</a> <a href="https://www.linkedin.com/shareArticle?mini=true&url= <?= urlencode($videoURL) ?>" target="_blank" class="btn btn-linkedin">Share on LinkedIn</a> </div>'; <!-- // URL Section for Copying --> <div class="url-section"> <p>Hereβs the URL for sharing the video directly:</p> <a href="<?= $videoURL ?> " target="_blank"><?= $videoURL ?></a> </div> <? } else { echo "Error merging audio and video."; } } else { echo "Please provide both video and audio paths."; } } else { echo "Invalid request method."; } ?> </div> </body> </html>