-
Notifications
You must be signed in to change notification settings - Fork 25
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
Addition of VideoToolbox hardware acceleration codecs in ffmpeg #8
Comments
Thanks for the detailed report and the links. |
Update: ffmpeg compiles for iOS with Enabling Arm64 assembly, even using the tips described at DeviLeo/DLGPlayer#19 (comment) did not work. There are still many steps to make it compatible with the rest of a-Shell, but that's a beginning. |
Update: everything works except videotoolbox acceleration. I get some weird "DTS is invalid" errors, and the encoding stops. |
Update: ffmpeg compiled natively to arm64, with videotoolbox acceleration, is available for TestFlight testing. To make it work, you need to delete or rename the WebAssembly version. |
This is has been shipped, right? |
Yes. If you already installed the WebAssembly version of ffmpeg, you need to uninstall it. |
@holzschu The quality mode encoding is currently not working
It should be supported for Apple Silicon (https://trac.ffmpeg.org/wiki/HWAccelIntro#VideoToolbox) I think you just need to enable neon during compilation as Homebrew: |
If I remember correctly, |
Seems to me, that ffmpeg-kit has neon enabled: Maybe this helps |
Hi,
I've noticed when I was encoding a video and audio file together in a-Shell, it takes a bit of patience for it to finish and heats the device up considerably, which lead me into researching a bit more. Turns out ffmpeg does support hardware acceleration on iOS and it's called VideoToolbox. Here's more info from ffmpeg:
https://trac.ffmpeg.org/wiki/HWAccelIntro#VideoToolbox
As far as I can tell, a build of ffmpeg embedded within a-Shell has no ability of hardware acceleration. But, you can add
--enable-videotoolbox
flag in FFmpeg configure script to enable it.$ ffmpeg -h encoder=h264_videotoolbox
configuration: --cc=/Users/holzschu/src/Xcode_iPad/wasi-sdk/opt/bin/clang --ar=/Users/holzschu/src/Xcode _iPad/wasi-sdk/opt/bin/ar --ranlib=/Users/holzschu/src/Xcode_iPad/wasi-sdk/opt/bin/ranlib --disable-asm -- enable-cross-compile --disable-avfoundation --disable-appkit --disable-network --disable-pthreads --disabl e-debug --enable-libx264 --enable-gpl
Codec 'h264_videotoolbox' is not recognized by FFmpeg.
Apparently you can check it in ./configure after running the build script:
kewlbear/FFmpeg-iOS-build-script#58
Here's a build configuration example shared by devs of some app (just in case it helps):
https://medium.com/liveop-x-team/accelerating-h264-decoding-on-ios-with-ffmpeg-and-videotoolbox-1f000cb6c549
The text was updated successfully, but these errors were encountered: