Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (17)

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

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (5026)

  • C flags which gives priority to quality for decoded images in ffmpeg

    18 janvier 2016, par Tank2005

    I’m trying to decode h.264 streaming with ffmpeg(latest version) on Android NDK.

    I succeeded to get a decoded frame. But, an aquired image is very dirty even if low latency flag is disabled.

    If I want to give priority to quality over decoding speed, which flags should I specify ?

    bool initCodec(bool low_latency)
    {
       av_register_all();

       codec = avcodec_find_decoder(AV_CODEC_ID_H264);
       if(!codec) return false;

       context = avcodec_alloc_context3(codec);
       if(!context) return false;

       if(codec->capabilities & CODEC_CAP_TRUNCATED) context->flags |= CODEC_FLAG_TRUNCATED;
       if(low_latency == true) context->flags |= CODEC_FLAG_LOW_DELAY;

       frame = av_frame_alloc();

       int res = avcodec_open2(context, codec, NULL);
       if (res < 0) {
           qDebug() << "Coundn't open codec :" << res;
           return false;
       }

       av_init_packet(&avpkt);
       return true;
    }

    void sendBytes(unsigned char *buf, int buflen)
    {
       avpkt.size = buflen;
       avpkt.data = buf;

       int got_frame, len;
       while (avpkt.size > 0) {
           len = avcodec_decode_video2(context, frame, &got_frame, &avpkt);
           if (len < 0) {
               qDebug() << "Error while decoding : " << len;
               break;
           }
           if (got_frame) {
               onGotFrame(frame);
           }
           avpkt.size -= len;
           avpkt.data += len;
       }
    }

    Decoded image sample

    Ex : I heard that it made a problem while compiling the library. So I write a compile option here(I built it on OpenSUSE Linux).

    #!/bin/bash
    NDK=/home/ndk
    SYSROOT=$NDK/platforms/android-9/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
    function build_one
    {
    ./configure \
    --prefix=$PREFIX \
    --enable-shared \
    --disable-static \
    --disable-avdevice \
    --disable-doc \
    --disable-symver \
    --disable-encoders \
    --disable-decoders \
    --enable-decoder=h264 \
    --enable-decoder=aac \
    --disable-protocols \
    --disable-demuxers \
    --disable-muxers \
    --disable-filters \
    --disable-network \
    --disable-parsers \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=linux \
    --arch=arm \
    --enable-asm --enable-yasm \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -marm -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \
    --extra-ldflags="-Wl,--fix-cortex-a8" \
    $ADDITIONAL_CONFIGURE_FLAG
    make clean
    make
    make install
    }
    CPU=armv7-a
    PREFIX=$(pwd)/android/$CPU
    build_on
  • ffmpeg and php to get an image out of a video and convert video to ogg

    6 mars 2016, par sonam Sharma

    I have a video hosting site and have successfully installed ffmpeg on my local server. Things work overall, but I cannot get the video duration and don’t know how to convert videos to the ogg format. I can convert videos to mp4 but am unsure if the same code can also convert to ogg.

    One more thing is that I can get a thumbnail out of the video at the start of the video but I want it after 50 seconds.

      $base = basename($uploadfile, $safe_file['ext']);
                   $new_file = $base.'mp4';
                   $new_image = $base.'jpg';
                   $new_image_path = $live_img.$new_image;
                   $new_flv = $live_dir.$new_file;

     equire 'vendor/autoload.php';
           //ececute ffmpeg generate mp4
           exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.'');
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -f mjpeg -vframes 71 -s 768x432 -an '.$new_image_path.'');
  • What is the recommended method to get metadata from files uploaded with ffmpeg.wasm ? [closed]

    28 novembre 2023, par Palma Dulce

    I'm developing an app using vite react.js and ffmpeg.wasm and I'm having trouble to find out how to get the duration time of a file. I need to writeFile to the FS, read the metadata, get the time duration, store it in a variable so I can use it to encode other things.

    


    I've tried to get it through log and process calls, but the time in log always shows different results, and the time in progress shows me how long the process it's taking to finish, not the file duration time. I've tried to readFile in countless ways as well. I guess I could maybe do that by local directory reading methods, but I wish to do that only with ffmpeg.wasm. I'm currently running ffmpeg/core from its API, in the latest 12.4.0 version, and the ffmpeg/ffmpeg in its latest 12.7.0.

    


    I'm a beginner, so maybe the answer it's right in my face, but I spent a good amount of time trying and can't see to find a solution.