Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (24)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • 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 (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2119)

  • download and fill file on fly

    4 mai 2017, par Gianluca Calabria

    I’m trying to create a service for a client which takes some audio chunks and concatenate them. For this I’m using FFmpeg. The user should also be able to download the result on the fly without waiting for the conversion/concatenation to finish. The idea is to "fill" the file as the process goes on. I cannot work my way around it, is it possible to do ? I’m using a RESTful service which calls a class like this one

    public ReadableRepresentation serveDownloadRequest(Representation entity) throws SystemInitializationException {
       InputStreamChannel inputStreamChannel;
       Form reqParameters=getQuery();
       try {

           String parameters = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS, AudioCutAndJoinParameters.PARAMETERS_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS + "=" + parameters);

           String inputUri = readStringParameter(reqParameters, AudioCutAndJoinParameters.INPUT_URI, AudioCutAndJoinParameters.INPUT_URI_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.INPUT_URI + "=" + inputUri);

           String markInRelative = readStringParameter(reqParameters, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.MARKIN_ID_RELATIVE + "=" + markInRelative);

           String parametersString = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS_STRING, AudioCutAndJoinParameters.PARAMETERS_STRING_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS_STRING + "=" + parametersString);

           String cmdFolder = readStringParameter(reqParameters, AudioCutAndJoinParameters.COMMAND_FOLDER, AudioCutAndJoinParameters.COMMAND_FOLDER_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.COMMAND_FOLDER + "=" + cmdFolder);

           Map markInIdRelativeMap=JsonEntityManager.getInstance().deserializeMap(markInRelative);
           Map parametersMap=JsonEntityManager.getInstance().deserializeMap(parameters);
           List <string> InputUri= JsonEntityManager.getInstance().deserializeList(inputUri);

           InputStream transcodeOutput = Services.getInstance().runAudioCutAndJoin(parametersMap,markInIdRelativeMap,InputUri,parametersString,cmdFolder);
           inputStreamChannel = new InputStreamChannel(transcodeOutput);

           ReadableRepresentation result = new ReadableRepresentation(inputStreamChannel, MediaType.AUDIO_ALL);

           Disposition disp = new Disposition(Disposition.TYPE_ATTACHMENT);

           disp.setFilename("test-cut.wav");
           result.setDisposition(disp);

           return result;
    </string>

    I’m using the process.getInputStream() as return of my runAudioCutAndJoin but no download happens until the process of conversion/concatenation is done. Can somebody please help me out ?

  • using ffmpeg for live streaming MPEG-TS with windows media services

    14 mars 2012, par Yanniv

    I'm trying to live stream MPEG-TS source to Windows Media service.
    I found how to live stream using RTMP with this code :

    ffmpeg -y -f mpegts -i udp://@:1234 -re -vcodec libx264 -maxrate 700k
    -r 25 -s 640x360 -deinterlace -acodec libvo_aacenc -ab 64k -ac 1 -ar 44100 -f flv "rtmp://rtmp1.youtube.com/videolive?sparams=<stream parameters="parameters" here="here">"
    </stream>
    • How can I convert it to support WM9/VC1 format ?
    • Does ffmpeg support pulling of the stream or only pushing to Windows Media services ?
  • FFmpeg support for libstagefright hardware decoding

    25 février 2016, par Ming Zhang

    everyone :
    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
    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)

    2. 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 !!!