ArturoAmaya / ScriptParser

A *VERY* basic python script parser for HeyGen scripts
1 stars 0 forks source link

Hardware acceleration speedup #2

Open ArturoAmaya opened 5 months ago

ArturoAmaya commented 5 months ago

So, running this with a CPU only is very very slow. It took 60 minutes for it to make a 16-minute video. There are GPUs that exist. However, that is a platform specific problem - specific hardware uses specific accelerators.

I use an M2 Mac. M-series Macs use videotoolbox made by Apple, but per FFMPEG it does not support filters. That means that I can only concat videos, no transitions.

Need to think about how to get hw-accelerated videos because they are about 7 times faster.

ArturoAmaya commented 4 months ago

Comments can be found in the stats folder. The basic summary is that I can cut down greatly on time taken and on final file size without sacrificing video or audio quality by concatenating all the groups of 5 mini-clips using the hw-accelerator and then receding the whole finished file with software as opposed to the hw accelerator. I can make a 60 minute clip in about 49 minutes at only 100 MB more than the original CPU-only which took about 2 hours.

I am NOT going to close this issue yet simply because I don't know the target platform. As mentioned in the original description, HW accelerators are literally hardware specific. I can try to create un-testable implementations but that makes no practical sense.