Partager via


Azure Media Player support for audio-only and video-only streams

Azure Media Player itself does not support audio-only or video-only streams as per the bottom of https://amp.azure.net/libs/amp/latest/docs/features.html.  This is due to issues with the AzureHtml5JS tech.  If you attempt to play a video-only asset in Azure Media Player you will see the error, "The video playback was aborted due to a corruption problem or because the video used features your browser did not support. (0x20400003)".

At the JavaScript level you may see the error: MEDIA_ERR_SRC_NOT_SUPPORTED

There are a couple of ways to workaround this issue depending on what tool you're using to encode video.  The obvious one is to always make sure that you have assets that have both audio and video.  But sometimes this is impractical or doesn't meet your needs.  If you are using the Azure web portal https://portal.azure.com/, then use the Adaptive Streaming preset with Media Encoder Standard.

This will do two things.  It will encode the video into a bitrate ladder and it will automatically insert silent audio into video-only sources or black video into audio-only sources.

If you are using the Azure Media Services Explorer, a really great tool by the way, you would right click on the asset, choose Encode asset(s) with Media Encoder Standard (MES)…   On the Preset tab, choose Adaptive Streaming profile.  That's all you need to do unless you want to use a specific encoding profile.  To do that, choose the profile you want to use and go to the Advanced tab and check the Insert a silent audio track when input has no audio option if your source asset has no audio or Insert black video when input has no video if your source asset has no video.

If you are using the Azure Media Services SDK and are defining your encoding profile with JSON or XML, you can use the parameters described on /en-us/azure/media-services/media-services-advanced-encoding-with-mes to insert what you need:

InsertSilenceIfNoAudio
InsertBlackIfNoVideoBottomLayerOnly
InsertBlackIfNoVideo