Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VTDecoderXPCService VS gem #383

Open
obpr opened this issue Sep 22, 2023 · 2 comments
Open

VTDecoderXPCService VS gem #383

obpr opened this issue Sep 22, 2023 · 2 comments

Comments

@obpr
Copy link

obpr commented Sep 22, 2023

Hi folks =) i have no clue why but my pd only use cpu to render video... i can't find how to use my GPU with GEM...
fact it's worst than that becasue i got the vtdecoderxpcservice problem that's sucking my Cpu ... so it's a kind of double topic..!)

Does any body could help?
thx+

@60-hz
Copy link
Contributor

60-hz commented Sep 23, 2023

In my experience, decoding videos with Gem has always been very resource intensive. But this mainly depends on the backend used for decoding, which will be more or less efficient depending on the video codec to be read.

The default decompression backend with Gem is AVFoundation. With it on M1, I have 50% cpu used by vtdecoderxpcservice for a 1920*1080 movie @ 25fps, H264 codec file, (encoded with that ffmpeg command, which allows to scrub between frames pretty well):

ffmpeg -i input.mp4 -preset slow -crf 18 -vcodec libx264 -x264-params keyint=1 output.mp4

You might check with the VLC backend for Gem, if you feel motivated to compile Gem with it:
https://github.com/umlaeute/Gem/wiki/videoVLC

Otherwise, you can try Ofelia which consumes less CPU, even if it is more complicated to use.
I started to make abstractions to use it like Gem few years ago.

@obpr
Copy link
Author

obpr commented Sep 24, 2023

merci !)

Hi every body,
Glad to be here 'D

So,..Does the VTdecoder issue is new to you folks?
A summery about it there : https://macsecurity.net/view/553-vtdecoderxpcservice-high-cpu-mac

In my project I'm doing "looping on the fly " and sequencing A/V on 2 layers driven by to sterp-sequencers (Pds or midis..)

With one layer video I got around 50% CPU usage from VTdecoder
With Two the problems begins and CPU usage can go over 500%

15-inch,2018_2,6 GHz IntelCorei7 6cœurs_Graphics 630 1536 Mo_RadeonProVega20 4 Go_32 Go 2400 MHz DDR4
+external display on Pd Vanilla 0.53-2

I tried to patch my stuff a way that the frame number changes occurs on a layer at a time. Help a bit ..
Fact is I cannot record any result without setting down my fps and so one.
I'm not a super dev or even a great patcher, and so, I do am facing some issue I cannot handle.. yet I hope. I don't know actually how to use ffmepg or even compile something; it seem's that I got to learn .

+Is there any way to process the video with the GPU ?

+Still looking for a video codec that doesn't launch VTdecoder (MP4 doesn't but stuttering)

+Raphael Isdant you kindly advised me to test compiling this:
https://github.com/umlaeute/Gem/wiki/videoVLC
Did some one recommend a specific gem version to process 2 layer AV? ... that would not launch VTDecoder no more...?

At last I did read about MP4 H.26 with no distance between Keyframe. I don't why I did stop using this codec but it definitely do the work !

VTDecoderXPCService=8,4%
!
Capture d’écran 2023-09-24 à 21 34 52

Pd=104,0%

Can't beleive it. I remember using also JPEG codec doing fine but I lost the converter (quicktimepro)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants