短視頻矩陣管理系統(tǒng)開發(fā),首先對服務(wù)器要求:
源碼所需服務(wù)器配置 1、規(guī)格:最低8核16G
2、硬盤:系統(tǒng)盤40-100G,數(shù)據(jù)盤不低于100G
3、帶寬:10M
4、系統(tǒng):CentOS7(務(wù)必選擇7.*)
部署過程中,除對服務(wù)器有要求外,還需要提供準(zhǔn)備備案域名,域名備案大致需要7-15個工作日,由于地區(qū)不同,備案審核的時間周期也不相同。
視頻批量剪輯功能開發(fā):
在視頻批量剪輯過程中,采用了不同的剪輯模式:如,智能混剪,智能隨機(jī),場景順序,圖片組合等,未來還將根據(jù)市場開發(fā),開發(fā)更多不同的功能
開發(fā)展示:?
?<van-tab?title="自定義文案"?title-style="font-size:32rpx;font-weight:700">
????????????????<!--?內(nèi)容2?-->
????????????????<view?class="content">
????????????????????<!--?頂部?-->
????????????????????<view?class="top">
????????????????????????<view>
????????????????????????????不會撰寫爆款文案?
????????????????????????</view>
???????????????????????<view?style="display:?flex;align-items:?center;">
????????????????????????<navigator?url="/subpages/chatIndex/chatIndex"?class="jddg"?style="margin-right:?16rpx;">
????????????????????????????AI智能文案
????????????????????????</navigator>
????????????????????????<view?class="jddg"?bindtap="toDraftWrite">
????????????????????????????行業(yè)文案庫
????????????????????????</view>
???????????????????????</view>
????????????????????</view>
????????????????????<!--?頂部添加?-->
????????????????????<view?class="addCopy"?bindtap="addCopy">
????????????????????????<image?src="../../static/select/title/add.png"?class="addImg"></image>添加自定義文案
????????????????????</view>
????????????????????<!--?添加的文案內(nèi)容?-->
????????????????????<!--?每一個?-->
????????????????????<view??wx:for="{{editList}}"?wx:key="index"?class="listEvery?e">
????????????????????????<view?class="title">
????????????????????????????第{{index+1}}個文案
????????????????????????</view>
????????????????????????<!--?內(nèi)容?-->
????????????????????????<view?class="copywriter?w">
????????????????????????????<view?class="wTxt">{{item.copy}}</view>
????????????????????????????<view?bindtap="delCopy"?data-index="{{index}}"?class="wImg"><image?class="delImg"?src="../../static/select/title/del.png"></image></view>
????????????????????????????<van-dialog?id="van-dialog"?confirm-button-color="#586893"?customStyle="border-radius:20rpx"?confirmButtonText="確定"??/>
????????????????????????</view>
????????????????????</view>
????????????????</view>
視頻分發(fā):采用代用戶發(fā)布視頻的形式
該能力的主要用途是:在用戶授權(quán)的情況下,允許用戶從開發(fā)者的應(yīng)用上,將可公開的內(nèi)容發(fā)布到用戶自己的抖音賬號作品里,并設(shè)置好相關(guān)的標(biāo)題、話題、錨點(diǎn)等信息。
適用范圍
當(dāng)前能力僅支持網(wǎng)站應(yīng)用進(jìn)行申請開通。
使用場景
僅可在網(wǎng)站應(yīng)用的電腦端網(wǎng)站中進(jìn)行授權(quán)、使用,可用場景范圍:
- 【政務(wù)媒體】可支持政務(wù)或媒體機(jī)構(gòu),做內(nèi)部的多媒體管理平臺,但不可對外面向C端用戶使用;(如果是代開發(fā)模式,代理公司需要提供授權(quán)書)
- 【企業(yè)服務(wù)】可支持企業(yè)服務(wù)平臺,做面向抖音賬號的內(nèi)部內(nèi)容管理服務(wù)平臺,只可進(jìn)行toB場景給到企業(yè)及企業(yè)員工針對自有賬號使用;不可將后臺的能力、授權(quán)碼、相關(guān)功能暴露給線上或線下的普通用戶使用;
所使用到的接口列表為
代碼展示如下:
/*
* 新增場景
*/
public function addSceneAction() {
$dv_id = $this->request->getIntParam('dv_id');
$name = $this->request->getStrParam('name');
$scene_model = new App_Model_Douyin_MysqlVideoSceneStorage();
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_item = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_item)) {
$this->displayJsonError('參數(shù)錯誤');
}
$max_scene = $scene_model->getMaxSceneByDvid($dv_id);
$indata = [
'dvs_dv_id' => $dv_id,
'dvs_ds_id' => $this->sid,
'dvs_name' => $name,
'dvs_duration' => $video_item['dv_video_shot']*1000,
'dvs_scene' => $max_scene+1,
'dvs_create_time' => time(),
];
$ret = $scene_model->insertValue($indata);
if ($ret) {
$video_model->incNumberById('dv_video_use', 1, $dv_id);
}
$url = "/dydqtshoppc/video/startProject?dv_id={$dv_id}&type=1&scene=".$indata['dvs_scene'];
$this->displayJsonSuccess(['url' => $url], true, '添加成功');
}
public function deleteSceneAction() {
$dv_id = $this->request->getIntParam('dv_id');
$scene = $this->request->getIntParam('scene', 1);
if ($scene == 1) {
$this->displayJsonError('第一個場景不允許刪除');
}
$scene_model = new App_Model_Douyin_MysqlVideoSceneStorage();
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$where = [
['name' => 'dvs_ds_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvs_dv_id', 'oper' => '=', 'value' => $dv_id],
['name' => 'dvs_scene', 'oper' => '=', 'value' => $scene]
];
$ret = $scene_model->deleteValue($where);
if ($ret) {
$video_model->decNumberById('dv_video_use', 1, $dv_id);
}
$url = "/dydqtshoppc/video/startProject?dv_id={$dv_id}&type=1&scene=1";
$this->displayJsonSuccess(['url' => $url], true, '刪除成功');
}
/*
* 視頻緩存
*/
public function cacheVideoAction() {
//面包屑
$breadcrumbs = [
['title' => 'AI視頻創(chuàng)意', 'link' => '#'],
['title' => '視頻倉庫', 'link' => ''],
];
$this->buildBreadcrumbs($breadcrumbs);
$dv_id = $this->request->getStrParam('dv_id');
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_info = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_info)) {
$this->displayBlankPage('參數(shù)錯誤');
}
$this->output['video_info'] = $video_info;
//獲取視頻緩存列表
$where = [
['name' => 'dvtv_s_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvtv_dv_id', 'oper' => '=', 'value' => $dv_id],
];
$cache_model = new App_Model_Douyin_MysqlVideoTempVideoStorage();
$template_list = $cache_model->getList($where,$this->index,$this->count);
foreach ($template_list as &$item) {
$item['score'] = 100 - min($item['dvtv_score'], 100);
$use_platform = empty($item['dvtv_use_platform']) ? [] : json_decode($item['dvtv_use_platform'], 1);
$use_platform = array_unique($use_platform);
$item['used_count'] = count($use_platform);
$item['used_platform'] = $use_platform;
}
//計算分頁
$template_list_all = $cache_model->getCount($where);
$page_libs = new Libs_Pagination_Paginator($template_list_all,$this->count,'jquery',true);
$pageHtml = $page_libs->render();
$this->output['template_list'] = $template_list;
$this->output['pageHtml'] = $pageHtml;
$this->output['dv_id'] = $dv_id;
$this->output_materail_link($dv_id, 0, $video_info);
//點(diǎn)數(shù)展示
$collect_model = new App_Model_Douyin_MysqlCollectShopStorage();
$collect_info = $collect_model->getCollectSurplusBySid($this->sid);
$this->output['collect_info'] = $collect_info;
//預(yù)約列表
$appoint_model = new App_Model_Task_MysqlAppointTaskStorage();
$appoint_where = [
['name' => 'va_ds_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'va_dv_id', 'oper' => '=', 'value' => $dv_id],
#['name' => 'va_status', 'oper' => '<>', 'value' => 2],
];
$appoint_sort = ['va_status' => 'ASC'];
$appoint_list = $appoint_model->getList($appoint_where, 0, 1, $appoint_sort);
$this->output['appoint_list'] = $appoint_list;
$this->output['platform_list'] = $this->platform;
$this->output['appoint_status'] = [
0 => '<span style="color: #ff875c;">待執(zhí)行</span>',
1 => '<span style="color: darkgreen">執(zhí)行中</span>',
2 => '<span style="color: red">已結(jié)束</span>',
3 => '<span style="color: #db4040;">異常中斷</span>',
];
$this->displaySmarty('dydqtshoppc/video/edit-project.tpl');
}
/*
* 生成預(yù)覽視頻
*/
public function previewVideoAction() {
$dv_id = $this->request->getIntParam('dv_id');
$temp_id = $this->request->getIntParam('temp_id', 0);
$cache_model = new App_Model_Douyin_MysqlVideoTempVideoStorage();
$cache_video = $cache_model->getPreviewVideo($dv_id);
//判斷點(diǎn)數(shù)
$collect_model = new App_Model_Douyin_MysqlCollectShopStorage();
$collect_info = $collect_model->getCollectSurplusBySid($this->sid);
if (!$collect_info['cs_surplus']) {
$this->displayJsonError('無可用點(diǎn)數(shù),無法合成預(yù)覽視頻');
}
if (empty($temp_id)) {
if ($cache_video) {
$this->displayJsonSuccess(['path' => $cache_video['dvtv_video_path']], true, '合成成功');
} else {
$this->createTempVideoAction($dv_id, 1);
$this->displayJsonSuccess(null, true, '預(yù)覽視頻正在努力合成中……');
}
} else {
$cache_id = empty($cache_video) ? 0 : $cache_video['dvtv_id'];
if ($temp_id == $cache_id) {
$this->displayJsonSuccess(null, true, '預(yù)覽視頻正在努力合成中……');
} else {
$this->displayJsonSuccess(['path' => $cache_video['dvtv_video_path']], true, '合成成功');
}
}
}
文章來源:http://www.zghlxwxcb.cn/news/detail-566072.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-566072.html
到了這里,關(guān)于短視頻矩陣管理系統(tǒng)源碼開發(fā):視頻批量剪輯,分發(fā)功能開發(fā)示例的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!