1. 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?

Discussion in 'Media Gallery Support' started by Carla Birch, Jul 24, 2015.

  1. Carla Birch

    Carla Birch Well-Known Member

    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.
  2. WSWD

    WSWD Well-Known Member

    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.
  3. Chris D

    Chris D XenForo Developer Staff Member

    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
  4. Carla Birch

    Carla Birch Well-Known Member

    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
    Chris D likes this.
  5. Carla Birch

    Carla Birch Well-Known Member

    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
  6. Chris D

    Chris D XenForo Developer Staff Member

    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.
  7. Carla Birch

    Carla Birch Well-Known Member

    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
  8. Mike

    Mike XenForo Developer Staff Member

    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.
    CvP and Chris D like this.
  9. Carla Birch

    Carla Birch Well-Known Member

    Have turned FastCGI off and now it does the same but atlest now its logging a error in admin cp whats:
    erver Error Log
    Error Info
    mkdir(): Permission denied library/XenForo/Helper/File.php:72
    Generated By
    C.BirchA 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"
  10. Chris D

    Chris D XenForo Developer Staff Member

    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.
  11. Carla Birch

    Carla Birch Well-Known Member

    Setting all from 755 to 777 as i type and uploading a test again :)
  12. Carla Birch

    Carla Birch Well-Known Member

    Just uploaded a 450mb file fine now with FastCGI turned off and the permissions for data all set to 777.
    Chris D likes this.

Share This Page