PeepSo Docs

System Requirements for Video Uploads

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:

Powerful Server

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 VPS or a dedicated machine.

FFmpeg 4.x

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.

PHP: exec() & shell_exec()

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.

PHP: other settings

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.

Option Suggestions
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
memory_limit
Depends on file sizes and amount of users on your site, but if you want video conversion to work, this limit needs to be very generous.

Cron job

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.

Important: domain.com should be replaced with your own domain name. If your site is installed in a subfolder, replace domain.com with yourdomainname.com/subfolder/

wget example:

wget domain.com/?peepso_convert_videos_event > /dev/null

curl example

curl 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 example:

wget domain.com/?peepso_upload_videos_to_s3 > /dev/null

curl example

curl domain.com/?peepso_upload_videos_to_s3 > /dev/null