我正在使用发布方法上传音频/视频/图像。这三个都使用相同的API。对于图像,我能够生成缩略图。现在,我需要帮助生成视频缩略图。有人可以帮我吗?我正在分享图像缩略图的示例:
var queryString = HttpUtility.ParseQueryString(string.Empty);
queryString["width"] = defaultWidth.ToString();
queryString["height"] = defaultHeight.ToString();
queryString["smartCropping"] = "true";
var uri = $"{thumbnailServiceUri}?{queryString.ToString()}";
using (var content = new ByteArrayContent(byteData))
{
var response = await thumbnailServiceApiClient.PostAsync(uri, content);
if (response.IsSuccessStatusCode)
{
var thumbnailData = response.Content.ReadAsByteArrayAsync().Result;
var blob = new CloudBlockBlob(new Uri(thumbnailStoragePath), storageCreds);
await blob.UploadFromByteArrayAsync(thumbnailData, 0, thumbnailData.Length);
}