• 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

gotski

Active member
#1
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
 

gotski

Active member
#2
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?
 

Mike

XenForo developer
Staff member
#3
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?
 

gotski

Active member
#4
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.
 

Chris D

XenForo developer
Staff member
#5
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.
 

Chris D

XenForo developer
Staff member
#7
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.
 

gotski

Active member
#9
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?
 

Chris D

XenForo developer
Staff member
#12
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?
 

Chris D

XenForo developer
Staff member
#14
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.
 

gotski

Active member
#15
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!
 

gotski

Active member
#16
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
 

gotski

Active member
#17
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?
 

Chris D

XenForo developer
Staff member
#18
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?
 

gotski

Active member
#19
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
 

Chris D

XenForo developer
Staff member
#20
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.