-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] add link to EncodingAndPackaging sample
- Loading branch information
Showing
2 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). | ||
``` | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters