Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (9727)

  • mp4 to webm and ogv conversion not working using ffmpeg on linux server

    9 novembre 2016, par user75472

    I have a cron job to convert existing mp4 video file to ogv and webm using ffmpeg

    I have wordpress site with a page where user are allowed to upload mov and mp4 files. After the file is uploaded image is created from the video file and mov file is converted to mp4 successfully.

    However I need to concert uploaded mp4 file to webm and ogv to video work on all browsers. So I have set up cron job. Here is my code :

    include_once "../wp-config.php";
    ini_set('max_execution_time', 660); // 11 minutes
    // Get the path to the upload directory.
    $wp_upload_dir = wp_upload_dir();
    $dir = $wp_upload_dir['path'].'/';

    // Open a directory, and read its contents
    if (is_dir($dir)){
     if ($dh = opendir($dir)){
       while (($file = readdir($dh)) !== false){
         //echo "filename:" . $file . "<br />";
         $files = explode(".", $file);
         //echo end($fileinfo);
         if(end($fileinfo) == 'mp4') {
             $ffmpegPath = '/usr/local/bin/'; // linux
           //$ffmpegPath = 'C:\\ffmpeg\\bin\\'; // win
           if(!file_exists($dir.$files[0].'.webm')) {

                   $destFile = $dir.$files[0].'.webm';

                   $cmd = $ffmpegPath."ffmpeg -i ".$srcFile." -c:v libvpx -minrate 3900k -maxrate 3900k -b:v 3900k -c:a libvorbis ".$destFile;

             exec($cmd, $output, $retval);
             var_dump($output);
             var_dump($retval);
                   //exec($cmd);
           }
           if(!file_exists($dir.$files[0].'.ogv')) {
               //var_dump($fileinfo);
                   $destFile = $dir.$files[0].'.ogv';

                   $cmd1 = $ffmpegPath."ffmpeg -i ".$srcFile." -acodec libvorbis -ac 2 -ab 128k -ar 44100 -b:v 1200k ".$destFile;

             exec($cmd1, $output1, $retval1);
             var_dump($output1);
             var_dump($retval1);
           }
         }
       }
       closedir($dh);
     }
    }

    This works perfectly alright on windows but not working on linux, production server.

    I am missing something ?

  • Apply filters to video while preview and save it with applied filter and original audio in android

    11 juillet 2016, par Rajkumar

    Dear geeks i m newbie to video processing. i want to apply a filter to a video at runtime, and i want to save that video after filter applied.
    Regarding this i m doing a research. I has gone through many libraries but i m struggling to achive my aim.

    Developement environment

    Migw-64 with windows 7 64 bit
    Android Studio 2.1 preview 5
    heap space 4GB
    com.android.tools.build:gradle:2.1.0
    android-ndk-r12-win-x86_64
    com.android.tools.build:gradle-experimental:0.7.0 —> to build NDK

    I have tried

    1)AndroidFastImageprocessingLibrary

    Chrisbatt -> AndroidFastImageProcessing in github
    github.com/chrisbatt/AndroidFastImageProcessing
    This library use GLSurfaceview to display filters but we could not save it to mp4 file

    so i found another implementation of it
    icmobilelab -> AndroidFastImageProcessing in github
    github.com/icmobilelab/AndroidFastImageProcessing/blob/master/framework/FastImageProcessing/src/project/android/imageprocessing/output/VideoFileEndpoint.java
    This library use JavaCV with ffmpeg compiled. But it failed.

    2)JavaCV
    JavaCV use outdated ffmpeg and it abondond

    3)Grafika -> in github
    github.com/google/grafika
    I tried Android Fast Image Processing with RecordFBOActivity in grafika. But i m failed. This library use MediaRecorder to record the contents of GLSurfaceView. But it records video without audio(I have tested the RecordFBOActivity and analyze the code )

    4)filter packs in platform_frameworks
    github.com/android/platform_frameworks_base/blob/master/media/mca/filterpacks/java/android/filterpacks/videosink/MediaEncoderFilter.java
    its android 4.2 edited core. i can’t run this code because too many jni dependencies.

    5)ffmpeg
    github.com/guardianproject/android-ffmpeg
    i tried ffmpeg3.1 compilation procedure implemented by guardianproject. it successfullay built a static library but i cannot build dynamic library( so files). i m stuck with a linker error. I think the linking order matters. i tried the linking order specified in below link
    https://fritzone.wordpress.com/2010/05/11/link-with-static-ffmpeg/
    but it won’t help. the following error occurs

    [armeabi-v7a] SharedLibrary  : libffmpeg.so
    jni/ffmpeg.c:200: error: undefined reference to 'av_frame_alloc'
    jni/ffmpeg.c:201: error: undefined reference to 'av_frame_alloc'
    jni/ffmpeg.c:209: error: undefined reference to 'av_register_all'
    jni/ffmpeg.c:210: error: undefined reference to 'avfilter_register_all'
    jni/ffmpeg.c:45: error: undefined reference to 'avformat_open_input'
    jni/ffmpeg.c:50: error: undefined reference to 'avformat_find_stream_info'
    jni/ffmpeg.c:56: error: undefined reference to 'av_find_best_stream'
    jni/ffmpeg.c:63: error: undefined reference to 'av_opt_set_int'
    jni/ffmpeg.c:66: error: undefined reference to 'avcodec_open2'
    jni/ffmpeg.c:67: error: undefined reference to 'av_log'
    jni/ffmpeg.c:78: error: undefined reference to 'avfilter_get_by_name'
    jni/ffmpeg.c:79: error: undefined reference to 'avfilter_get_by_name'
    jni/ffmpeg.c:80: error: undefined reference to 'avfilter_inout_alloc'
    jni/ffmpeg.c:81: error: undefined reference to 'avfilter_inout_alloc'
    jni/ffmpeg.c:85: error: undefined reference to 'avfilter_graph_alloc'
    jni/ffmpeg.c:98: error: undefined reference to 'avfilter_graph_create_filter'
    jni/ffmpeg.c:106: error: undefined reference to 'avfilter_graph_create_filter'
    jni/ffmpeg.c:113: error: undefined reference to 'av_int_list_length_for_size'
    jni/ffmpeg.c:113: error: undefined reference to 'av_opt_set_bin'
    jni/ffmpeg.c:116: error: undefined reference to 'av_log'
    jni/ffmpeg.c:131: error: undefined reference to 'av_strdup'
    jni/ffmpeg.c:142: error: undefined reference to 'av_strdup'
    jni/ffmpeg.c:147: error: undefined reference to 'avfilter_graph_parse_ptr'
    jni/ffmpeg.c:151: error: undefined reference to 'avfilter_graph_config'
    jni/ffmpeg.c:155: error: undefined reference to 'avfilter_inout_free'
    jni/ffmpeg.c:156: error: undefined reference to 'avfilter_inout_free'
    jni/ffmpeg.c:218: error: undefined reference to 'av_read_frame'
    jni/ffmpeg.c:223: error: undefined reference to 'avcodec_decode_video2'
    jni/ffmpeg.c:230: error: undefined reference to 'av_frame_get_best_effort_timestamp'
    jni/ffmpeg.c:233: error: undefined reference to 'av_buffersrc_add_frame_flags'
    jni/ffmpeg.c:234: error: undefined reference to 'av_log'
    jni/ffmpeg.c:240: error: undefined reference to 'av_buffersink_get_frame'
    jni/ffmpeg.c:171: error: undefined reference to 'av_rescale_q'
    jni/ffmpeg.c:246: error: undefined reference to 'av_frame_unref'
    jni/ffmpeg.c:248: error: undefined reference to 'av_frame_unref'
    jni/ffmpeg.c:251: error: undefined reference to 'av_packet_unref'
    jni/ffmpeg.c:254: error: undefined reference to 'avfilter_graph_free'
    jni/ffmpeg.c:255: error: undefined reference to 'avcodec_close'
    jni/ffmpeg.c:256: error: undefined reference to 'avformat_close_input'
    jni/ffmpeg.c:257: error: undefined reference to 'av_frame_free'
    jni/ffmpeg.c:258: error: undefined reference to 'av_frame_free'
    jni/include/libavutil/error.h:111: error: undefined reference to 'av_strerror'
    collect2.exe: error: ld returned 1 exit status
    make: *** [obj/local/armeabi/libffmpeg.so] Error 1

    6)MediaCodec, MediaExtractor,MediaRecord,MediaMuxer
    finally i planned to combine AndroidFastImageProcessing with MediaCodec, MediaExtractor,MediaRecord,MediaMuxer.
    so i try to Extract audio from video using mediamuxer
    https://gist.github.com/sayan801/9a39ccad0818d2b3499a
    I use mp4 video (MIME Type video/avc that have 2 tracks audio and video) to extract audio
    but the resultant file is corrupted (just 4 kb)

    I think this question is another view of the existing problem
    if anybody experienced this problem please guide me
    Thanks

  • ffmpeg - android ndk build assembler messages bad instruction

    17 septembre 2016, par Madhavan Malolan

    I have compiled the latest ffmpeg source using the following build script adapted from Telegram :

    #!/bin/bash
    #apply fix http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/203198

    function build_one {

    echo "Cleaning..."
    make clean

    echo "Configuring..."

    ./configure \
    --cc=$CC \
    --nm=$NM \
    --enable-stripping \
    --arch=$ARCH \
    --cpu=$CPU \
    --target-os=linux \
    --enable-cross-compile \
    --yasmexe=$NDK/prebuilt/darwin-x86_64/bin/yasm \
    --prefix=$PREFIX \
    --enable-pic \
    --disable-shared \
    --enable-static \
    --cross-prefix=$CROSS_PREFIX \
    --sysroot=$PLATFORM \
    --extra-cflags="-Os -DANDROID $OPTIMIZE_CFLAGS -fPIE -pie --static" \
    --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl" \
    --extra-libs="-lgcc" \
    \
    --enable-version3 \
    --enable-gpl \
    \
    --disable-doc \
    --disable-avx \
    \
    --disable-everything \
    --disable-network \
    --disable-zlib \
    --disable-debug \
    --disable-programs \
    --disable-network \
    \
    --enable-pthreads \
    --enable-protocol=file \
    --enable-decoder=h264 \
    --enable-decoder=gif \
    --enable-demuxer=mov \
    --enable-demuxer=gif \
    --enable-hwaccels \
    --enable-runtime-cpudetect \
    --enable-asm \
    $ADDITIONAL_CONFIGURE_FLAG

    #echo "continue?"
    #read
    make -j8 install

    }

    NDK=~/Downloads/android-ndk-r12b/

    #arm platform
    PLATFORM=$NDK/platforms/android-9/arch-arm
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
    LD=$PREBUILT/bin/arm-linux-androideabi-ld
    AR=$PREBUILT/bin/arm-linux-androideabi-ar
    NM=$PREBUILT/bin/arm-linux-androideabi-nm
    GCCLIB=$PREBUILT/lib/gcc/arm-linux-androideabi/4.9/libgcc.a
    ARCH=arm
    CC=$PREBUILT/bin/arm-linux-androideabi-gcc
    CROSS_PREFIX=$PREBUILT/bin/arm-linux-androideabi-

    #arm v5
    CPU=armv5te
    OPTIMIZE_CFLAGS="-marm -march=$CPU"
    PREFIX=./android/$CPU
    ADDITIONAL_CONFIGURE_FLAG="--disable-armv6 --disable-armv6t2 --disable-vfp --disable-neon"
    build_one

    #arm v7n
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-marm -march=$CPU"
    PREFIX=./android/$CPU
    ADDITIONAL_CONFIGURE_FLAG=--enable-neon
    build_one

    #x86 platform
    PLATFORM=$NDK/platforms/android-9/arch-x86
    PREBUILT=$NDK/toolchains/x86-4.9/prebuilt/darwin-x86_64
    LD=$PREBUILT/bin/i686-linux-android-ld
    AR=$PREBUILT/bin/i686-linux-android-ar
    NM=$PREBUILT/bin/i686-linux-android-nm
    GCCLIB=$PREBUILT/lib/gcc/i686-linux-android/4.9/libgcc.a
    ARCH=x86
    CC=$PREBUILT/bin/i686-linux-android-gcc
    CROSS_PREFIX=$PREBUILT/bin/i686-linux-android-

    CPU=i686
    OPTIMIZE_CFLAGS="-march=$CPU"
    PREFIX=./android/$CPU
    ADDITIONAL_CONFIGURE_FLAG="--disable-mmx --disable-yasm"
    build_one

    I copied the contents of the android/ folder generated to jni/ffmpeg/.
    I then tried to do a ndk-build, which fails with an error.

    The Android.mk file is as follows :

    LOCAL_PATH := $(call my-dir)

    LOCAL_MODULE    := avutil
    LOCAL_MODULE_FILENAME := libavutil
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libavutil.a
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)

    LOCAL_MODULE    := avformat
    LOCAL_MODULE_FILENAME := libavformat
       LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libavformat.a
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)

    LOCAL_MODULE    := avcodec
    LOCAL_MODULE_FILENAME := libavcodec
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libavcodec.a
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)
    LOCAL_MODULE    := avdevice
    LOCAL_MODULE_FILENAME := libavdevice
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libavdevice.a
    include $(PREBUILT_STATIC_LIBRARY)


    include $(CLEAR_VARS)
    LOCAL_MODULE    := avfilter
    LOCAL_MODULE_FILENAME := libavfilter
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libavfilter.a
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)
    LOCAL_MODULE    := postproc
    LOCAL_MODULE_FILENAME := libpostproc
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libpostproc.a
    include $(PREBUILT_STATIC_LIBRARY)


    include $(CLEAR_VARS)
    LOCAL_MODULE    := swresample
    LOCAL_MODULE_FILENAME := libswresample
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libswresample.a
    include $(PREBUILT_STATIC_LIBRARY)


    include $(CLEAR_VARS)
    LOCAL_MODULE    := swscale
    LOCAL_MODULE_FILENAME := libswscale
    LOCAL_SRC_FILES := ./ffmpeg/armv7-a/lib/libswscale.a
    include $(PREBUILT_STATIC_LIBRARY)


    include $(CLEAR_VARS)
    LOCAL_PRELINK_MODULE := false

    LOCAL_MODULE    := ffmpeg
    LOCAL_CFLAGS    := -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
    LOCAL_CFLAGS    += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
    LOCAL_CFLAGS    += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS
    LOCAL_CPPFLAGS  := -DBSD=1 -ffast-math -Os -funroll-loops -std=c++11
    LOCAL_LDLIBS    := -ljnigraphics -llog -lz -latomic
    LOCAL_STATIC_LIBRARIES := avformat avcodec avutil avfilter avdevice postproc swresample swscale
    LOCAL_SRC_FILES := ffmpeg.c

    include $(BUILD_SHARED_LIBRARY)

    The error thrown is :

    [armeabi-v7a] Compile thumb : ffmpeg <= ffmpeg.c
    /var/folders/2p/0jqlz1c94t537_53qn3h8v9h0000gn/T//cc8Tnpth.s :
    Assembler messages :
    /var/folders/2p/0jqlz1c94t537_53qn3h8v9h0000gn/T//cc8Tnpth.s:4421 :
    Error : bad instruction

    cmovg r3,r8'
     /var/folders/2p/0jqlz1c94t537_53qn3h8v9h0000gn/T//cc8Tnpth.s:4422:
     Error: bad instruction

    cmovg r2,r3’
    /var/folders/2p/0jqlz1c94t537_53qn3h8v9h0000gn/T//cc8Tnpth.s:4424 :
    Error : bad instruction

    cmovl r1,r3'
     /var/folders/2p/0jqlz1c94t537_53qn3h8v9h0000gn/T//cc8Tnpth.s:4426:
     Error: bad instruction

    cmovg r3,r8’ make : ***
    [path/to/app/obj/local/armeabi-v7a/objs/ffmpeg/ffmpeg.o]
    Error 1

    I am guessing i got the compiler wrong somewhere. I am trying to build on a mac. Is there something i am missing ? I am trying to build only for armeabi-v7a.