By Nauseous on Monday, 20 November 2017
Posted in General Issues
Replies 3
Likes 0
Views 405
Votes 0
Anyway to tell Easysocial to process video conversions to use only 4 or a specified number of cores?

During the video processing it used all 24 cores which slows the system down a bit.
Hi there,

Currently when encoding video, we did not specify how many threads to use in ffmpeg thus, ffmpeg will default to use 'optimal' setting, which is use all of the available threads (core).

If you need to specify how many thread to use, then you can do this.

Open the file JOOMLA/administrator/components/com_easysocial/includes/ffmpeg/adapter.php' and look for below code at line 572:


$command = $this->ffmpeg . ' ';
$command .= '-y -i ' . $input . ' -strict -2 ';
$command .= '-acodec aac -vcodec libx264 -crf 23 ';
$command .= '-ab ' . $bitrate . ' ';
$command .= '-vf "scale=-2:\'min(ih,' . $size . ')\'" -movflags faststart ';
$command .= $output;


Replace the above with:


$command = $this->ffmpeg . ' ';
$command .= '-y -i ' . $input . ' -strict -2 ';
$command .= '-threads 4 ';
$command .= '-acodec aac -vcodec libx264 -crf 23 ';
$command .= '-ab ' . $bitrate . ' ';
$command .= '-vf "scale=-2:\'min(ih,' . $size . ')\'" -movflags faststart ';
$command .= $output;


In the above, you are actually adding the new command option ''-threads 4' to tell ffmpeg to use 4 threads when encoding the video.

Hope this help and have a nice day
Sam
·
Monday, 20 November 2017 10:56
·
0 Likes
·
0 Votes
·
0 Comments
·
That will get over written with updates, so I would really like to keep these settings permanent. Hopefully a setting in ES since it affects performance but thanks for the details.
·
Monday, 20 November 2017 11:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

That will get over written with updates, so I would really like to keep these settings permanent.


Thanks for your feedback and your suggestion and we will consider to add a setting for this one. As for now, you will need to re-apply the hacks if you upgrade your EasySocial.

Have a nice day.
Sam
·
Monday, 20 November 2017 11:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post