Description
I have installed mobile-ffmpeg-full ~> 4.2.1 using pod on Xcode. But in order to enable x264 I had to done a custom build. After successfully completing the custom build I imported all frameworks and run it on an iOS device. Everything has worked fine but conversion speed becomes much slower than the mobile-ffmpeg-full ~> 4.2.1 one.
Expected behavior
After applying custom build with iOS.sh script, conversion speed should be the same as mobile-ffmpeg-full ~> 4.2.1 pod.
Current behavior
Using custom build with iOS.sh script: converted .mov file to .3gb took ~5minutes whereas mobile-ffmpeg-full ~> 4.2.1 via pod took only 50seconds. Tested with the same file, keeping codec info same as well.
Environment
Other
iOS.sh build script command:
/ios.sh -s --disable-x86-64 --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-zlib --enable-freetype --enable-fribidi --enable-gmp --enable-gnutls --enable-kvazaar --enable-lame --enable-libass --enable-libiconv --enable-libilbc --enable-libtheora --enable-libvpx --enable-opencore-amr --enable-openh264 --enable-opus --enable-sdl --enable-shine --enable-wavpack --enable-gpl --enable-x264
Can you please share outputs of both executions?
Output log? or Output file?
I mean output logs.
Your analysis is correct, you are using different encoders. Their encoding speed is different and this is creating the difference between your executions.
If you specify encoder name explicitly then conversion speed will be the same. You can use -vcodec libx264 or -vcodec h264_videotoolbox. Videotoolbox is hw assisted and the faster one on iOS.
By the way, libx264 is not included in the full package of mobile-ffmpeg but there are other packages like min-gpl, https-gpl or full-gpl which include libx264. You can use them instead of creating your own build.
h264_videotoolbox encoder works faster but it reduces output resolution.
However, My issue has been fixed, I am using full-gpl now.
Thank you for your nice collaboration.
Happy to hear that.