Search code examples
azureencodingmp4azure-blob-storageazure-media-services

Convert MP4 to ISM in Azure Storage


I need to generate .ISM files from MP4 files that are uploaded to Azure BLOB storage. Probably as soon as the user uploads a MP4 file to BLOB storage I should be able to fire up a Azure Function that does the conversion.

Can someone please help me how to do the conversion from MP4 to .ISM.

Note: I do not want to use Azure Media Service, it is too expensive.


Solution

  • The .ism file probably won't help you much at all for this situation.

    If you are trying to avoid using AMS completely and just do static packaging, you should generate HLS or DASH content directly into storage blobs. You could do that with FFMPEG or the Shaka Packager tool from existing Mp4 file. There are lots of OSS solutions out there that can generate static HLS and DASH content if that is your goal.

    The .ism file is primarily a feature of AMS - and it provides the information that the Streaming Endpoint (origin server) needs to dynamically packaging on-the-fly from standard MP4 files to MPEG DASH, HLS, Smooth and add on the DRM encryption for Widevine, Fairplay, and Playready. If you have no need for the multi-format dynamic packaging from MP4, then AMS is probably not the right solution for your needs.

    If you can share - what parts are too expensive for you? The encoding, the streaming endpoint monthly cost for (standard endpoint cost?) or is it the overall egress bandwidth needed to deliver content from Azure (which won't go away with a storage based solution and is normally 90% of the cost of streaming if you have popular stuff.)

    If you are trying to avoid encoding costs, you can encode locally or in ffmpeg on a server vm at your own costs, and then upload and stream with AMS - I have a good sample of that here - https://github.com/Azure-Samples/media-services-v3-dotnet/tree/main/Streaming/StreamExistingMp4

    Thanks, John