kewlbear / FFmpeg-iOS-build-script

Shell scripts to build FFmpeg for iOS and tvOS
3.03k stars 897 forks source link

How to compile ffmpeg 2.8 with --enable-videotoolbox supported for iOS? #58

Closed app174 closed 8 years ago

app174 commented 8 years ago

--enable-videotoolbox option is [autodetect] in FFmpeg's configure script.

I ADD A LINE in build-ffmpeg.sh, to exit after ./configure running:

    TMPDIR=${TMPDIR/%\/} $CWD/$SOURCE/configure \
        --target-os=darwin \
        --arch=$ARCH \
        --cc="$CC" \
        $CONFIGURE_FLAGS \
        --extra-cflags="$CFLAGS" \
        --extra-ldflags="$LDFLAGS" \
        --prefix="$THIN/$ARCH" \
    || exit 1

    #exit after ./configure running
    exit 0

    make -j3 install $EXPORT || exit 1
    cd $CWD

After running build-ffmpeg.sh, the ./configure lists the enabled features: ... Enabled hwaccels:

...

There's no enabled hwaccels.

if I directly run ./configure in FFmpeg-2.8 source , without any option, hwaccels will be enabled in the output:

Enabled hwaccels: h263_videotoolbox h264_videotoolbox mpeg4_videotoolbox h264_vda mpeg1_videotoolbox h264_vda_old mpeg2_videotoolbox

So, How to compile ffmpeg 2.8 with --enable-videotoolbox supported for iOS? plz help, thx

kewlbear commented 8 years ago

You can add --enable-videotoolbox to CONFIGURE_FLAGS.

app174 commented 8 years ago

add --enable-videotoolbox to CONFIGURE_FLAGS is not work.

config.h:

define CONFIG_VIDEOTOOLBOX 0

define CONFIG_H263_VIDEOTOOLBOX_HWACCEL 0

define CONFIG_H264_VIDEOTOOLBOX_HWACCEL 0

define CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL 0

define CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL 0

define CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL 0

it's not effect the config.h . after the ./configure,will generate the config.h file. make will use the config.h to compile. so, it's not work.

kewlbear commented 8 years ago

From Changelog:

  • OS X VideoToolbox support

So I guess it's not ported to iOS yet. You should contact VideoToolbox maintainer if you need it.

app174 commented 8 years ago

the issue was solved by using FFmpeg-master instead of release2.8 version. thx

redfearnk commented 7 years ago

@app174 Were you able to get VideoToolbox to work on iOS? When I compile ffmpeg with the --enable-videotoolbox configure flag, I get the same problem as you had, the video toolbox macros are all 0