Closed JaseNZC closed 3 years ago
Unless we could lobby that the maintainer of that docker container change the ffmpeg binary/command path execution I won't be able to add the detection. I just added tdarr and that calls both ffmpeg
and HandbrakeCLI
with no other identifiers. So unmanic will likely show tdarr app usage when it is actively using the GPU as of right now.
@JaseNZC Try this when Unmanic is transcoding:
echo $(ps -fp <insert_pid_from_nvidia-smi> -o command)
So from your picture it would be:
echo $(ps -fp 28089 -o command)
You have to be quick in some cases. The Plex Transcoder likes to spawn new processes each time the transcoder is throttled. I doubt this will be a problem with Unmanic but you never know.
What I'm hoping is that there is unmanic specific stuff in the larger ffmpeg argument(s) that I can use. Just paste me the result if you can. Thanks.
Hope this helps.
I had 3 files converting at the same time with unmanic running at the same time, all have different pid's but are the same as below.
root@box:~# echo $(ps -fp 29788 -o command) COMMAND ffmpeg -hwaccel cuda -hwaccel_device 0 -i /input/5c8d7900b7573ed9dd9573fc/test.mpg -hide_banner -loglevel info -strict -2 -max_muxing_queue_size 512 -map 0:0 -map 0:1 -c:v:0 hevc_nvenc -c:a:0 aac -y /tmp/unmanic/unmanic_file_conversion-1616754474.6918821/test.mp4
@JaseNZC does unmanic always use /tmp/unmanic or is this user configurable?
EDIT: It might be irrelevant as long as unmanic always uses the unmanic_file_conversion prefix for its temporary files. I can probably use that to determine that unmanic is using the GPU as long as they don't change it often.
Its not configurable that I can see anywhere.
Cool. I think I have it worked out then. I'll try to spawn an unmanic container and test it then I'll add a new release. You don't by chance also have tdarr running and could do the same thing for that? Meaning get me the extended command line output from it.
Yeah sorry the whole idea of Unmanic was to go away from tdarr I find it much better for my needs :-)
I'm messing with Unmanic now. Seems pretty simple and straightforward to use.
Yeah set a directory(s) to watch and just let it run that is why I like it.
See easy as :-)
Possibly look at unmanic as a detected app when running. https://hub.docker.com/r/josh5/unmanic/tags?page=1&ordering=last_updated
When looking at the process though it only seems to be identifying ffmpeg.
Was just an idea to look into. :-)