• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to FFmpeg install on centos6 for XMG use?

Carla Birch

Well-known member
#1
Hi,
I have been trying to get ffmpeg installed on my centos6/plesk12 server to work with XMG but i can not seem to get it to work. Its installed and the paths are right but when i try to upload a video it needs to convert it errors out.

Dont have the error to hand as on my phone but it was something about the temp file not being found.

So if someone knows of a good step by step to install the latest FFmpeg and codecs for centos6 that works could you please share as Im sure others will need the info also.

Many thanks.
 

WSWD

Well-known member
#2
FFMPEG Auto Installer

You can try that for a pretty foolproof installation. If you have it installed though and are getting errors, there is likely something else at play. Impossible to tell without the exact error.
 

Chris D

XenForo developer
Staff member
#3
What version has installed? You can check with:

ffmpeg -version

Knowing which versions don't work is useful as we need to either try and support them or restrict usage to certain versions.

Easiest way once you've installed it is to replace the FFMPEG binary with the up to date one from the current static build here: FFmpeg Static Builds
 

Carla Birch

Well-known member
#4
What version has installed? You can check with:

ffmpeg -version

Knowing which versions don't work is useful as we need to either try and support them or restrict usage to certain versions.

Easiest way once you've installed it is to replace the FFMPEG binary with the up to date one from the current static build here: FFmpeg Static Builds
Sorry @Chris_D i have reinstall ffmpeg and it all seems to be working now, whats odd because i have run the same steps.
But this is the version info anyway.
Screen Shot 2015-07-24 at 21.21.31.png
 

Carla Birch

Well-known member
#5
On the bad side of things @Chris_D i have killed my server XD when i rebooted it, that's what i get for messing about too much lol, its going to be one of them nights.....

[root@s18076802 ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: /bin/bash: line 1: 8387 Segmentation fault /usr/sbin/httpd
[FAILED]
 

Chris D

XenForo developer
Staff member
#6
Not really sure what would cause that. Your php and Apache don't need to be touched and installing ffmpeg itself shouldn't touch them. Bear in mind there is a ffmpeg php extension but we don't actually use this so of that has come in from somewhere make sure that is disabled as we don't need it anyway.
 

Carla Birch

Well-known member
#7
Yeah all me, god knows what i did but its fixed anyway, just meant a late night for me lol.

Anyway @Chris_D , small videos working fine, just tired a 450mb video and that fails, just get (All the same format and codec as the small clips):
Screen Shot 2015-07-25 at 10.25.19.png

My server should be setup for being able to handle files up to 2000mb, in less i missed something.
Screen Shot 2015-07-25 at 10.26.37.png
 

Mike

XenForo developer
Staff member
#8
You mentioned Apache. There are a couple configuration values that could limit uploads. For example, LimitRequestBody. If you're using FastCGI, FcgidMaxRequestLen could be at play as well.

Alternatively, it could just be that the Flash uploader is a little less forgiving to network conditions. Try the upload with it disabled.
 

Carla Birch

Well-known member
#9
Have turned FastCGI off and now it does the same but atlest now its logging a error in admin cp whats:
PHP:
erver Error Log
Error Info
ErrorException: mkdir(): Permission denied - library/XenForo/Helper/File.php:72
Generated By: C.Birch, A moment ago
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'mkdir(): Permis...', '/var/www/vhosts...', 72, Array)
#1 /var/www/vhosts/****/httpdocs/library/XenForo/Helper/File.php(72): mkdir('/var/www/vhosts...')
#2 /var/www/vhosts/****/httpdocs/library/XenGallery/DataWriter/AttachmentData.php(39): XenForo_Helper_File::createDirectory('/var/www/vhosts...', true)
#3 /var/www/vhosts/****/httpdocs/library/NFLJ/AMS/XenForo/DataWriter/AttachmentData.php(48): XenGallery_DataWriter_AttachmentData->_writeAttachmentFile('/tmp/phpSDWgEd', Array, false)
#4 /var/www/vhosts/****/httpdocs/library/XenForo/DataWriter/AttachmentData.php(144): NFLJ_AMS_XenForo_DataWriter_AttachmentData->_writeAttachmentFile('/tmp/phpSDWgEd', Array)
#5 /var/www/vhosts/****/httpdocs/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_AttachmentData->_postSave()
#6 /var/www/vhosts/****/httpdocs/library/XenGallery/Model/File.php(119): XenForo_DataWriter->save()
#7 /var/www/vhosts/****/httpdocs/library/GFNKraken/Extend/XenGallery/Model/File.php(39): XenGallery_Model_File->insertUploadedAttachmentData(Object(XenForo_Upload), 1, Array)
#8 /var/www/vhosts/****/httpdocs/library/XenGallery/ControllerPublic/File.php(190): GFNKraken_Extend_XenGallery_Model_File->insertUploadedAttachmentData(Object(XenForo_Upload), 1, Array)
#9 /var/www/vhosts/****/httpdocs/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_File->actionDoUpload()
#10 /var/www/vhosts/****/httpdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/vhosts/****/httpdocs/index.php(13): XenForo_FrontController->run()
#12 {main}
Request State
array(3) {
  ["url"] => string(162) "http://www.yourpshome.net/media/files/do-upload.json?hash=6ae32d73b273c96c2d8b2c1b9686851f&content_type=xengallery_media&upload_type=video_upload&key=video_upload"
  ["_GET"] => array(4) {
    ["hash"] => string(32) "6ae32d73b273c96c2d8b2c1b9686851f"
    ["content_type"] => string(16) "xengallery_media"
    ["upload_type"] => string(12) "video_upload"
    ["key"] => string(12) "video_upload"
  }
  ["_POST"] => array(7) {
    ["Filename"] => string(47) "The Four Kings Casino & Slots: Exit Effects.mov"
    ["_xfResponseType"] => string(4) "json"
    ["_xfToken"] => string(8) "********"
    ["content_data"] => array(1) {
      ["category_id"] => string(1) "7"
    }
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfSessionId"] => string(32) "8b252210b61beb24bd228e00dbdb4659"
    ["Upload"] => string(12) "Submit Query"
  }
}
 

Chris D

XenForo developer
Staff member
#10
Seems like a simple case of incorrect permissions. We create a new directory called xengallery_videos in your data directory.

Both data and internal_data should be recursively writable including any new directories added beneath them.
 

Carla Birch

Well-known member
#11
Seems like a simple case of incorrect permissions. We create a new directory called xengallery_videos in your data directory.

Both data and internal_data should be recursively writable including any new directories added beneath them.
Setting all from 755 to 777 as i type and uploading a test again :)