
Recherche avancée
Autres articles (56)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8736)
-
FFmpeg support for libstagefright hardware decoding
25 février 2016, par Ming Zhangeveryone :
I am new to ffmpeg. Recently I am working on project to port ffmpeg to android device.
At the beginning, I compiled ffmpeg to shared libs(.so files) in a very normal way following some guides on Internet, load them into my android app. It works perfectly.Now I want ffmpeg to use libstagefright to fulfill HW decoding.
The problem is, I can compile the .so libs, but when I launch my app and load those .so libs, there is always a java.lang.UnsatisfiedLinkError :
Cannot load library : reloc_library[1314] : 114 cannot locate ’_ZN7android11MediaBufferC1Ej’I stuck there for a few days. Does anyone encountered any similar problems before ? It would be great if someone can give me some hint about this error.
My steps :
1. Compile ffmpeg-2.1.4 souce code to .so shared libs. I use the build_libstagefright script to do this, and make some modification based on some guides from Internet.#!/bin/bash
#export NDK=/home/mingzhang/android/android-ndk-r9c
export NDK=/home/mingzhang/android/android-ndk-r7
if [ "$NDK" = "" ]; then
echo NDK variable not set, assuming ${HOME}/android-ndk
export NDK=${HOME}/android-ndk
fi
echo "Fetching Android system headers"
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_base.git ../android-source/frameworks/base
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_av.git ../android-source/frameworks/av
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_native.git ../android-source/frameworks/native
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_hardware_libhardware.git ../android-source/hardware/libhardware
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_system_core.git ../android-source/system/core
echo "Fetching Android libraries for linking"
# Libraries from any froyo/gingerbread device/emulator should work
# fine, since the symbols used should be available on most of them.
#if [ ! -d "../android-libs" ]; then
# if [ ! -f "../update-cm-7.0.3-N1-signed.zip" ]; then
# wget http://download.cyanogenmod.com/get/update-cm-7.0.3-N1-signed.zip -P../
# fi
# unzip ../update-cm-7.0.3-N1-signed.zip system/lib/* -d../
# mv ../system/lib ../android-libs
# rmdir ../system
#fi
SYSROOT=$NDK/platforms/android-9/arch-arm
# Expand the prebuilt/* path into the correct one
#TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
TOOLCHAIN=/home/mingzhang/android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
export PATH=$TOOLCHAIN/bin:$PATH
ANDROID_SOURCE=../android-source
ANDROID_LIBS=../android-libs
ABI="armeabi-v7a"
CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
#CC=$TOOLCHAIN/bin/arm-eabi-gcc-4.4.3
NM=$TOOLCHAIN/bin/arm-linux-androideabi-nm
#NM=$TOOLCHAIN/bin/arm-eabi-nm
rm -rf ../build/stagefright
mkdir -p ../build/stagefright
ADDI_CFLAGS="-marm"
DEST=../build/stagefright
DEST="$DEST/$ABI"
FLAGS="--target-os=linux --arch=arm --cpu=armv7-a --cross-prefix=arm-linux-androideabi- --cc=$CC --nm=$NM"
#FLAGS="--target-os=linux --arch=arm --cpu=armv7-a --cross-prefix=arm-eabi- --cc=$CC --nm=$NM"
FLAGS="$FLAGS --sysroot=$SYSROOT"
#FLAGS="$FLAGS --disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-libstagefright-h264"
FLAGS="$FLAGS --enable-shared --disable-demuxers --disable-muxers --disable-parsers --disable-avdevice --disable-filters --disable-programs --disable-encoders --disable-decoders --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-decoder=libstagefright_h264 --enable-libstagefright-h264 \
--enable-asm \
--enable-neon \
--enable-cross-compile \
--enable-gpl \
--disable-static \
--enable-memalign-hack"
EXTRA_CFLAGS="-I$DEST/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/native/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/native/include/media/openmax"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/av/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/include -I$ANDROID_SOURCE/system/core/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/hardware/libhardware/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/media/libstagefright"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/include/media/stagefright/openmax"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$NDK/sources/cxx-stl/gnu-libstdc++/4.6/include -I$NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/$ABI/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$NDK/sources/cxx-stl/stlport/stlport"
EXTRA_CFLAGS="$EXTRA_CFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon -marm -mtune=cortex-a8"
EXTRA_CFLAGS="$EXTRA_CFLAGS -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -D_STLP_USE_NEWALLOC"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8 -L$ANDROID_LIBS -Wl,-rpath-link,$ANDROID_LIBS -L$NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/$ABI -static-libstdc++"
EXTRA_CXXFLAGS="-Wno-multichar -fno-exceptions -fno-rtti"
FLAGS="$FLAGS --prefix=$DEST"
mkdir -p $DEST
echo $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" > $DEST/info.txt
./configure $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" | tee $DEST/configuration.txt
[ $PIPESTATUS == 0 ] || exit 1
make clean
#make -j4 || exit 1
#make -j4
make install || exit 1-
Copy the compiled include and lib directories to my android-ndk-r7/sources/ffmpeg-2.1.4/android/arm directory. The Android.mk file under this directory is.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libavcodec
LOCAL_SRC_FILES := lib/libavcodec-55.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)include $(CLEAR_VARS)
LOCAL_MODULE := libavformat
LOCAL_SRC_FILES := lib/libavformat-55.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)include $(CLEAR_VARS)
LOCAL_MODULE := libswscale
LOCAL_SRC_FILES := lib/libswscale-2.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)include $(CLEAR_VARS)
LOCAL_MODULE := libavutil
LOCAL_SRC_FILES := lib/libavutil-52.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)include $(CLEAR_VARS)
LOCAL_MODULE := libavfilter
LOCAL_SRC_FILES := lib/libavfilter-3.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)include $(CLEAR_VARS)
LOCAL_MODULE := libwsresample
LOCAL_SRC_FILES := lib/libswresample-0.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY) -
Under the jni directory of my android app, the Android.mk is.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libripple
#LOCAL_CFLAGS := -Werror
LOCAL_SRC_FILES := entrypoint.cpp scene.cpp
LOCAL_LDLIBS := -llog -lGLESv2 -lm
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := myfflib
LOCAL_SRC_FILES := fflib.c
LOCAL_LDLIBS := -L/home/mingzhang/ffmpeg_android/android-libs -llog -ljnigraphics -lz -landroid -ldl -lm -llog -lgcc -lc -lstagefright -lmedia -lutils -lbinder #-lstdc++
LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil libutils libstagefright libbinder libmedia libstdc++-6
include $(BUILD_SHARED_LIBRARY)
$(call import-module,ffmpeg-2.1.4/android/arm)And the Application.mk is :
APP_ABI=armeabi-v7a
#APP_STL=gnustl_static
APP_STL=stlport_static
I am not sure what else materials you need, if anything is missing, please let me know, I will upload it.
Thank you guys very much !!! -
-
Problems compiling object using arm-linux-androideabi-gcc and android ndk
24 septembre 2014, par shishir123I am trying to build FFmpeg source file using android ndk r8b version . My linux version is CentOs 6.5.I am following this instruction from this link https://github.com/yixia/FFmpeg-Android
Here is bash script which is I am trying to execute#!/bin/bash
DEST=`pwd`/build/ffmpeg && rm -rf $DEST
SOURCE=`pwd`/ffmpeg
if [ -d ffmpeg ]; then
cd ffmpeg
else
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
fi
git reset --hard
git clean -f -d
git checkout `cat ../ffmpeg-version`
patch -p1 <../FFmpeg-VPlayer.patch
[ $PIPESTATUS == 0 ] || exit 1
git log --pretty=format:%H -1 > ../ffmpeg-version
TOOLCHAIN=/tmp/vplayer
SYSROOT=$TOOLCHAIN/sysroot/
$ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=android-14 --install- dir=$TOOLCHAIN
export PATH=$TOOLCHAIN/bin:$PATH
export CC=arm-linux-androideabi-gcc
export LD=arm-linux-androideabi-ld
export AR=arm-linux-androideabi-ar
CFLAGS="-O3 -Wall -mthumb -pipe -fpic -fasm \
-finline-limit=300 -ffast-math \
-fstrict-aliasing -Werror=strict-aliasing \
-fmodulo-sched -fmodulo-sched-allow-regmoves \
-Wno-psabi -Wa,--noexecstack \
-D__ARM_ARCH_5__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__ \
-DANDROID -DNDEBUG"
FFMPEG_FLAGS="--target-os=linux \
--arch=arm \
--enable-cross-compile \
--cross-prefix=arm-linux-androideabi- \
--enable-shared \
--disable-symver \
--disable-doc \
--disable-ffplay \
--disable-ffmpeg \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-encoders \
--disable-muxers \
--disable-filters \
--disable-devices \
--disable-everything \
--enable-protocols \
--enable-parsers \
--enable-demuxers \
--enable-decoders \
--enable-bsfs \
--enable-network \
--enable-swscale \
--disable-demuxer=sbg \
--disable-demuxer=dts \
--disable-parser=dca \
--disable-decoder=dca \
--enable-asm \
--enable-version3"
for version in neon armv7 vfp armv6; do
cd $SOURCE
case $version in
neon)
EXTRA_CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
;;
armv7)
EXTRA_CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
;;
vfp)
EXTRA_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=softfp"
EXTRA_LDFLAGS=""
;;
armv6)
EXTRA_CFLAGS="-march=armv6"
EXTRA_LDFLAGS=""
;;
*)
EXTRA_CFLAGS=""
EXTRA_LDFLAGS=""
;;
esac
PREFIX="$DEST/$version" && mkdir -p $PREFIX
FFMPEG_FLAGS="$FFMPEG_FLAGS --prefix=$PREFIX"
./configure $FFMPEG_FLAGS --extra-cflags="$CFLAGS $EXTRA_CFLAGS" --extra- ldflags="$EXTRA_LDFLAGS" | tee $PREFIX/configuration.txt
cp config.* $PREFIX
[ $PIPESTATUS == 0 ] || exit 1
make clean
make -j4 || exit 1
make install || exit 1
rm libavcodec/inverse.o
$CC -lm -lz -shared --sysroot=$SYSROOT -Wl,--no-undefined -Wl,-z,noexecstack $EXTRA_LDFLAGS libavutil/*.o libavutil/arm/*.o libavcodec/*.o libavcodec/arm/*.o libavformat/*.o libswresample/*.o libswscale/*.o -o $PREFIX/libffmpeg.so
cp $PREFIX/libffmpeg.so $PREFIX/libffmpeg-debug.so
arm-linux-androideabi-strip --strip-unneeded $PREFIX/libffmpeg.so
doneNow i am getting this error
./FFmpeg-Android.sh: line 26: export:
arm-linux-androideabi-gcc’ : not a valid identifier
arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.`The code in 26 number line is
export CC=arm-linux-androideabi-gcc
any idea why the problem is happening ?? a help would be appreciated . -
HLS MPEG-TS metadata stream using FFMPEG
20 janvier 2015, par Ramesh PrasadI want to create mpeg ts segment for HLS streaming. The ts should contain metadata as a separate stream as shown below-
**Stream #0:0**[0x102]: Data: timed_id3 (ID3 / 0x20334449)
**Stream #0:1**[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 426x240, 25 fps, 25 tbr, 90k tbn, 6k tbc
**Stream #0:2**[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 98 kb/sI am using ffmpeg and have tried various option. I get the following ts structure-
**service_name** : Service01
**service_provider**: FFmpeg
**Stream #0:0[0x100]**: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 1:1 DAR 5:4], max. 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
**Stream #0:1[0x101]**: Audio: mp2 ([3][0][0][0] / 0x0003), 16000 Hz, mono, s16p, 143 kb/susing the following command-
ffmpeg -i news.ts -t 10 -metadata:s:v:0 TITLE="Some Provider" -id3v2_version 4 -write_id3v1 1 segid3.ts
How to get the metadata as a separate stream in the ts file using ffmpeg ?