Closed smhk closed 5 years ago
Hi, smhk. Please share your demo project with me, I will take a look tomorrow.
For sure, I'll check it a bit more with different test files, and then email it to you thanks a million
Ok I have learned that FFMPEG IS VERY WEAK AT DOING HARDWARE ACCEL on iOS
What happens is it does not choose the correct codec ...
HERE IS THE SECRET:
You have to do exactly what that guy says in the two paragraphs starting at:
Out of the list of available pixel formats we receive .............
you do not get hardware acceleration in ffmpegapi/most-iPhones unless you do all that.
we increased performance from 7 to 10 frames per second, to 120 to 150 frames per second :)
We did that in our C - ffmpeg - Unity codebase, I will try to work out how to do it in the Swift side!!!!!!!!!!
THANK YOU!
We made a simple C program - including ffmpegapi library - for the iPhone.
All it does is open a local .ts file, and demux/decode it. So just ..
On any iPhone this consistently spits out 60 fps.
But if I use SwiftFFmpeg ...
On an iPhone 6S I get 20 .. 35 fps
oddly on a brand new XR i get 8 fps (eight)
I am only decoding and doing nothing else.
This seems strange,
anyone else see this?
what could possibly cause it??
NOTE even the 60 or so, with the C codebase, is very slow. There is no reason for it to be so slow.