Recherche avancée

Médias (91)

Autres articles (62)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (9932)

  • Creating thumbnails with FFmpeg

    3 janvier 2012, par Calin-Andrei Burloiu

    I am using FFmpeg to extract thumbnails from specific positions of video files.

    I found on the web two approaches to do this :

    1. With -ss (seek) parameter before -i (input) parameter :

      ffmpeg -y -ss $SEEK_POINT -i input.ogv -vcodec mjpeg -vframes 1 -an -s 120x90 -f rawvideo output.jpg

    2. With -ss (seek) parameter after -i (input) parameter :

      ffmpeg -y -i input.ogv -vcodec mjpeg -ss $SEEK_POINT -vframes 1 -an -s 120x90 -f rawvideo output.jpg

    The first method generates a bad thumbnail with gray spots, but works very fast. The error returned is [theora @ 0x8097240] vp3: first frame not a keyframe.

    The second method always works but show an error which cause the extraction to take a lot of time. This amount of time is not fixed and it depends on the seek point as I noticed. Sometimes it takes a few seconds and other times several minutes to extract a thumbnail. I get the error Buffering several frames is not supported. Please consume all available frames before adding a new one. in the following output :

    Input #0, ogg, from 'input.ogv':
     Duration: 00:21:52.76, start: 0.000000, bitrate: 844 kb/s
       Stream #0.0: Video: theora, yuv420p, 800x600 [PAR 4:3 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
       Stream #0.1: Audio: vorbis, 44100 Hz, stereo, s16, 192 kb/s
       Metadata:
         ENCODER         : Lavf52.102.0
    Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'                                                                        
    [buffer @ 0x9250840] w:800 h:600 pixfmt:yuv420p                                
    [scale @ 0x92508a0] w:800 h:600 fmt:yuv420p -> w:120 h:90 fmt:yuvj420p flags:0x4
    Output #0, rawvideo, to 'output.jpg':
     Metadata:
       encoder         : Lavf53.2.0
       Stream #0.0: Video: mjpeg, yuvj420p, 120x90 [PAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    [buffer @ 0x9250840] Buffering several frames is not supported. Please consume all available frames before adding a new one.                                    
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbit
    Last message repeated 15448 times
    frame=    1 fps=  0 q=3.4 Lsize=       3kB time=0.04 bitrate= 598.8kbits/s    
    video:3kB audio:0kB global headers:0kB muxing overhead 0.000000%

    How can I extract thumbnails without any problems using FFmpeg from a custom position of a video regardless of the input format ?

  • Undefined Reference - ffmpeg on android ndk

    28 décembre 2012, par Gabriel Simões

    I´ve spent many hours trying to figure out why I still get "undefined reference" when trying to link to ffmpeg.
    I´ve already read most if not all posts and sites about the subject, so I think I´m missing something little here and I hope you can help me.

    What I have :

    I´m using windows 7 + cygwin + crystax r4.
    I´ve compiled FFMPEG using RockPlayer's ffmpeg source plus some modifications I did (only to include / exclude demuxes, decoders, encoders, ...)
    After compiling, I get :

    • a new folder named armv5te, which includes :
    • a folder named "include" with all folders for each libs' .h
    • a folder named "lib" which includes all libs' .a
    • a shared library named libffmpeg.so (checked soname and it is libffmpeg)

    The shared library isn´t also placed on project/lib/armeabi/libffmpeg.so

    After compiling I tried to compile my project and link it. While my .cpp compiles ok, I get many undefined references.

    here is my build script :

    NDK=/cygdrive/c/Gabriel/Desenvolvimento/SDKs/Android/android-ndk-r4-crystax
    PLATFORM=$NDK/build/platforms/android-8/arch-arm/
    PREBUILT=$NDK/build/prebuilt/windows/arm-eabi-4.4.0


    function build_one
    {

    ./configure --target-os=linux \
       --prefix=$PREFIX \
       --enable-cross-compile \
       --extra-libs="-lgcc" \
       --arch=arm \
       --cc=$PREBUILT/bin/arm-eabi-gcc \
       --cross-prefix=$PREBUILT/bin/arm-eabi- \
       --nm=$PREBUILT/bin/arm-eabi-nm \
       --sysroot=$PLATFORM \
       --extra-cflags=" -O2 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums  -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
       --disable-shared \
       --enable-static \
       --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib  -nostdlib -lc -lm -ldl -llog" \
       --disable-stripping \
       --disable-debug \
       --disable-symver \
       --disable-ffprobe \
       --disable-devices \
       --disable-avfilter \
       --disable-swscale \
       --disable-ffplay \
       --disable-ffserver \
       --disable-network \
           (many more ...)
       --enable-asm \
       $ADDITIONAL_CONFIGURE_FLAG

    #make clean
    make  -j4 install

    $PREBUILT/bin/arm-eabi-ar d libavcodec/libavcodec.a inverse.o

    $PREBUILT/bin/arm-eabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib  -soname libffmpeg.so -shared -nostdlib  -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a  -lc -lm -lz -ldl -llog  --warn-once  --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-eabi/4.4.0/libgcc.a

    }

    #arm v5
    CPU=armv5te
    OPTIMIZE_CFLAGS="-marm -march=$CPU"
    PREFIX=./android/$CPU
    ADDITIONAL_CONFIGURE_FLAG=
    build_one

    Here is my android.mk :

    LOCAL_PATH := $(call my-dir)

    #declare the prebuilt library
    include $(CLEAR_VARS)
    LOCAL_MODULE := ffmpeg-prebuilt
    LOCAL_SRC_FILES := $(LOCAL_PATH)/ffmpeg/android/armv5te/libffmpeg.so
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/android/armv5te/include
    LOCAL_PRELINK_MODULE := true
    include $(PREBUILT_SHARED_LIBRARY)

    include $(CLEAR_VARS)
    LOCAL_MODULE    := audiocodec
    LOCAL_SRC_FILES := ffmpeg_audio.cpp
    LOCAL_SHARED_LIBRARY := libffmpeg
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/android/armv5te/include
    LOCAL_LDLIBS    := -llog -ljnigraphics -lz -lm $(LOCAL_PATH)/ffmpeg/android/armv5te/libffmpeg.so
    include $(BUILD_SHARED_LIBRARY)

    The result :

    Compile++ thumb: audiocodec <= /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFM
    PEG/jni/ffmpeg_audio.cpp
    SharedLibrary  : libaudiocodec.so
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeabi/objs/audi
    ocodec/ffmpeg_audio.o: In function `Java_gabriel_audioslower_pro_ffmpegDecoder_r
    eadSamples':
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:172: u
    ndefined reference to `avcodec_decode_audio3(AVCodecContext*, short*, int*, AVPa
    cket*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:178: u
    ndefined reference to `av_read_frame(AVFormatContext*, AVPacket*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeabi/objs/audi
    ocodec/ffmpeg_audio.o: In function `Java_gabriel_audioslower_pro_ffmpegDecoder_s
    eekToPosMS':
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:147: u
    ndefined reference to `av_rescale_q(long long, AVRational, AVRational)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:150: u
    ndefined reference to `av_seek_frame(AVFormatContext*, int, long long, int)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:151: u
    ndefined reference to `avcodec_flush_buffers(AVCodecContext*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:152: u
    ndefined reference to `av_read_frame(AVFormatContext*, AVPacket*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeabi/objs/audi
    ocodec/ffmpeg_audio.o: In function `Java_gabriel_audioslower_pro_ffmpegDecoder_c
    loseFile':
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:82: un
    defined reference to `avcodec_close(AVCodecContext*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:83: un
    defined reference to `av_free(void*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:84: un
    defined reference to `av_close_input_file(AVFormatContext*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeabi/objs/audi
    ocodec/ffmpeg_audio.o: In function `Java_gabriel_audioslower_pro_ffmpegDecoder_o
    penAudioFile':
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:37: un
    defined reference to `av_open_input_file(AVFormatContext**, char const*, AVInput
    Format*, int, AVFormatParameters*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:44: un
    defined reference to `av_find_stream_info(AVFormatContext*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:52: un
    defined reference to `avcodec_find_decoder(CodecID)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:60: un
    defined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:67: un
    defined reference to `av_malloc(unsigned int)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:70: un
    defined reference to `av_read_frame(AVFormatContext*, AVPacket*)'
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeabi/objs/audi
    ocodec/ffmpeg_audio.o: In function `JNI_OnLoad':
    /cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/jni/ffmpeg_audio.cpp:25: un
    defined reference to `av_register_all()'
    collect2: ld returned 1 exit status
    make: *** [/cygdrive/c/Gabriel/Desenvolvimento/Workspace/FFMPEG/obj/local/armeab
    i/libaudiocodec.so] Error 1

    Something interesting is that some functions from ffmpeg, as av_register_all(), do now show up on the list of undefined references.

    Any ideas on what I can do to fix it ? I´ve spent 3 days trying to make things work ..
    Thanks !

  • FFmpeg / Create video / Add caption (timestamp) of each jpg file to generate mp4

    17 août 2012, par low

    I've got some pictures, as screenshot-1.jpg, ..., screenshot-345.jpg, cycle of automatic capture from my computer (cycle of 30 seconds). I use FFmpeg to generate a video mp4 format, but, I want to add on the video the timestamp of each jpg file.

    This is my command line of FFmpeg :

    ffmpeg.exe -f image2 -r 4 -i screenshot-%0d.jpg -b 512000 -s 3840x1200 -sameq video.mp4

    In this case, I can show the date/time during de video play.

    Thanks.
    Low