HandBrake icon indicating copy to clipboard operation
HandBrake copied to clipboard

Hardware accelerated decode of PRORES (on M1)

Open digistorm79 opened this issue 2 years ago • 3 comments

Description of the feature or enhancement you'd like to see in HandBrake

Would it be possible to use the hardware decoders (on an M1 mac, but possibly any modern system with regards to most video formats) to the preprocessing / input stage of the encoding process? When I am encoding PRORES renders of my video's, sometimes the CPU is less than half utilised because something else (I think the PRORES decoding thread) is stalling the rest. I know that the M1 chip has a very fast PRORES decoder built in, and I disabled all other pre-processing of the video, so why wouldn't it go at full speed?

What Operating System are you running?

macOS 13 Ventura

What version of HandBrake are you running?

1.5.1

Where did you download HandBrake from?

handbrake.fr

Activity Log, Crash Log or any other details

No response

digistorm79 avatar Dec 17 '22 19:12 digistorm79

Can you post an activity log of an encode?

sr55 avatar Dec 17 '22 19:12 sr55

Probably it's busy doing two single-threaded pixel format conversions, an activity log would be helpful to confirm this. In the next version of HandBrake it should do only one and it should be multi-threaded, you can already try a snapshot and see if it's faster: https://github.com/HandBrake/HandBrake-snapshots

galad87 avatar Dec 19 '22 10:12 galad87

Yes, the snapshot build is utilising full cpu. I can now achieve 180 fps instead of 45 fps on a similar video (if the content is static). At least it is no longer limited on the pre-processing.

digistorm79 avatar Dec 19 '22 13:12 digistorm79

Added in https://github.com/HandBrake/HandBrake/commit/d7c2ef3f19d86c6f03afe4c3dbad165da856fe6a It might improve encoding speed or not depending on the situation. 🙃

galad87 avatar Aug 10 '23 17:08 galad87