You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/tutorial-ffmpeg-processing-azure-files.md
+37-24Lines changed: 37 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,32 @@ The sample code for this tutorial is in the [Azure Functions Flex Consumption wi
55
55
azd init
56
56
```
57
57
58
+
## Review the code
59
+
60
+
The three key pieces that make OS mount–based processing work are the infrastructure that creates the mount, the script that uploads the binary, and the functioncode that calls it.
61
+
62
+
### Mount configuration (Bicep)
63
+
64
+
The `mounts.bicep` module configures an Azure Files SMB mount on the functionapp. The `mountPath` value determines the local path where files appear at runtime:
After `azd up` deploys the infrastructure and code, a post-deployment script downloads the FFmpeg static binary and uploads it to the Azure Files share. It also creates the Event Grid subscription and runs a health check:
The functionreads the mount path from an environment variable (`FFMPEG_PATH`) that's set in the Bicep template. It calls `process_with_ffmpeg`, which runs the binary as a subprocess against the input image bytes:
This sample is an [Azure Developer CLI (azd)](/azure/developer/azure-developer-cli/overview) template. A single `azd up` command provisions infrastructure, deploys the function code, uploads the ffmpeg binary to Azure Files, and creates the EventGrid subscription for blob triggers.
@@ -93,51 +119,38 @@ This sample is an [Azure Developer CLI (azd)](/azure/developer/azure-developer-c
93
119
94
120
## Process an image
95
121
96
-
1. Upload a test image to the input container. The EventGrid subscription created during deployment automatically triggers your functionwhen a blob is uploaded.
122
+
1. Upload the sample image included in the repository to the input container. The event grid subscription created during deployment automatically triggers your function when a blob is uploaded.
97
123
98
124
```azurecli
99
125
az storage blob upload \
100
126
--container-name $INPUT_CONTAINER \
101
-
--name sample_image.jpg \
102
-
--file <path-to-a-local-image> \
127
+
--name sample_image.png \
128
+
--file sample_image.png \
103
129
--account-name $STORAGE_ACCOUNT \
104
130
--auth-mode login
105
131
```
106
132
107
-
Replace `<path-to-a-local-image>` with the path to any `.jpg` or `.png` file on your computer.
108
-
109
133
> [!TIP]
110
134
> If the trigger doesn't fire immediately, wait 10-15 seconds, and then check the function's execution logs in the Azure portal.
111
135
112
-
1. Check the functionlogs to confirm the image was processed:
0 commit comments