'title_font' => $title_font,
'title_size' => $title_size,
'title_color' => $title_color,
'title_position'=> $title_position,
'write_font' => $write_font,
'write_size' => $write_size,
'write_color' => $write_color,
'write_position'=> $write_position,
'select' => $select_type,
'vcn' => $vcn_on,
'yushu' => 50,
'yinliang' => 50,
'bgm' => $bgm,
'videobg' => $video_bg,
'bgcolor' => $color_list,
'sigma' => $sigma_val,
];
//主表数据
$updata = [
'dv_title' => $video_name,
'dv_video_mode' => $video_mixed,
'dv_video_layout' => $video_layout,
'dv_video_shot' => $video_shot,
'dv_video_count'=> $video_count,
'dv_video_use' => $video_use,
'dv_video_duration' => $video_duration,
'dv_video_open' => 0, //随机视频开幕
'dv_video_transition' => $video_transition,
'dv_video_filter' => $video_filter,
'dv_video_effect' => $video_effect, 'dv_use_only' => $use_only,
'dv_de_id' => $select_type, //Subtitle dubbing form
'dv_use_platform' => json_encode($platform_list),
];
if (empty($dv_id)) {//新增
$indata = [
'dv_s_id' => $this->sid,
'dv_platform' => json_encode($video_cfg),
'dv_create_time'=> time(),
];
$indata = array_merge($updata, $indata);
$ret = $video_model->insertValue($indata);
} else {//编辑
$video_item = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_item)) {
$this->displayJsonError('参数错误');
}
$curr_platform = json_decode($video_item['dv_platform'], 1);
$curr_platform = is_null($curr_platform) ? [] : $curr_platform;
$updata['dv_platform'] = json_encode(array_merge($curr_platform, $video_cfg));
$ret = $video_model->updateById($updata, $dv_id) ;
//To switch modes or change the number of scene combinations, you need to regenerate the combination
if($video_item['dv_video_mode'] != $video_mixed || $video_item['dv_video_use'] != $video_use){ //Clear the material arrangement combination And cache video $VideoMaterialPailie_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage(); $VideoMaterialPailie_model->clearPailie($dv_id); //clear material $video_meta_model = new App_Model_Douyin_MysqlVideoMaterialStorage();
$vm_where = [
['name' => 'dvm_ds_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvm_dv_id', 'oper' => '=', 'value' => $dv_id],
];
$video_meta_list = $video_meta_model->getList($vm_where, 0,0); /* //Scene sequence combination, reducing the number of scenes } //Different from the new mode, then clear continue; if ($item['dvm_video_mixed_mode'] == $video_mixed && $item['dvm_scene'] < = $video_use) { //The old and new modes are the same, and the scene corresponding to the video is not greater than the new scene number
foreach ($video_meta_list as $item) {
if ($item['dvm_scene'] > $video_use) {
}
*/
//Intelligent mixed cutting mode 1, delete video material
if ($item['dvm_video_mixed_mode'] == 1 && $item['dvm_material_type'] == 1) { $file_path = PLUM_DIR_ROOT.$item['dvm_material_content' ]; if (is_file($file_path)) { unlink($file_path); } } //Video material delete ts material if ($item['dvm_material_type'] == 1) { $file_path = PLUM_DIR_ROOT.$item['dvm_material_videots ']; if (is_file($file_path)) {
unlink($file_path);
}
}
//Delete video materials and picture materials, and keep other materials
if (in_array($item['dvm_material_type'], [1,3])) { $video_meta_model->deleteById($item[' dvm_id']);
The source code development of the short video matrix system requires the following technologies:
1. Front-end technology: HTML, CSS, JavaScript, Vue.js and other front-end frameworks.
2. Back-end technology: Java, Python, PHP and other back-end languages and related frameworks, such as Spring Boot, Django, Laravel, etc.
3. Mobile development technology: Android, iOS development technology.
4. Video processing technology: video codec, format conversion, video editing and other related technologies.
5. Database technology: MySQL, Oracle and other databases.
6. Server-side technology: Nginx, Tomcat and other server-side development related technologies.
7. Cloud computing technology: related technologies of cloud computing platforms such as Alibaba Cloud and Tencent Cloud.
8. Security technology: encryption technology, firewall and other related technologies.
Source code example:
* clip mode link
*/
private function output_mode_link() { $video_mixed_mode = plum_parse_config('project_mixed_mode', 'dydqt/project'); array_unshift($video_mixed_mode, [ 'title' => 'all', 'mode' => 0, 'desc' => '', ]);foreach ($video_mixed_mode as &$item) { $item['link'] = "/dydqtshoppc/video/itemList?mode=".$item['mode']; } $this->output['video_mixed_mode'] = $video_mixed_mode; } /** * Video List */ public function videoListAction() { //Breadcrumbs $breadcrumbs = [ ['title' => 'Account Operation', 'link' => '#zhyy'], [' title' => 'Short Video Management', 'link' => '/video/videoList'], ]; $this->buildBreadcrumbs($breadcrumbs);
$add_time_range = $this->request->getStrParam('add_time_range');
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');$where = [
['name' => 'dv_s_id', 'oper' => '=', 'value' => $this->sid]
];
if(!empty($add_time_range)){
$add_time_range_arr = explode('~',$add_time_range);$where[] = ['name' => 'dv_create_time', 'oper' => '>=', 'value' => strtotime($add_time_range_arr[0])];
$where[] = ['name' => 'dv_create_time', 'oper' => '<', 'value' => strtotime($add_time_range_arr[1]) + 86400];
}
if(!empty($keyword_type)){
$where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}$sort = ['dv_create_time' => 'DESC'];
//获取视频列表
$Video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_list = $Video_model->getList($where,$this->index,$this->count,$sort);
$material_model = new App_Model_Douyin_MysqlVideoMaterialStorage($this->sid);
$temp_video_model = new App_Model_Douyin_MysqlVideoTempVideoStorage($this->sid);
$pailie_video_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
foreach ($video_list as &$item) {
$item['video_num'] = $material_model->getMaterialCountByVideo($item['dv_id'], 1);
$item['audio_num'] = $material_model->getMaterialCountByVideo($item['dv_id'], 2);
$item['image_num'] = $material_model->getMaterialCountByVideo($item['dv_id'], 3);
$item['title_num'] = $material_model->getMaterialCountByVideo($item['dv_id'], 4);
$item['write_num'] = $material_model->getMaterialCountByVideo($item['dv_id'], 5);
$item['cache_num'] = $temp_video_model->getTempVideoCountByItem($item['dv_id']);
$item['pailie'] = $pailie_video_model->getRowByDvid($item['dv_id']);$progerss = 40;
if ($item['video_num'] > 0 || $item['image_num'] > 0) {
$progerss += 10;
}
if ($item['audio_num'] > 0 || $item['write_num'] > 0) {
$progerss += 10;
}
if ($item['pailie']['dvmp_is_zuhe']) {
$progerss += 20;
}
if ($item['cache_num'] > 0) {
$progerss += 20;
}$item['progress'] = $progerss;
}//计算分页
$active_list_all = $Video_model->getCount($where);
$page_libs = new Libs_Pagination_Paginator($active_list_all,$this->count,'jquery',true);
$pageHtml = $page_libs->render();$this->output['add_time_range'] = $add_time_range;
$this->output['keyword_type'] = $keyword_type;
$this->output['keyword'] = $keyword;
$this->output['video_list'] = $video_list;
$this->output['pageHtml'] = $pageHtml;
$video_mixed_mode = plum_parse_config('project_mixed_mode', 'dydqt/project');
$this->output['video_mixed_mode'] = $video_mixed_mode;
$this->output['progress_line'] = [