Nguyen xxx
New Member
Hi, I want to make a video hosting server for HLS streaming and embedding like doodstream and streamsb. Only I use it alone, do you guys have any solution. Like php script or source code for example?
define('APP_PHP', '/usr/bin/php');
define('APP_FFMPEG', '/usr/bin/ffmpeg');
// $vids = Your video (file)
// $segments = how the example files are structured ( %dv1x.ts )
// $output = where it will be saved example (public_html/ID.m3u8)
$command = APP_FFMPEG . ' -y -hide_banner -i ' . $vids . ' -vcodec copy -acodec copy -hls_time 1 -hls_playlist_type vod -hls_segment_filename "' . $segment . '" "' "' . $output . '" ';
shell_exec($command);
Hello, for this you will need a lot of money (depending on your traffic)
the easiest solution is to use Rclone (for copies) hire about 3-4 servers
and replicate your files on all servers is not ideal but it is the easiest. For HLS you can use ffmpeg
if you don't have enough money to buy dedicated encoding servers you can use this:
define('APP_PHP', '/usr/bin/php'); define('APP_FFMPEG', '/usr/bin/ffmpeg'); // $vids = Your video (file) // $segments = how the example files are structured ( %dv1x.ts ) // $output = where it will be saved example (public_html/ID.m3u8) $command = APP_FFMPEG . ' -y -hide_banner -i ' . $vids . ' -vcodec copy -acodec copy -hls_time 1 -hls_playlist_type vod -hls_segment_filename "' . $segment . '" "' "' . $output . '" '; shell_exec($command);