Video uploads are an advanced experimental feature that comes with a number of strict technical requirements and limitations.
Video conversion requires an external cron job, advanced PHP functions and a special library. It is also prone to consume a lot of server resources.
Please do not enable this feature without a thorough understanding of what is required. To properly configure it, please talk to your hosting provider about the following details:
As a rule of thumb, the video uploads and conversions will most likely not work in a shared server environment. Please make sure to be using a good dedicated machine.
This library is absolutely necessary in order for the video conversion to work. PeepSo only supports FFmpeg version 4.0 or newer. Ask your hosting provider about this library and the executable path – you need to fill it in the Video Uploads preference pane.
Bear in mind, FFmpeg will not be detected if exec() or shell_exec() can’t run. Please read the section below.
Make sure these two PHP functions are not blocked on your server. Your hosting provider should be able to give you all necessary information. If it is not possible to enable these functions on your server, the video uploads will not work.
Make sure that your server is able to receive big uploads. Ensure there are no configuration settings that prevent big files from being uploaded. PHP maximum execution time needs to be adjusted in order to accommodate bigger conversion jobs. PHP safe mode will most likely interfere with the conversion process.
Here are some PHP options worth looking into. There are no strict guidelines here, but as a rule of thumb if you want to process big uploads, you need to raise all other limits.
|file_uploads||1 (enabled) – without it no file uploads will work|
|upload_max_filesize||Lower limit means shorter videos, bigger limit means higher server load|
|post_max_size||Should not be lower than the above value|
|max_execution_time||The bigger files are allowed, the more time and the server needs to process them|
|max_input_time||Should not be lower than the above value|
To avoid interfering with regular page loads, all videos uploaded by your users have to be converted with an external cron job (ie not the cron job tool built into WordPress itself). Depending on your server, you can use wget and/or curl. The cron will convert videos that are queued. Conversion process starting from the oldest to newest, one video in one process.
Please refer to example commands below.
wget https://domain.com/?peepso_convert_videos_event > /dev/null
curl https://domain.com/?peepso_convert_videos_event > /dev/null
If you use AWS Elastic Transcoder Integration, you need to add additional cron job for uploading videos to s3.
wget https://domain.com/?peepso_upload_videos_to_s3 > /dev/null
curl https://domain.com/?peepso_upload_videos_to_s3 > /dev/null