Fixed Any way to restart a transcode process

gotski

Active 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
 
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?
 
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?
 
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?

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

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

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?
 
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:

Code:
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.
 
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:

Code:
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.

Thank you, Chris!

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

Goodnight!
 
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:

Code:
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.

I'm a try, and received error: An unexpected error occurred. Please try again later
 
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:

Code:
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.

Hello Chris, for correct work I need a libvo-aacenc codec in my ffmpeg build?
 
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?
 
By the way, what version of XFMG are you running?
1.1.6

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.

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

https://www.ffmpeg.org/index.html#news
 
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:
Code:
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.

PHP:
$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.

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:

Code:
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.
 
Back
Top Bottom