whoami7 - Manager
:
/
home
/
bleuhbh
/
www
/
root
/
public
/
newRadio
/
Upload File:
files >> /home/bleuhbh/www/root/public/newRadio/webradioWorkingPassthru.php
<?php // Définit les chemins des fichiers audio $path1 = '../../../Musique Louis/Tonite It Shows.mp3'; $path2 = '../../../Musique Louis/Egyptian Intro.mp3'; // Vérifie que les fichiers existent if (!file_exists($path1)) { die("Un ou plusieurs fichiers audio n'existent pas.1"); } if (!file_exists($path2)) { die("Un ou plusieurs fichiers audio n'existent pas.2"); } // Définit le format de sortie (ici MP3) $outputFormat = 'mp3'; // Crée une commande FFmpeg pour concaténer les fichiers audio et envoyer le stream $command = sprintf( '../../admin/php/ffmpeg/bin/ffmpeg -i %s -i %s -filter_complex "[0][1]concat=n=2:v=0:a=1[outa]" -map "[outa]" -f %s -', escapeshellarg($path1), escapeshellarg($path2), escapeshellarg($outputFormat) ); // $command = sprintf( // '../../admin/php/ffmpeg/bin/ffmpeg -re -i %s -re -i %s -filter_complex "[0][1]concat=n=2:v=0:a=1[outa]" -map "[outa]" -f %s -', // escapeshellarg($path1), // escapeshellarg($path2), // escapeshellarg($outputFormat) // ); // $command = sprintf( // '../../admin/php/ffmpeg/bin/ffmpeg ' . // '-ss 0 -t 5 -i %s ' . // lit les 5 premières secondes de path1 rapidement // '-re -i %s ' . // lit path2 en temps réel // '-filter_complex "[0:a][1:a]concat=n=2:v=0:a=1[outa]" ' . // '-map "[outa]" -f %s -', // escapeshellarg($path1), // escapeshellarg($path1), // escapeshellarg($outputFormat) // ); // $command = sprintf( // '../../admin/php/ffmpeg/bin/ffmpeg ' . // '-ss 0 -t 10 -i %s ' . // 5 premières secondes sans -re (rapide) // '-ss 10 -re -i %s ' . // à partir de 5s avec -re (temps réel) // '-filter_complex "[0:a][1:a]concat=n=2:v=0:a=1[outa]" ' . // '-map "[outa]" -f %s -', // escapeshellarg($path1), // escapeshellarg($path1), // escapeshellarg($outputFormat) // ); // Exécute la commande en temps réel et envoie le stream audio header('Content-Type: audio/' . $outputFormat); header('Content-Disposition: inline; filename="stream.' . $outputFormat . '"'); header('Cache-Control: no-cache, no-store, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); // Lance la commande et envoie le flux directement au client passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); passthru($command); ?>
Copyright ©2021 || Defacer Indonesia