Using our remote transcoding service from a shared web host
Video transcoding at a shared web host presents a few challenges due to resource usage restrictions put in place by any sane/competent host. Even if you were able to compile FFmpeg on the server, you'd likely exceed CPU limits for your user account if you tried to use it. Alternatively, when using our remote transcoding services, you'll likely encounter limitations on the execution time of your scripts (i.e. Drupal's cron.php) and allowable file upload sizes.
Pair Networks
Here are some notes from one of our users about getting our remote transcoding service working on a Pair Networks shared server:
- Pair's relevant usage policies:
-
For security reasons, i'm running PHP under Pair's implementation of php-cgiwrap:
http://www.pair.com/support/knowledge_base/authoring_development/system_... - To transfer the videos to and from openpackage.biz for the transcoding, you need to adjust your php.ini settings per http://www.radinks.com/upload/config.php
-
with php-cgiwrap, i can customize my own php.ini file in
~/public_html/cgi-bin/(hypothetically, you could do this via .htaccess, but i didn't test that) - Running cron once a video is queued for transcoding:
- running cron from CLI fails in less than a minute with:
Killed: 9 - with Pair's default php.ini settings, cron would die in the web browser and dump a long list of mysql errors to the screen after running for a few minutes
- even if the php.ini settings were increased ridiculously high, cron would die in the web browser with an Apache 500 error after running a minute or two longer than it did with more restrictive php.ini settings (presumably due to the Apache timeout directive)
- running cron from CLI fails in less than a minute with:
- in the end, after trial and error, i found that the largest file i could transfer for transcoding was just under 30MB.
- i adjusted my php.ini settings (roughly) accordingly:
max_execution_time = 600max_input_time = 600(added to Pair's default php.ini)upload_max_filesize = 60Mpost_max_size = 60M(added to Pair's default php.ini)





