The MUX Batch Uploader / Python Toolset is an open-source collection of Python scripts developed at Fiction Tribe designed to streamline video processing workflows with Mux.com, the internet's video infrastructure service. This toolset simplifies batch operations such as video uploads, adding public playback, retrieving MP4 links, updating MP4 support, and enabling playback MP4 for specific video IDs on the Mux platform.
To get started with this Python toolset:
- Clone or download this toolset to your local machine.
- Ensure Python 3.x is installed on your system.
This toolset includes a suite of scripts that provide robust functionality for video asset management:
This script automates the bulk upload of video files from a local directory to your Mux account, streamlining the process of content delivery.
python upload.pySet the path to the directory containing MP4 files in the script:
# Path to directory containing the MP4 files
DIRECTORY = 'path/to/video/directory'Expands your videos' reach by enabling public playback capability, making them readily accessible for streaming.
python add_public_playback.pyRetrieves MP4 links for each video asset, offering you direct access to various resolutions and quality levels for download or playback.
python get_mp4_links.pyEnsures your videos are optimized for all viewing platforms by updating MP4 support across your Mux video assets.
python update_mp4_support.pyTailors video playback options by adding MP4 playback support to individual videos, allowing for greater control over your content.
python add_playback_mp4_to_id.pySet the specific asset ID in the script:
# Specific asset ID to update
ASSET_ID = 'your_mux_video_id'Securely set your Mux credentials in each script:
# Mux API credentials
ACCESS_TOKEN = 'your_access_token'
SECRET_KEY = 'your_secret_key'Replace 'your_access_token' and 'your_secret_key' with the credentials provided by Mux.
We welcome contributions from the developer community. Before submitting new features or scripts, please ensure compatibility with the existing codebase and comprehensive testing.
For more information on Mux's services and how you can leverage them for your video infrastructure needs, visit Mux.com.
