1、通过视频id修改视频信息
2、接口URL中的{userid}为点播账号userid,具体参考菜单【使用须知】->【获取密钥】
3、接口支持https协议
http://api.polyv.net/v2/video/{userid}/video-info
http://api.polyv.net/v2/video/1b448be323/video-info
vid=1b448be323871ffe3d5a84a3638e82c2_1&describ=%E4%BF%9D%E5%88%A9%E5%A8%81%E6%98%AF%E5%85%A8%E7%90%83%E9%A2%86%E5%85%88%E7%9A%84%E4%BC%81%E4%B8%9A%E7%9B%B4%E6%92%AD%E6%9C%8D%E5%8A%A1%E5%95%86%EF%BC%8C%E9%9A%B6%E5%B1%9E%E4%BA%8E%E5%B9%BF%E5%B7%9E%E6%98%93%E6%96%B9%E4%BF%A1%E6%81%AF%E7%A7%91%E6%8A%80%E8%82%A1%E4%BB%BD%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8%EF%BC%8C%E8%87%B4%E5%8A%9B%E4%BA%8E%E9%80%9A%E8%BF%87%E5%8F%AF%E9%9B%86%E6%88%90%E3%80%81%E5%8F%AF%E5%AE%9A%E5%88%B6%E7%9A%84%E8%A7%86%E9%A2%91%E7%9B%B4%E6%92%AD%E6%8A%80%E6%9C%AF%EF%BC%8C%E4%B8%BA%E4%BC%81%E4%B8%9A%E6%90%AD%E5%BB%BA%E8%87%AA%E4%B8%BB%E7%A7%81%E5%9F%9F%E7%9B%B4%E6%92%AD%E7%B3%BB%E7%BB%9F%EF%BC%8C%E5%B9%B6%E6%8F%90%E4%BE%9B%E7%9B%B4%E6%92%AD%E5%85%A8%E6%B5%81%E7%A8%8B%E8%BF%90%E8%90%A5%E4%B8%8E%E7%8E%B0%E5%9C%BA%E6%89%A7%E8%A1%8C%E6%9C%8D%E5%8A%A1%E3%80%82&sign=5AA9AF13716BCFF428B7E4C2F59930BDEF1DD901&tag=%E5%AE%A3%E4%BC%A0%E8%A7%86%E9%A2%91&title=%E4%BF%9D%E5%88%A9%E5%A8%81%E5%AE%A3%E4%BC%A0%E8%A7%86%E9%A2%91&userId=1b448be323&ptime=1670903195195&publishUrl=http%3A%2F%2Fwww.polyv.net
强烈建议您使用点播Java SDK完成API的功能对接,点播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
private static final Logger log = LoggerFactory.getLogger(VodVideoManagementTest.class);
/**
* 修改视频信息
*/
@Test
public void testUpdateVideoInfo() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v2/video/" + userId + "/video-info";
String vid = "1b448be323871ffe3d5a84a3638e82c2_1";
String title = "保利威宣传视频";
String describ = "保利威是全球领先的企业直播服务商,隶属于广州易方信息科技股份有限公司,致力于通过可集成、可定制的视频直播技术,为企业搭建自主私域直播系统,并提供直播全流程运营与现场执行服务。";
String tag = "宣传视频";
String publishUrl = "http://www.polyv.net";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userId", userId);
requestMap.put("ptime", ptime);
requestMap.put("vid", vid);
requestMap.put("describ", describ);
requestMap.put("tag", tag);
requestMap.put("title", title);
requestMap.put("publishUrl", publishUrl);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试修改视频信息,{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"message": "success",
"data": [
{
"images_b": [
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_0_b.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1_b.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2_b.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3_b.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_4_b.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_5_b.jpg"
],
"images": [
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_0.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_4.jpg",
"1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_5.jpg"
],
"imageUrls": [
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_0.jpg",
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.jpg",
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2.jpg",
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.jpg",
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_4.jpg",
"http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_5.jpg"
],
"tag": "宣传视频",
"mp4": "http://mpv.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.mp4",
"title": "保利威宣传视频",
"df": 3,
"times": "0",
"vid": "1b448be323871ffe3d5a84a3638e82c2_1",
"mp4_1": "http://mpv.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.mp4",
"mp4_2": "http://mpv.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2.mp4",
"mp4_3": "http://mpv.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.mp4",
"cataid": "1",
"swf_link": "http://player.polyv.net/videos/1b448be323871ffe3d5a84a3638e82c2_1.swf",
"status": "61",
"seed": 1,
"flv1": "http://plvod01.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.mp4",
"flv2": "http://plvod01.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2.mp4",
"flv3": "http://plvod01.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.mp4",
"sourcefile": "",
"playerwidth": "600",
"default_video": "http://plvod01.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.mp4",
"duration": "00:01:49",
"first_image": "http://img.videocc.net/uimage/1/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_0_b.jpg",
"original_definition": "1920x1080",
"context": "保利威是全球领先的企业直播服务商,隶属于广州易方信息科技股份有限公司,致力于通过可集成、可定制的视频直播技术,为企业搭建自主私域直播系统,并提供直播全流程运营与现场执行服务。",
"playerheight": "337",
"ptime": "2022-12-12 17:47:19",
"source_filesize": 18839865,
"filesize": [
7774918,
14508330,
18866914
],
"md5checksum": "4b88804c015da508b5008f95846befc1",
"hls": [
"http://hls.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_1.m3u8",
"http://hls.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_2.m3u8",
"http://hls.videocc.net/1b448be323/2/1b448be323871ffe3d5a84a3638e82c2_3.m3u8"
],
"uploader": {
"email": "sdk-demo@polyv.net",
"name": "sdk功能测试账号",
"role": "主账号"
},
"keepsource": "",
"cataname": "默认分类"
}
]
}
{
"code": 400,
"status": "error",
"message": "请先选择目标视频。",
"data": ""
}