Hi, is it possible to use multiple processor for video transcoding with openpackage video and ffmpeg?

Comments

jbrown’s picture

Project: OpenPackage Video » Blue Droplet Video
Version: 5.x-3.9 » 6.x-1.x-dev
Assigned: Unassigned » jbrown
Status: Active » Fixed

No - but multiple processor / multiple server transcoding is something I want to implement.

chrispooh’s picture

Hi,

i did it:

$params[] ='-threads 4 ' . '-v 0 -y -i ' . escapeshellarg($original_dir . '/' . $info['source_file']['filepath']);

So i write in the code: '-threads 4 ' .

jbrown’s picture

Title: Use multiple processor » Use multiple processors
Component: Miscellaneous » Code
Category: support » feature
Status: Fixed » Active
jbrown’s picture

Status: Active » Postponed (maintainer needs more info)
jbrown’s picture

does it work with libx264?

chrispooh’s picture

Yes, i use with that.

jbrown’s picture

I tried -threads 0 as mentioned here, but it just segfaults.

jcarnett’s picture

If it helps at all, I compiled FFmpeg from source yesterday, added the "-threads 0" argument to Blue Droplet and it was able to render without problems. This seems like something you could just leave to be added in the extra parameters field on the BD config page, especially if it segfaults some versions of FFmpeg.

jcarnett’s picture

I may have just lied to you. It did work encoding some small videos, but I just threw an HD video at it and it segfaulted. Removed the parameter and it worked. I'll try a few more and let you know how it goes.

jcarnett’s picture

Sure enough. Testing at the command line, ffmpeg segfaults with "-threads 0" when converting an MPEG2, MPEG4, 3GP, and 3GPP2, but works fine with an msvideo/avi and sorenson. That's all I had to test with. All work fine with "-threads 4", so I guess I'll stick with what I said before -- it seems like something best left to the extra parameters field in the BD config.

jruberto’s picture

Just reporting in. I'm successfully transcoding pretty big (up to 300mb) mp4 videos to flv with the switch -threads 4 on a rackspace cloud server. Debian, ffmpeg compiled from source.

Also, since the server is a quad core, I wanted to run at a lower priority so web server will still function well during transcoding. On the settings page, just put "nice " (no quotation marks but put a space after it) before your path to ffmpeg binary (on linux anyway) will turn out something like "nice /usr/local/bin/ffmpeg" (again, without quotes). Works great, and the ffmpeg worker processes all run at background priority (nice = 10).