Media Services DownloadTransientError

Artur Trapp 1 Reputation point
2021-06-23T13:39:56.457+00:00

I have a lot of audios in my database whose URLs are like:

https://mystorage.blob.core.windows.net/mycontainer/uploaded%2F735fe9dc-e568-4920-a3ed-67230ce01991%2F5998d1f8-1795-4776-a19c-f1bc4a0d4786%2F2020-08-13T13%3A09%3A13.0996703Z?sv=2020-02-10&se=2022-01-05T16%3A58%3A50Z&sr=b&sp=r&sig=hQBPyOE92%2F67MqU%2Fe5V2NsqGzgPxogVeXQT%2BOlvbayw%3D

I am using these URLs as my JobInput, and submitting a encoding job, because I want to migrate the audios distribution to a streaming approach.
However, every time I use this kind of URL, it fails with DownloadTransientError, and a message something like while trying to download the input files, the files were not acessible.

If I manually upload a file to the blob storage with a simpler URL (https://mystorage.blob.core.windows.net/mycontainer/my-audio.wav), and use it as the JobInput, it works seamlessly. I suspect it has something to do with the special characters on the bigger URL, but I am not sure. What could be the problem?

Here is the part of the code that submits the job:

            var jobInput = new JobInputHttp(new[]
            {
                audio.AudioUrl.ToString()
            });
            JobOutput[] jobOutput =
            {
                new JobOutputAsset(outputAssetName),
            };


            var job = await client.Jobs.CreateAsync(
                    resourceGroupName: _azureMediaServicesSettings.ResourceGroup,
                    accountName: _azureMediaServicesSettings.AccountName,
                    transformName: TransformName,
                    jobName: jobName,
                    new Job
                    {
                        Input = jobInput,
                        Outputs = jobOutput
                    });
Azure Media Services
Azure Media Services
A group of Azure services that includes encoding, format conversion, on-demand streaming, content protection, and live streaming services.
312 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 23,731 Reputation points Microsoft Employee
    2021-06-25T19:00:23.967+00:00

    To benefit community, posting the solution provided by one of our SE, David Bristol on SO thread (as mentioned above).

    The issue was with the filename. It was solved by using JobInputAsset

    You need to include the file name in the URL you're providing.
    It is recommended to include the actual blob name of the input video or audio file with the associated file extension.

    Media Services does encoding on Windows machines and filenames have to comply with what Windows itself supports.

    @Artur Trapp , thanks for your confirmation on the thread.

    1 person found this answer helpful.
    0 comments No comments