?創(chuàng)建視頻
該接口用于創(chuàng)建抖音視頻(支持話題, 小程序等功能)。該接口適用于抖音。
使用限制
- 抖音的 OAuth API 以
https://open.douyin.com/
?開頭。 - 掛載小程序請先完成注冊開發(fā)者平臺賬號。
- 創(chuàng)建抖音視頻后, 會有一個審核過程, 期間只有自己可見。
- 如果發(fā)布視頻想@用戶,需要獲取昵稱與open_id。
- 目前發(fā)布視頻接口,支持兩種錨點類型,包括:小程序、POI。不支持攜帶多種類型的錨點。
- 如需代用戶創(chuàng)建視頻,除授權(quán)外,每次調(diào)用都需要在產(chǎn)品設(shè)計中讓用戶明確感知相關(guān)操作。如發(fā)現(xiàn)未經(jīng)用戶感知代用戶創(chuàng)建視頻,或?qū)⒒厥障嚓P(guān)接口權(quán)限并處罰應(yīng)用及賬號。
接口說明
無
基本信息
基本信息 | |
---|---|
HTTP URL |
https://open.douyin.com/api/douyin/v1/video/create_video/ |
HTTP Method |
POST |
Scope |
video.create.bind |
權(quán)限要求 |
|
視頻批量剪輯剪輯模式:
混剪模式介紹
智能混剪合成:僅需上傳 1 個長度為 15-60 秒的長視頻即可,系統(tǒng)將抽取音頻,隨后裁剪為多個小
片段,用戶發(fā)布視頻時系統(tǒng)隨機選擇該模式下多個片段進行組合,再和抽取的音頻合成。
智能隨機組合:需上傳至少 6 個(越多越好)6 秒以內(nèi)的短視頻,系統(tǒng)將視頻轉(zhuǎn)靜音,用戶發(fā)布視頻
時系統(tǒng)隨機選擇該模式下的 5 個短視頻素材隨機組合,再和音頻素材合成。
場景順序組合:需在 5 個場景中分別上傳至少 1 個或多個 6 秒以內(nèi)的短視頻,系統(tǒng)將視頻轉(zhuǎn)靜音,
用戶發(fā)布視頻時系統(tǒng)在每個場景中隨機選擇 1 個短視頻素材組合,再和音頻素材合成。
智能圖片組合:需上傳盡可能多的圖片素材,從中選擇 6 個圖片素材,用戶發(fā)布視頻時系統(tǒng)把圖片
隨機組合成視頻,再和音頻合成。
*:模式一旦選定后,請勿輕易切換視頻合成模式,否則將導(dǎo)致素材清空,緩存視頻清空文章來源:http://www.zghlxwxcb.cn/news/detail-679000.html
素材管理:
?文章來源地址http://www.zghlxwxcb.cn/news/detail-679000.html
代碼展示示例:
$breadcrumbs = [
['title' => 'AI視頻創(chuàng)意', 'link' => '#'],
['title' => '開始創(chuàng)作', 'link' => ''],
];
$this->buildBreadcrumbs($breadcrumbs);
//搜索專用
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$this->output['keyword_type'] = $keyword_type;
$this->output['keyword'] = $keyword;
$dv_id = $this->request->getIntParam('dv_id'); //視頻工程ID
$this->output['dv_id'] = $dv_id;
$type = $this->request->getIntParam('type', 0); //素材類型
$scene = $this->request->getIntParam('scene', 1);
$this->output['scene'] = $scene;
//獲取視頻信息
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_info = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_info)) {
plum_redirect_with_msg('視頻創(chuàng)意工程不存在');
}
$mixed_video_mode = $video_info['dv_video_mode'];
if (in_array($mixed_video_mode, [11])) { //智能圖片組合
$type = in_array($type, [0, 1]) ? 3 : $type; //默認為圖片素材類型
} else {
$type = in_array($type, [0, 3]) ? 1 : $type; //默認為視頻素材類型
}
//獲取素材列表
$where = [
['name' => 'dvm_ds_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvm_dv_id', 'oper' => '=', 'value' => $dv_id],
['name' => 'dvm_material_type', 'oper' => '=', 'value' => $type]
];
//視頻類型,區(qū)分混剪模式
if ($type == 1) {
$where[] = ['name' => 'dvm_video_mixed_mode', 'oper' => '=', 'value' => $video_info['dv_video_mode']];
}
if (!empty($keyword_type)) {
$where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}
//智能場景組合,視頻素材加場景值篩選
if ($type == 1 && $mixed_video_mode == 4) {
$scene_model = new App_Model_Douyin_MysqlVideoSceneStorage();
$scene_count = $scene_model->getCountByDvid($dv_id);
if ($scene_count == 0 && $video_info['dv_video_use'] > 0) {
for ($i = 1; $i <= $video_info['dv_video_use']; $i++) {
$indata = [
'dvs_ds_id' => $this->sid,
'dvs_dv_id' => $dv_id,
'dvs_name' => "場景" . $i,
'dvs_duration' => $video_info['dv_video_shot'] * 1000,
'dvs_
到了這里,關(guān)于爆款視頻生成器-視頻批量剪輯系統(tǒng)源碼開發(fā)分享的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!