azure媒体服务,大尺寸视频上传和编码

时间:2017-09-14 09:25:56

标签: azure-media-services

根据azure media services - The request body is too large and exceeds the maximum permissible limit大尺寸视频效果不错,但上传后,资产无法编码,有人可以帮帮我吗?

我的代码是这样的:

@Override
    protected void createBlobWriter(LocatorInfo uploadLocator, String fileName, InputStream input)
            throws ServiceException {
        try {
            CloudBlobContainer container = new CloudBlobContainer(URI.create(uploadLocator.getPath()));
            CloudBlockBlob blob = container.getBlockBlobReference(fileName);
            blob.upload(input, input.available());
        }
        catch (StorageException e) {
            e.printStackTrace();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
        catch (URISyntaxException e) {
            e.printStackTrace();
        }
    }

https://portal.azure.cn中进行编码, 并编码运行错误: enter image description here

1 个答案:

答案 0 :(得分:0)

发生此错误是因为fileName具有不受支持的字符(在本例中为“?​​”)。如果您可以将代码更新为仅允许使用字母数字字符(为了安全),那么编码应该可行。有关不支持的字符列表,请参阅https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-upload-files中的注释。