Ok, why didn't anyone tell me about the videotoolbox tag when using ffmpeg on Apple Silicon?
Transcoding one video using my usual script chuntered along at .6x, while the same video using -h264_videotoolbox speeds it up to 2.2x.
I'll have that.
Ok, why didn't anyone tell me about the videotoolbox tag when using ffmpeg on Apple Silicon?
Transcoding one video using my usual script chuntered along at .6x, while the same video using -h264_videotoolbox speeds it up to 2.2x.
I'll have that.
By way of (unfair) comparison, transcoding a file on my work PC with its 4ghz i3 and integrated GPU, it's chugging along at 2800kbps / .64x speed.
The same file on my M2 MacBook using videotoolbox is going at 6800kbps . 2.27x speed.
Now running the test with the same input file as before, using hevc_videotoolbox. It's going at 7300kbps, and almost 3x speed.
Blimey.
So it turns out that if you're using ffmpeg without actively including hardware acceleration, you're setting yourself up for a bad time. Obvious, I'm sure. But I didn't realise until a few minutes ago that ffmpeg doesn't use the GPU automatically, and that you have to ask it to.
Just run the conversion on the same video file as before on my work PC with its integrated Intel i3 GPU which converted at 6.4x speed.
I'm actually blown away.
All this time I've been getting my poor server to convert downloaded videos using the CPU and just accepting that it'll have to ramp up to 100% on all four cores, and I could have been using the (modest, but integrated) GPU.
@DJDarren From what I gather* is that sometimes the output doesn't look as sharp. Obviously as well all depends on the source and all that other nonsense. *You've got working eyes, I don't.
@klittle667 Yeah, that's pretty much a test of the raw speed. I guess in reality I'll dial it back a bit.
@DJDarren as you alluded to earlier, I believe GPU offloading can lead to a drop in quality, hence it’s not used by default.
@WiteWulf I shall bear that in mind and run some tests.
@DJDarren tbh, I doubt you’ll notice the difference. It’s just the ffmpeg greybeards being hypercritical (in a good way)