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: 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/videoAII/'); $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'] . '/videoAII/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'] . '/videoAII/files/export/' . $timestamp . 'output.mp4'; // Display the video preview echo '<div class="video-container">'; echo '<h3>Video Preview:</h3>'; echo '<video id="videoPreview" width="640" height="360" controls>'; echo '<source src="' . $videoURL . '" type="video/mp4">'; echo 'Your browser does not support the video tag.'; echo '</video>'; echo '</div>'; // Provide download button echo '<div class="text-center">'; echo '<a href="' . $videoURL . '" download class="btn btn-primary">Download Video</a>'; echo '</div>'; // Social media sharing options echo '<div class="share-buttons">'; echo '<a href="https://wa.me/?text=' . urlencode($videoURL) . '" target="_blank" class="btn btn-success">Share on WhatsApp</a>'; echo '<a href="https://www.facebook.com/sharer/sharer.php?u=' . urlencode($videoURL) . '" target="_blank" class="btn btn-primary">Share on Facebook</a>'; echo '<a href="https://twitter.com/intent/tweet?url=' . urlencode($videoURL) . '" target="_blank" class="btn btn-info">Share on Twitter</a>'; echo '<a href="https://www.linkedin.com/shareArticle?mini=true&url=' . urlencode($videoURL) . '" target="_blank" class="btn btn-linkedin">Share on LinkedIn</a>'; echo '</div>'; // URL Section for Copying echo '<div class="url-section">'; echo '<p>Hereβs the URL for sharing the video directly:</p>'; echo '<a href="' . $videoURL . '" target="_blank">' . $videoURL . '</a>'; echo '</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>