Step #1: In Notebook Add init script for ffmpeg
dbutils.fs.put(
"dbfs:/Volumes/xxxxxxx/default/init/install_ffmpeg.sh",
"""#!/bin/bash
apt-get update -y
apt-get install -y ffmpeg
""",
overwrite=True
)
Step #2 Add init script to allowed list
Follow this article: https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/manage-privileges/privileges#manage-allowlist
Step #3 Add the init script in the cluster advanced setting
After creating this script, go to your cluster settings in Databricks UI (Clusters > Edit > Advanced Options > Init Scripts) and add the script path (dbfs:/Volumes/xxxxxxx/default/init/install_ffmpeg.sh). Restart the cluster to apply it. Once the cluster starts with this init script, FFmpeg will be installed and available on each node
Step 4: Start/Restart the cluster