Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (76)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (9907)

  • FFMpeg avformat_write_header always returns < 0

    7 mai 2024, par gabe.roze

    We've asked a freelancer to build a video encoder with FFMPeg for iOS but there is a bug and the freelancer is no longer available. I very inexperienced in FFMpeg and video encoding and am trying to debug this error.

    &#xA;&#xA;

    From what I understand, we're attempting to create an output file and create a header for it however, avformat_write_header is always less than zero. If I comment it out, it does not work

    &#xA;&#xA;

    - (BOOL) writeHeaderWithError:(NSError *__autoreleasing *)error {&#xA;    AVDictionary *options = NULL;&#xA;&#xA;    // Write header for output file&#xA;    int writeHeaderValue = avformat_write_header(self.formatContext, &amp;options);&#xA;    if (writeHeaderValue &lt; 0) {&#xA;        if (error != NULL) {&#xA;            *error = [FFUtilities errorForAVError:writeHeaderValue];&#xA;        }&#xA;        av_dict_free(&amp;options);&#xA;        return NO;&#xA;    }&#xA;    av_dict_free(&amp;options);&#xA;    return YES;&#xA;}&#xA;

    &#xA;&#xA;

    Below is some relevant code of how we instantiate a FFOutputFile

    &#xA;&#xA;

        - (AVFormatContext*) formatContextForOutputPath:(NSString*)outputPath options:(NSDictionary*)options {&#xA;    AVFormatContext *outputFormatContext = NULL;&#xA;    NSString *outputFormatString = [options objectForKey:kFFmpegOutputFormatKey];&#xA;&#xA;    int openOutputValue = avformat_alloc_output_context2(&amp;outputFormatContext, NULL, [outputFormatString UTF8String], [outputPath UTF8String]);&#xA;    if (openOutputValue &lt; 0) {&#xA;        avformat_free_context(outputFormatContext);&#xA;        return nil;&#xA;    }&#xA;    return outputFormatContext;&#xA;}&#xA;&#xA;- (void) addOutputStream:(FFOutputStream*)outputStream {&#xA;    [self.streams addObject:outputStream];&#xA;}&#xA;&#xA;- (id) initWithPath:(NSString *)path options:(NSDictionary *)options {&#xA;    if (self = [super initWithPath:path options:options]) {&#xA;        self.formatContext = [self formatContextForOutputPath:path options:options];&#xA;        self.streams = [NSMutableArray array];&#xA;        self.bitstreamFilters = [NSMutableSet set];&#xA;    }&#xA;    return self;&#xA;}&#xA;

    &#xA;

  • avcodec_find_encoder(AV_CODEC_ID_H264) returns null

    28 février 2017, par Monjura Rumi

    I am building an android application which will encode image captured from camera preview and later decode it. I am using ffmpeg library to encode and decode. To build static library with x264 I have used this tutorial. http://dl.dropbox.com/u/22605641/ffmpeg_android/main.html. As a source code of ffmpeg if I use the one downloaded from the link given in tutorial I can built it but can’t build library if i use source code downloaded from here git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg. I have built library in ubuntu and using it in windows 7 in Eclipse. As I need only h264 encoder and decoder I have used following code for ffmpeg, slightly modified from tutorial.

    #!/bin/bash

    NDK=~/Documents/android-ndk-r8e
    PLATFORM=$NDK/platforms/android-8/arch-arm
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    PREFIX=/home/android-ffmpeg

    function build_one
    {
       ./configure --target-os=linux --prefix=$PREFIX \
       --enable-cross-compile \
       --enable-runtime-cpudetect \
       --disable-asm \
       --arch=arm \
       --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
       --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
       --disable-stripping \
       --nm=$PREBUILT/bin/arm-linux-androideabi-nm \
       --sysroot=$PLATFORM \
       --enable-nonfree \
       --enable-version3 \
       --disable-everything \
       --enable-gpl \
       --disable-doc \
       --enable-avresample \
       --disable-ffplay \
       --disable-ffserver \
       --enable-ffmpeg \
       --disable-ffprobe \
       --enable-avcodec \
       --enable-libx264 \
       --enable-encoder=libx264 \
       --enable-encoder=libx264rgb \
       --enable-decoder=h263 \
       --enable-decoder=h264 \
       --enable-decoder=svq3 \  
       --enable-zlib \
       --enable-gpl \
       --enable-pic \
       --disable-devices \
       --disable-avdevice \
       --extra-cflags="-I/home/android-ffmpeg/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \
       --extra-ldflags="-L/home/android-ffmpeg/lib"
    make -j4 install
    $PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
    $PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname libffmpeg.so -shared -nostdlib  -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog -lx264 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
    }

    build_one

    After building library I have been able to build android ndk. A little part of my JNI code is here.

    JNIEXPORT jint JNICALL Java_com_example_testjava_TestjniActivity_initencoder(JNIEnv* env,jobject obj){

       av_register_all();
       avcodec_register_all();
       codec = avcodec_find_encoder(AV_CODEC_ID_H264);
       if (!codec) {
         __android_log_write(ANDROID_LOG_INFO, "debug", "not found");                
          return -1;
       }
    .
    .
    .
    }

    When I run my java source code that calls initencoder() I get -1 as return value and logcat prints "not found". That means avcodec_find_encoder() returns null and if condition is being ok. I don’t know what’s wrong. Why this function is returning null ? I have searched a lot but did not find any solution that could guide me to right direction. some says to use avcodec_init(). But ndk-build command fails and shows error saying undefined reference to ’avcodec_init()’. I have started with library build because I thought may be I am doing wrong from the first stage. Did I make any mistake in library building like not enabling things that I should ? Please help me here. This is kind of urgent for me.

  • avcodec_find_encoder(AV_CODEC_ID_H264) returns null

    28 février 2017, par Monjura Rumi

    I am building an android application which will encode image captured from camera preview and later decode it. I am using ffmpeg library to encode and decode. To build static library with x264 I have used this tutorial. http://dl.dropbox.com/u/22605641/ffmpeg_android/main.html. As a source code of ffmpeg if I use the one downloaded from the link given in tutorial I can built it but can’t build library if i use source code downloaded from here git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg. I have built library in ubuntu and using it in windows 7 in Eclipse. As I need only h264 encoder and decoder I have used following code for ffmpeg, slightly modified from tutorial.

    #!/bin/bash

    NDK=~/Documents/android-ndk-r8e
    PLATFORM=$NDK/platforms/android-8/arch-arm
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    PREFIX=/home/android-ffmpeg

    function build_one
    {
       ./configure --target-os=linux --prefix=$PREFIX \
       --enable-cross-compile \
       --enable-runtime-cpudetect \
       --disable-asm \
       --arch=arm \
       --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
       --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
       --disable-stripping \
       --nm=$PREBUILT/bin/arm-linux-androideabi-nm \
       --sysroot=$PLATFORM \
       --enable-nonfree \
       --enable-version3 \
       --disable-everything \
       --enable-gpl \
       --disable-doc \
       --enable-avresample \
       --disable-ffplay \
       --disable-ffserver \
       --enable-ffmpeg \
       --disable-ffprobe \
       --enable-avcodec \
       --enable-libx264 \
       --enable-encoder=libx264 \
       --enable-encoder=libx264rgb \
       --enable-decoder=h263 \
       --enable-decoder=h264 \
       --enable-decoder=svq3 \  
       --enable-zlib \
       --enable-gpl \
       --enable-pic \
       --disable-devices \
       --disable-avdevice \
       --extra-cflags="-I/home/android-ffmpeg/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \
       --extra-ldflags="-L/home/android-ffmpeg/lib"
    make -j4 install
    $PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
    $PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname libffmpeg.so -shared -nostdlib  -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog -lx264 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
    }

    build_one

    After building library I have been able to build android ndk. A little part of my JNI code is here.

    JNIEXPORT jint JNICALL Java_com_example_testjava_TestjniActivity_initencoder(JNIEnv* env,jobject obj){

       av_register_all();
       avcodec_register_all();
       codec = avcodec_find_encoder(AV_CODEC_ID_H264);
       if (!codec) {
         __android_log_write(ANDROID_LOG_INFO, "debug", "not found");                
          return -1;
       }
    .
    .
    .
    }

    When I run my java source code that calls initencoder() I get -1 as return value and logcat prints "not found". That means avcodec_find_encoder() returns null and if condition is being ok. I don’t know what’s wrong. Why this function is returning null ? I have searched a lot but did not find any solution that could guide me to right direction. some says to use avcodec_init(). But ndk-build command fails and shows error saying undefined reference to ’avcodec_init()’. I have started with library build because I thought may be I am doing wrong from the first stage. Did I make any mistake in library building like not enabling things that I should ? Please help me here. This is kind of urgent for me.