ios – FFmpeg Arthenica always encodes with x265 Main10 profile
I’m using FFmpeg-Kit (Arthenica) for iOS to compress videos using the libx265 encoder. I’m building FFmpeg with a custom configuration script:
export CUSTOM_CONFIG="--disable-indevs \
--disable-outdevs \
--disable-hwaccels \
--enable-videotoolbox \
--disable-protocols \
--enable-protocol=file,fd,saf,async \
--disable-decoders \
--enable-decoder=${ENABLE_DECODER_LIST} \
--disable-encoders \
--enable-encoder=${ENABLE_ENCODER_LIST}"
export CUSTOM_CONFIG_IOS=${CUSTOM_CONFIG}
./ios.sh --enable-ios-videotoolbox --enable-lame --enable-libaom --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-opencore-amr --enable-openh264 --enable-opus --enable-twolame --enable-x264 --enable-x265 --enable-gpl
Then I run FFmpeg with the following commands:
-y -hide_banner -i input.MOV -vcodec libx265 -x265-params profile=main output.mov
-y -hide_banner -i input.MOV -vcodec libx265 -x265-params profile=main10 output.mov
However, regardless of the profile I set, the output always ends up being encoded with the Main10 profile.
Here’s the log output:
x265 [info]: HEVC encoder version 3.4
x265 [info]: build info [Mac OS X][clang 16.0.0][32 bit][noasm] 10bit
x265 [info]: using cpu capabilities: none!
x265 [info]: Main 10 profile, Level-5 (Main tier)
It seems that the FFmpeg build only supports 10-bit encoding. I want to be able to encode with different profiles (main, main10, etc.), as well as to build libx265 in a way that supports 8-bit + 10-bit + 12-bit encoding (unified 64-bit build), as like as the same command executes for MacOS.
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Mac OS X][clang 16.0.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: NEON Neon_DotProd Neon_I8MM
x265 [info]: Main profile, Level-2.1 (Main tier)
How can I correctly configure and build FFmpeg and libx265 with Mobile FFmpeg to support multiple bit depths and allow setting different profiles via -x265-params?
Read more here: Source link
