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

Fixed Any way to restart a transcode process

Discussion in 'Media Gallery Resolved Bugs' started by gotski, Jun 2, 2016.

  1. gotski

    gotski Member

    Hello, I have files that hang in the queue "xengallery_transcode_queue" a lot of time, if there any some way to try to start the process of transcoding video?

    Thank you
  2. gotski

    gotski Member

    Ok, i open information about video in transcode queue

    a:7:{s:12:"attachmentId";i:859924;s:5:"media";a:9:{s:11:"media_title";s:0:"";s:17:"media_description";s:97:"Video DESC";s:10:"media_type";s:12:"video_upload";s:11:"media_state";s:7:"visible";s:13:"attachment_id";i:859924;s:7:"user_id";i:62475;s:8:"username";s:7:"lilprik";s:8:"album_id";i:0;s:11:"category_id";i:7;}s:4:"tags";s:83:"tag";s:12:"customFields";a:0:{}s:17:"customFieldsShown";a:0:{}s:18:"tagger_permissions";a:6:{s:4:"edit";b:1;s:6:"create";b:1;s:12:"removeOthers";b:0;s:7:"maxUser";s:2:"10";s:8:"maxTotal";s:1:"7";s:8:"minTotal";i:0;}s:8:"filename";s:98:"/home/user/mydomain.net/data/xengallery_videos/859/859856-01bec8ebac237afbc1ca6586c2900e7c.mp4";}

    and I can't view a video file in folder /home/user/mydomain.net/data/xengallery_videos/859/859856-01bec8ebac237afbc1ca6586c2900e7c.mp4

    Where the file is stored, and if it disappeared, for what reason could it be?
  3. Mike

    Mike XenForo Developer Staff Member

    If these entries have been in the transcode queue for a while, then the file has likely been removed as it has taken too long (over 24 hours). This is expected.

    The main issue would be figuring out why these files are in the queue rather than being processed. If you upload new videos, do they get processed?
  4. gotski

    gotski Member

    I uploaded a avi file a 30mb, it is transcoded a fine and fast.

    Then I uploaded a 3 files the size of 240 MB each and now all 3 stay in the transcode queue, although! I saw that the load on the server was very high, process of transcoding going.

    But the video remained in the queue, and no error reports I didn't receive.
  5. Chris D

    Chris D XenForo Developer Staff Member

    Was it the same 240MB file each time, or different? Did the load stay high or did it eventually stop? What do you have the transcoding limit set as?

    Are you able to point us in the direction of where we can download the original video? We would then be able to test it. It's possible if it's the same video that the video file itself is causing it to fall over.
  6. gotski

    gotski Member



    I think a problem not in video.

    Perhaps I need to set more time on the PHP script execution?
  7. Chris D

    Chris D XenForo Developer Staff Member

    PHP script execution shouldn't be a factor here as we pass it off to a PHP CLI process for this reason. I've transcoded 700MB video files up to now without issue.

    What is your Transcode Limit option set to? Are you attempting to transcode more than one video at a time?

    Check your PHP error log in case there is anything logged there.
  8. gotski

    gotski Member

    my limit 5

    I uploaded a 250mb + it has remained in the queue

    start upload, 30mb is ok, 75 is ok, 100 is ok, next steps 150, 200

    I'll let you know.
  9. gotski

    gotski Member

    Files near 200mb and more not transcode on my server, I do not have any errors in the PHP logs.

    What else can I try to do?
  10. Chris D

    Chris D XenForo Developer Staff Member

    Does it fail even if you only have one item in the queue?
  11. gotski

    gotski Member

    I cleared queue, and upload only one file, it not helped
  12. Chris D

    Chris D XenForo Developer Staff Member


    I am going to try it locally with a similarly sized video file to see if we can reproduce the problem.

    What format of video is it? AVI?
  13. gotski

    gotski Member

    yes all the files that I tested, it avi
  14. Chris D

    Chris D XenForo Developer Staff Member

    In the meantime, it might be worth trying to run the transcode process manually from the CLI.

    You will need SSH access on your server, and you will need to run cd <your/XF/root/path>/library/XenGallery/Helper

    In there you need to run a command similar to the following:

    php video-transcode.php <transcode_queue_id>
    You will just need to replace <transcode_queue_id> with a transcode_queue_id for an item in your xengallery_transcode_queue table.

    You will also need to ensure that item has a queue_state of "pending" rather than "processing". If it is "processing" already then set it to "pending". You may also want to kill any ffmpeg processes that are already running on the server.

    I'm not sure if you'll see any output or not from ffmpeg, but basically keep an eye on it an see if PHP eventually throws back any errors.
  15. gotski

    gotski Member

    Thank you, Chris!

    I will test this morning, and immediately write here about the results.

  16. gotski

    gotski Member

    I'm a try, and received error: An unexpected error occurred. Please try again later
  17. gotski

    gotski Member

    Hello Chris, for correct work I need a libvo-aacenc codec in my ffmpeg build?
  18. Chris D

    Chris D XenForo Developer Staff Member

    We check for the required encoders when you set the FFmpeg path in the options, so as long as you don't get any errors there it should be ok.

    By the way, what version of XFMG are you running?
  19. gotski

    gotski Member


    The problem is that when I try to convert video in command prompt and use a command:

    ffmpeg -y -i test.avi -vcodec libx264 -acodec libfdk-aac -ar 48000 -ac 2 -movflags faststart output.mp4

    it say me Unknown encoder 'libfdk-aac'

    I download a build from http://johnvansickle.com/ffmpeg/

    but in latest builds.... "We have just removed support for VisualOn AAC encoder (libvo-aacenc) and libaacplus in FFmpeg master."

    Official from fmpeg:
    January 30, 2016, Removing support for two external AAC encoders

  20. Chris D

    Chris D XenForo Developer Staff Member

    If you're running one of the newer builds from there, it's true they've removed libvo-aacenc support. But that's ok, because we detect that. We don't use libfdk-aac either.

    The command would be:
    ffmpeg -y -i test.avi -vcodec libx264 -acodec aac -ar 48000 -ac 2 -movflags faststart output.mp4
    See if that works.

    If it does, then clearly we must be hitting something within PHP.

    If that's the case, please ensure debug mode is enabled in your config.php file before running the below quoted process again.

    $config['debug'] = true;
    You will have to ensure it is enabled for all users. This may invite some additional errors or logging to happen which may help us isolate the cause better.

    gotski likes this.

Share This Page