I suppose that would be possible to do with further monkey patching
(so you can use a transcoder option to set that). For now just modify
the nice call in the patch. It's hardwired globally to your
application then however.
The monkey patch works by replacing the execution core of the
application tool interface to prepend "nice" to the final command and
undoing the change when the encoder returns (thus hiding its
activity). Just place it in RAILS_ROOT/config/initializers and you are
set to go. And just replace the prepended "nice" with "nice -5" oder
"nice -10" or any other value depending on how nice you want to be.
I'm also having a background dispatcher as module includable in a
video model which uses acts_as_state_machine to implement an encoder
queue (e.g. run 6 encoders in parallel max, fair queueing) and to
convert several versions of the same source stream (eg preview jpg, lq
flv, hq mp4). It uses the background plugin for rails to dispatch the
encoders into background. The queue management is guarded by a flag
and a transaction so it should be race-condition safe. It's apparently
not mature enough to be released yet (too integrated with our video
class which is application logic which we do not want to/cannot
release to public).
On 11 Nov., 20:28, "Kyle Drake" <
kyledr...@gmail.com> wrote:
> This is a very good idea to integrate, as I'm sure quite a few people
> are monkey-patching to do this. All of my encoding tasks go through a
> nice pipe so that I can control this. Great suggestion.
>
> I'm not clear on how your change works. Can you configure the nice
> number here from RVideo? I would like to be able to set that.
>
> Thanks!
>
> Kyle Drake
> Net Brew Designhttp://
www.netbrewdesign.com