Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Isolate FFMPEG on a dedicated CPU
13-01-2020, 14:29 (This post was last modified: 13-01-2020 14:31 by lafuente.)
Post: #11
RE: Isolate FFMPEG on a dedicated CPU
From my notes, this is how I install minim :

wget http://jminim.com/brac/MinimServer-0.8.5...tel.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
Find all posts by this user
Quote this message in a reply
13-01-2020, 14:38 (This post was last modified: 13-01-2020 15:01 by lafuente.)
Post: #12
RE: Isolate FFMPEG on a dedicated CPU
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..
Find all posts by this user
Quote this message in a reply
13-01-2020, 14:48
Post: #13
RE: Isolate FFMPEG on a dedicated CPU
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
Find all posts by this user
Quote this message in a reply
13-01-2020, 15:29 (This post was last modified: 13-01-2020 15:45 by simoncn.)
Post: #14
RE: Isolate FFMPEG on a dedicated CPU
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.
Find all posts by this user
Quote this message in a reply
13-01-2020, 16:06
Post: #15
RE: Isolate FFMPEG on a dedicated CPU
Thank, but this is far beyond my current knowledge.
Find all posts by this user
Quote this message in a reply
13-01-2020, 17:21 (This post was last modified: 13-01-2020 17:23 by lafuente.)
Post: #16
RE: Isolate FFMPEG on a dedicated CPU
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.
Find all posts by this user
Quote this message in a reply
13-01-2020, 17:52
Post: #17
RE: Isolate FFMPEG on a dedicated CPU
You need -c instead of -cp and "$@" instead of $@.
Find all posts by this user
Quote this message in a reply
13-01-2020, 18:11 (This post was last modified: 13-01-2020 18:13 by lafuente.)
Post: #18
RE: Isolate FFMPEG on a dedicated CPU
-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 ?
Find all posts by this user
Quote this message in a reply
13-01-2020, 18:49 (This post was last modified: 13-01-2020 19:05 by lafuente.)
Post: #19
RE: Isolate FFMPEG on a dedicated CPU
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
Find all posts by this user
Quote this message in a reply
13-01-2020, 18:56
Post: #20
RE: Isolate FFMPEG on a dedicated CPU
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)