From f6b2cdb5a138234b802dfc62718baf230ab24a16 Mon Sep 17 00:00:00 2001 From: "Pohsiang (John) Hsu" Date: Tue, 28 Nov 2023 10:24:05 -0800 Subject: [PATCH] [doc] add link to EncodingAndPackaging sample --- EncodingAndPackagingExample/README.md | 54 +++++++++++++++------------ README.md | 3 +- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/EncodingAndPackagingExample/README.md b/EncodingAndPackagingExample/README.md index fc7e3c2..d260a69 100644 --- a/EncodingAndPackagingExample/README.md +++ b/EncodingAndPackagingExample/README.md @@ -1,38 +1,44 @@ -Encoding and Packaging Samples +Encoding and Packaging Sample == -This folder contains sample code about how to encode an MP4 video file into multiple resolution streams and pacakge these streams -to DASH format which is suitable for playback in browser. +## Overview -There are three projects: +This folder contains sample code that demonstrates how to use FFMpeg to encode and package a MP4 video file into multi-stream MPEG-DASH format that's suitable for playback in the browser. The functionality is built into a .NET library, and two sample applications are shown that demonstrates the use the library in a command line tool and in an Azure Function. -* `EncodingAndPackagingTool.Core` contains the code of core functionality. -* `EncodingAndPackagingTool.Cli` contains a standalone command line executable application which will invoke `EncodingAndPackagingTool.Core`. -* `EncodingAndPackagingTool.AzureFunction` contains an Azure Function which can be triggered by a message from azure message queue. +Three projects: -In order to run these samples, user need install [FFmpeg](https://ffmpeg.org/download.html) on the machine. Please follow info in this -[link](https://ffmpeg.org/download.html) to install FFmpeg on yours system and add it to the path of your system. +* `EncodingAndPackagingTool.Core`: library project containing the core functionality of encoding and packaging using FFmpeg. +* `EncodingAndPackagingTool.Cli`: command line executable project that demonstrates how to use the library. +* `EncodingAndPackagingTool.AzureFunction`: Azure Function project that demonstrates how to use the library where the Azure function is triggered by a message from an Azure message queue. -Some installation examples: -- For Ubuntu, you can use the package manager 'apt' which will install and add ffmpeg to your path. +## Prerequisites - ``` - sudo apt install -y ffmpeg - ``` +- FFmpeg: -- For Windows 11, you can use 'winget' to install from [gyan.dev](https://www.gyan.dev/ffmpeg/builds/) which will install and add ffmpeg to your path (Note that for windows, after you install, you need to recycle the command prompt windows to get the updated PATH.) + In order to run these samples, user need install [FFmpeg](https://ffmpeg.org/download.html) on the machine. Please follow info in this [link](https://ffmpeg.org/download.html) to install FFmpeg on yours system and add it to the path of your system. - ``` - winget install ffmpeg - ``` + Some installation examples: -These samples also Azure Identity library for authentication. -See [here](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/identity-readme?view=azure-dotnet) for various ways to authenticate and the settings needed. + - For Ubuntu, you can use the package manager 'apt' which will install and add ffmpeg to your path. -You'll need to have the following permissions: + ``` + sudo apt install -y ffmpeg + ``` -- The identity must have `Reader` role on the MP4 file input container blob. -- The identity must have `Contributor` role on the output container. + - For Windows 11, you can use 'winget' to install from [gyan.dev](https://www.gyan.dev/ffmpeg/builds/) which will install and add ffmpeg to your path (Note that for windows, after you install, you need to recycle the command prompt windows to get the updated PATH.) -If you want to deploy `EncodingAndPackagingTool.AzureFunction` sample in an Azure Function, please following info in this [link](https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container?tabs=core-tools%2Cacr%2Cazure-cli&pivots=azure-functions). \ No newline at end of file + ``` + winget install ffmpeg + ``` + +- Azure Identity / Permission (for Azure Function) + + The sample code uses Azure Identity library for authentication. See [here](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/identity-readme?view=azure-dotnet) for various ways to authenticate and the settings needed. + + You'll need to have the following permissions: + + - The identity must have `Reader` role on the MP4 file input container blob. + - The identity must have `Contributor` role on the output container. + + Please follow the information in this [link](https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container?tabs=core-tools%2Cacr%2Cazure-cli&pivots=azure-functions) for instructions on how to deploy `EncodingAndPackagingTool.AzureFunction` sample to an Azure Function \ No newline at end of file diff --git a/README.md b/README.md index 9fae644..41c883f 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,5 @@ If you encounter any issues or bugs that you'd like to report, please feel free ## List of Samples - [Azure Media Migration Tool](migrationTool/README.md) -- [Azure Media Services Playback Proxy & ClearKey Delivery Server](PlaybackService/README.md) \ No newline at end of file +- [Azure Media Services Playback Proxy & ClearKey Delivery Server](PlaybackService/README.md) +- [Encoding and Packaging Sample](EncodingAndPackagingExample/README.md) \ No newline at end of file