Video conversion + number of cores used

It's not a problem but wanted to see if anyone knew of a possible workaround. 

 

Adding -2 threads works great for processing coversion of videos with 2 cores. That only applies to converting to m4v files. When it's finished converting the m4v, it goes next to converting to webm file but it is only using 1 core for the coversion of webm file. 

 

Is there a way I can get the webm conversion to use more than 1 core? 

 

This is what I have: 

$GLOBALS['aConvertTmpls'] = array(

    "playX264" => $GLOBALS['sFfmpegPath'] . " -y -i #input# -b:v #bitrate#k -threads 2 -vcodec libx264 -s #size# #audio_options# #output#",

    "play" => $GLOBALS['sFfmpegPath'] . " -y -i #input# -r 25 -b:v #bitrate#k -threads 2 -s #size# #audio_options# #output#",

    "image" => $GLOBALS['sFfmpegPath'] . " -y -i #input# #size# -ss #second# -vframes 1 -an -f image2 #output#",

Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net
Quote · 24 Feb 2014

WebM is a format used by the HTML5 module, so the conversion stuff is located elsewhere.

 

/modules/boonex/html5av/classes/BxH5avModule.php (around line 392):

 

$sCommand = $sFfmpegPath . " -y -i " . $sTempFile . " -acodec libvorbis -b:a 128k -ar 44100 -b:v {$iBitrate}k -s {$sSize} " . $sPlayFile;

 

Add -threads somewhere in there.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 24 Feb 2014

Awesome! Thank you for that valuable tip 

 

Webm indeed is now converting with 2 cores and works great! 25 mb video file converted to m4v and webm in 1 min and 5 seconds. Definitely faster than it was before :) 

 

For anyone wanting to know where in the codes, see Nathan's suggestion and where I put in threads -2 

$sCommand = $sFfmpegPath . " -y -i " . $sTempFile . " -acodec libvorbis -b:a 128k -ar 44100 -b:v {$iBitrate}k -threads 2 -s {$sSize} " . $sPlayFile; 

 

Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net
Quote · 24 Feb 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.