MinimServer Forum
Isolate FFMPEG on a dedicated CPU - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: MinimStreamer (/forumdisplay.php?fid=11)
+--- Thread: Isolate FFMPEG on a dedicated CPU (/showthread.php?tid=5500)

Pages: 1 2 3 4


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 14:29

From my notes, this is how I install minim :

wget http://jminim.com/brac/MinimServer-0.8.5.2-linux-intel.tar.gz
tar -xvf MinimServer-0.8.5.2-linux-intel.tar.gz
cd minimserver/bin/
./setup
./startc
exit
./startd

So yes, I use setup


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 14:38

I uninstall minim and install it again, using ./setup.
there is no minim.service file in /usr/lib/systemd/system/

The correct path on Debian 10 seem to be :
/run/systemd/generator.late/minimserver.service

But in fact this file is created at each boot and modify it don't remain between..


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 14:48

What can be cool is the possibility to input this string in ffmpeg location :

taskset -cp 3 /usr/bin/ffmpeg

rather than

/usr/bin/ffmpeg

Anyway, thank Simon for your support


RE: Isolate FFMPEG on a dedicated CPU - simoncn - 13-01-2020 15:29

You could create a script (also named ffmpeg) that does this (passing all the script arguments to /usr/bin/ffmpeg), then put the full path to your script in the stream.converter property.


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 16:06

Thank, but this is far beyond my current knowledge.


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 17:21

I create this script :

Code:
#!/bin/bash

taskset -cp 3 /usr/bin/ffmpeg $@

But when I try to enter :

/home/ffmpeg

In Mininserver stream.converter property, when I click Apply button i get an error :

converter not installed; correct highlighted value and retry.


RE: Isolate FFMPEG on a dedicated CPU - simoncn - 13-01-2020 17:52

You need -c instead of -cp and "$@" instead of $@.


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 18:11

-cp is more immediate than -p and ran too ;-)

But even with the mods you indicate, the result is the same at Minimserver properties settings... Converter not installed

I also tried to move the script to

~/minimsever/opt/bin

and just input "ffmpeg" to stream.converter property, but system ran the ffmpeg in is path (/usr/bin/ffmpeg).

Did you tried the trick ?


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 18:49

The real script *may* be :

Code:
#!/bin/bash

taskset 3 /usr/bin/ffmpeg "$@"
exit

$@ and "$@" seem to operate the same.

no -p or -cp in the command. -p or -cp is for change the CPU of an existing PID Angel


RE: Isolate FFMPEG on a dedicated CPU - lafuente - 13-01-2020 18:56

But there is 2 running ffmpeg for the same files with this trick.

One behave to Minimserver (PPID = Minimserver PID)
the other behave to the one created per Minimser (PPID = FFMPEG previous PID).

Well, it's late. Have to go. Maybe a good night can light up some lights

Code:
root      3273   477  0  1681  3068   1 18:54 ?        00:00:00 /bin/bash /home/minimserver/opt/bin/ffmpeg -v 0 -analyzeduration 0 -f aiff -request_sample_fmt flt -i /home/manu/musiques/Asaf Avidan
root      3276  3273  3 73315 39556   0 18:54 ?        00:00:00 /usr/bin/ffmpeg -v 0 -analyzeduration 0 -f aiff -request_sample_fmt flt -i /home/manu/musiques/Asaf Avidan/The Study On Falling/01-08