【发布时间】:2019-07-11 09:08:38
【问题描述】:
我想在上传时使用 h.265 视频编解码器转换 mp4 视频,但我不知道如何。
我正在使用 Axios 连接到 cloudinary,这是我的代码(它可以工作,但我不知道如何实现编解码器)。
//upload video
var formData2 = new FormData();
formData2.append('file', fileVideo);
formData2.append('upload_preset', CLOUDINARY_UPLOAD_PRESETS);
//formData2.append('format','png');
axios({
url: CLOUDINARY_URL,
method: 'POST',
headers:{
'Content-Type': 'application/x-www-form-urlencoded',
},
data: formData2
}).then(function(res){
console.log("video");
console.log(res.data);
//https://res.cloudinary.com/marvinq/video/upload/vc_h265/baea9vumoxllkwjx51uy.mp4"
VIDEO_LINK = "https://res.cloudinary.com/jamesbond/video/upload/"+res.data.public_id+".mp4";
}).catch(function(err){
console.log(err);
});
【问题讨论】:
标签: javascript axios cloudinary