Transcode and Encrypt Video With FFmpeg
Before get started, make sure that you have installed the FFmpeg software, after activating the WP Video Encoder plugin, navigate to Appearance > Customize > WP Video Encoder panel and configure your encoder.
Activating required plugins Install Plugins
Install FFmpeg
Installing FFmpeg is straightforward, especially on Ubuntu. Simply open the terminal and type:
Alternatively, Install FFmpeg from source
Download the latest FFmpeg version https://launchpad.net/ubuntu/+source/ffmpeg
Extract the zipped file
Navigate to the extracted folder in the terminal
Run the following commands to configure, compile, and install FFmpeg:
Please note that the specific commands to run may vary depending on your system and the version of FFmpeg you downloaded. Make sure to consult the documentation provided with FFmpeg for detailed installation instructions, additionally, reaching out to server technical is recommended.
Configure plugin
Navigate to Appearance > Customize > WP Video Encoder section and configure necessary options.
Encrypt Video
Step 1: Generate an encryption key from your terminal console
Step 2 (Optional): Generate an IV string
Step 3: Navigate to Appearance > Customize > WP Video Encoder panel.
Check on HLS Encryption checkbox to enable the feature.
HLS Encryption File Info Endpoint: This option allows you to change the default file info endpoint, leave it as default or change to a unique string, the string does not include special characters, space, or uppercase words.
HLS Encryption File URL: put your encryption file URL which you have generated above. This encryption file is crucial for the HLS video encoding feature. It is necessary to keep the file accessible at all times during the lifetime of your website. If the URL for this file changes or the file is lost, the encrypted videos will not be decrypted and will be permanently inaccessible. It is recommended to upload the file to a secure and accessible location to ensure it remains available.
HLS Encryption File: upload the encryption file.
HLS Encrypt Initialisation Vector (optional): Put the IV string which you have generated.
Save changes.
After enabling Encryption or changing the file info endpoint, you have to update permalinks at Settings > Permalinks.
If you prefer to rely on a streaming service with low cost and high bandwidth, you may consider trying either Bunny Stream or Cloudflare Stream, as their APIs are already integrated
Last updated