Android - ffmpeg versucht, die Unterstützung von ogg / vorbis einzubinden

631
Mihaela

Ich habe versucht, die Unterstützung für libogg / libvorbis / libmp3lame zu ffmpeg hinzuzufügen, das für Android kompiliert wurde. Für libogg habe ich verwendet:

 LINKER_LIBS="$LINKER_LIBS -logg" cd libogg  autoreconf -ivf export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/ export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/ ./configure \ --prefix=$(pwd)/$PREFIX \ --host=$HOST \ --disable-shared \ --enable-static \ --with-pic \ || exit 1 make clean || exit 1 make -j$ install || exit 1 cd .. 

Für libvorbis habe ich verwendet:

 LINKER_LIBS="$LINKER_LIBS -logg -lvorbis -lvorbisenc -lvorbisfile" cd vorbis ADDITIONAL_CONFIGURE_FLAG="$ADDITIONAL_CONFIGURE_FLAG --enable-libvorbis" # autoreconf -ivf ./autogen.sh export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/ export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/ ./configure \ --prefix=$(pwd)/$PREFIX \ --host=$HOST \ --disable-shared \ --enable-static \ --with-OGG=yes \ --with-pic \ $ADDITIONAL_CONFIGURE_FLAG \ || exit 1 make clean || exit 1 make -j$ install || exit 1 cd .. 

Für libmp3lame habe ich verwendet:

LINKER_LIBS="$LINKER_LIBS -lmp3lame" cd lame ADDITIONAL_CONFIGURE_FLAG="$ADDITIONAL_CONFIGURE_FLAG --enable-libmp3lame" export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/ export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/ ./configure \ --prefix=$(pwd)/$PREFIX \ --host=$HOST \ --disable-shared \ --enable-static \ --with-VORBIS=yes \ --with-pic \ $ADDITIONAL_CONFIGURE_FLAG \ || exit 1 make clean || exit 1 make -j$ install || exit 1 cd .. 

Und zum Schluss für ffmpeg habe ich verwendet:

LINKER_LIBS="$LINKER_LIBS -lavcodec -lavformat -lavresample -lavutil -lswresample -lswscale" PKG_CONFIG=$pkg-config if [ ! -f $PKG_CONFIG ]; then cat > $PKG_CONFIG << EOF 

#!/bin/bash  pkg-config \$* EOF chmod u+x $PKG_CONFIG fi cd ffmpeg export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/ export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/ ./configure --target-os=linux \ --prefix=$PREFIX \ --enable-cross-compile \ --arch=$ARCH \ --cc=$CC \ --cross-prefix=$CROSS_COMPILE \ --nm=$NM \ --sysroot=$SYSROOT \ --extra-libs=$LIBGCC_LINK \ --extra-cflags=" -O3 -DANDROID -fpic -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -I$PREFIX/include $OPTIMIZE_CFLAGS" \ --disable-shared \ --enable-static \ --enable-runtime-cpudetect \ --extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -L$PREFIX/lib" \ --enable-bsfs \ --enable-decoders \ --enable-encoders \ --enable-parsers \ --enable-hwaccels \ --enable-muxers \ --enable-avformat \ --enable-avcodec \ --enable-avresample \ --enable-libvorbis \ --enable-zlib \ --enable-libmp3lame \ --disable-doc \ --disable-ffplay \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-avfilter \ --disable-avdevice \ --enable-nonfree \ --enable-version3 \ --disable-stripping \ --disable-linux-perf \ --enable-asm \ $ADDITIONAL_CONFIGURE_FLAG \ || exit 1 make clean || exit 1 make -j$ install || exit 1 cd .. 

Aber wenn ich versuche, es zu erstellen, habe ich auf ffbuild / config.log:

../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_readinit' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_read' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_read' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_readinit' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_read' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_read' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_bytes' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_bytes' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeinit' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_bytes' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_bytes' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeclear' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeclear' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeinit' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_reset' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_reset' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeclear' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeclear' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_look' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_look' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_look' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_look' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_adv' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(bitrate.o):bitrate.c:function vorbis_bitrate_addblock: error: undefined reference to 'oggpack_writetrunc' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(bitrate.o):bitrate.c:function vorbis_bitrate_flushpacket: error: undefined reference to 'oggpack_get_buffer' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(block.o):block.c:function vorbis_block_init: error: undefined reference to 'oggpack_writeinit' ../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(block.o):block.c:function vorbis_block_init: error: undefined reference to 'oggpack_writeinit' collect2: error: ld returned 1 exit status ERROR: vorbis not found using pkg-config 

Es scheint, dass libogg nicht gefunden wird. Es existiert jedoch in der Nähe aller anderen Bibliotheken im Verzeichnis armeabi-v7a / lib. Ich habe versucht, -log überall zu platzieren: beim Erstellen von libvorbis, libmp3lame, ffmpeg, aber kein Erfolg.

Irgendein Hinweis? Vielen Dank.

0
Es scheint, dass es notwendig war, -log an das ./configure-Skript für ffmpeg zu übergeben. Problem gelöst. Mihaela vor 6 Jahren 0

0 Antworten auf die Frage