代码:
$video_diff = $account_total - $video_temp_count; //视频差量
if ($video_diff > 0) {
$time_base = plum_get_server('HTTP_HOST') == 'dsp.lkhaowu.com' ? 3 : 5;
$time_diff = $video_diff*$time_base*60;//单个5分钟计算
$finish_time = $time_diff+time();
if ($send_time < $finish_time) {
$this->displayJsonError("由于视频制作比较耗时,制作{$video_diff}个视频预计会在".date('m-d H:i:s', $finish_time)."完成,所以视频投放时间需在此时间之后");
}
//自动生成视频制作预约任务
$appoint_model = new App_Model_Task_MysqlAppointTaskStorage();
//查看是否有进行中的预约
$run_count = $appoint_model->getRunAppointCount($v_video, $this->sid);
if ($run_count > 0) {
$this->displayJsonError("当前创意已有预约中的视频制作任务");
}
$indata = [
'va_ds_id' => $this->sid,
'va_dv_id' => $v_video,
'va_create_num' => $account_total, //按最大账号数生成预约数量
'va_appoint_time' => $finish_time,
'va_status' => 0,
'va_create_time' => time(),
];
$appoint_model->insertValue($indata);
}
$one_data = [
'vt_name' => $v_name,
'vt_video_id' => $v_video,
'vt_interval' => $vt_interval,
'vt_run_count' => $vt_count,
];
}
$vt_title_use = $this->request->getIntParam('vt_title_use', 1);
$v_title = $this->request->getStrParam('v_title');
$title_id = $this->request->getIntParam('vt_title_id', 0);
if ($vt_title_use == 1 && empty($title_id)) {
$this->displayJsonError('请选择随机标题来源的推广产品');
}
if ($vt_title_use == 2 && empty($v_title)) {
$this->displayJsonError('请输入视频标题');
}
$v_talk = $this->request->getStrParam('v_talk');
if (empty($v_talk)) {
$this->displayJsonError('话题不可为空');
}
$v_cover = $this->request->getStrParam('v_cover');
$poi_id = $this->request->getStrParam('poi_id');
$poi_name = $this->request->getStrParam('poi_name');
if ($vt_mount == 1 && !empty($poi_id)) {
if (!is_numeric($poi_id)) {
$this->displayJsonError('请输入正确的poiid');
}
if (empty($poi_name)) {
$this->displayJsonError("位置POI名不能为空");
}
}
if (empty($poi_id)) {
$poi_name = "";
}
智能混剪,智能剪辑系统目前智能混剪的几种形势,一种是接入阿里云的接口,另一种自己开发代码,目前智能混剪的核心优势开发工作还在于内容的产出,内容的制作,内容的混剪,采用什么样的底层逻辑,目前我们开发的混剪是数学阶乘算法,沿用数学数字阶乘逻辑,抽帧,抽序,排列,重组,智能混剪源码也是云服务、云储存、针对需求量大的开发的有集群化处理,避免后台服务器的卡顿或者奔溃。
}
/*
* 发布任务列表
*/
public function taskListAction() {
$breadcrumbs = [
['title' => '账号运营', 'link' => '#zhyy'],
['title' => '发布视频', 'link' => '/video/send'],
];
$this->buildBreadcrumbs($breadcrumbs);
$time_range = $this->request->getStrParam('time_range');
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$video_id = $this->request->getIntParam('video_id');
$this->output['video_id'] = $video_id;
$where = [
['name' => 'vt_ds_id', 'oper' => '=', 'value' => $this->sid]
];
if (!empty($time_range)) {
$time_range_arr = explode('~', $time_range);
$where[] = ['name' => 'vt_create_time', 'oper' => '>=', 'value' => strtotime($time_range_arr[0])];
$where[] = ['name' => 'vt_create_time', 'oper' => '<', 'value' => strtotime($time_range_arr[1]) + 86400];
}
if(!empty($keyword_type)) {
$where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}
if (!empty($video_id)) {
$where[] = ['name' => 'vt_video_id', 'oper' => '=', 'value' => $video_id];
}
$sort = ['vt_create_time' => 'DESC'];
//获取视频列表
$task_model = new App_Model_Task_MysqlVideoTaskStorage();