Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (34)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (6461)

  • FFmpeg library is detecting pixel format of VP9 video stream not correctly

    6 avril 2023, par Pikachu

    I am using a C code to detect pixel format of VP9 video stream in a WebM container. FFmpeg version 6.0, full shared library build, downloaded from official website. Operating system is Windows 10. I feed the library with a VP9 video encoded with alpha channel, pixel format is YUVA420p. It detects pixel format as YUV420p.

    


    I have found a similar question on StackOverflow.com, Is there a way to force FFMPEG to decode a video stream with alpha from ​a WebM video encoded with libvpx-vp9 ?, but it does not actually help.

    


    When I override the decoder with a libvpx, it continues to detect the pixel format as YUV420p instead of YUVA420p.

    


    C code is following. Note that error handling in code is omitted here for StackOverflow question to be shorter.

    


    AVFormatContext *fmt_ctx = NULL;
int err = avformat_open_input(&fmt_ctx, infp, NULL, NULL);
err = avformat_find_stream_info(fmt_ctx, NULL);
int stream = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
AVCodecParameters *codecpar = fmt_ctx->streams[stream]->codecpar;

const AVCodec *codec = NULL;
if (codecpar->codec_id == AV_CODEC_ID_VP9) {
    codec = avcodec_find_decoder_by_name(CODEC_LIBVPX_VP9);
} else {
    codec = avcodec_find_decoder(codecpar->codec_id);
}

AVCodecContext *ctx = avcodec_alloc_context3(codec);
err = avcodec_parameters_to_context(ctx, codecpar);
av_log(NULL, AV_LOG_DEBUG, "Pixel format: %d.\n", ctx->pix_fmt); //TODO:DEBUG.
err = avcodec_open2(ctx, codec, NULL);


    


    The program tells Pixel format: 0., which means AV_PIX_FMT_YUV420P, not the AV_PIX_FMT_YUVA420P !

    


    If I override pixel format manually, I am able to decode video with alpha channel and to see the transparent background, but it breaks the logics, because when a real YUV420p pixel format comes in and gets overridden by YUVA420p, this will be a problem.

    


    if (codecpar->codec_id == AV_CODEC_ID_VP9) {
    if (strcmp(codec->name, CODEC_LIBVPX_VP9) == 0) {
        if (ctx->pix_fmt == AV_PIX_FMT_YUV420P) {
            ctx->pix_fmt = AV_PIX_FMT_YUVA420P;
        }
    }
}


    


    At the same time ffmpeg tool started from command line with libvpx decoder tells that my video has YUVA420p pixel format. Output is following.

    


    D:\Temp\4>ffmpeg -c:v libvpx-vp9 -i yuva.webm
ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[libvpx-vp9 @ 000001ecdf6002c0] v1.13.0-71-g45dc0d34d
    Last message repeated 1 times
Input #0, matroska,webm, from 'yuva.webm':
  Metadata:
    ENCODER         : Lavf60.3.100
  Duration: 00:00:05.55, start: 0.000000, bitrate: 227 kb/s
  Stream #0:0: Video: vp9 (Profile 0), yuva420p(tv, progressive), 1920x1080, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn
    Metadata:
      alpha_mode      : 1
      ENCODER         : Lavc60.3.100 libvpx-vp9
      DURATION        : 00:00:05.550000000
At least one output file must be specified


    


    Here is my YUVA420p in the first video stream at the end of the console output :

    


    Stream #0:0: Video: vp9 (Profile 0), yuva420p(tv, progressive), 1920x1080, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn


    


    


    The questions are following.

    


      

    1. How to detect real pixel format of VP9 video with FFmpeg library in C code reliably ?
    2. 


    3. Why is the C code not detecting the actual pixel format even with codec overriden to libvpx ?
    4. 


    


    Thank you.

    


  • Presentation of Piwik’s collaborative translations platform : oTrance [Interview]

    19 avril 2013, par matt — Community, translation

    thank-you-around-worldPiwik enables domain administrators, hobbyists, power users, personal website builders and everyone in between to access enormous amounts of data for website analytics. To support all those users, Piwik needs to be available in a number of different languages. From the start, we made internationalization (i18n) part of Piwik’s DNA. There are now dozens active volunteers who help make sure each language is well represented in the latest official release of Piwik. As of now, Piwik is available in 48 languages.

    Recently a new tool became available that makes the translation of Piwik much easier. The software we are using is an open source platform called oTrance. It has made our translation architecture more robust, and it allows us to expedite the timely delivery of high quality and up-to-date translations to the thousands of people who rely on Piwik every day.

    We’ve met with oTrance creator and lead developer Daniel Schlichtholz who answered a few questions for us.

    What is oTrance ?

    oTranCe is the short form of “Online Translation Center”. It was born because I needed a translation platform for my project MySQLDumper.

    Many languages have been added by the community and manual maintenance became more and more time consuming. I wanted to change that. So I searched for an existing platform I could use and tested a lot of approaches. To put a long story short : none of the given solutions satisfied my needs.

    From the view of a translator maintaining a language should be as easy as possible. In most cases they have to install a program on their local machine or the workflow was too difficult. A translator doesn’t want to struggle with technical things ; he just wants to translate the phrases and wants to know the progress.

    That’s the main goal we want to reach : to make the translation process as easy as possible.

    What sets oTrance apart from the other ways to manage translations ?

    Ease of use is one advantage of oTranCe compared to other solutions. Another advantage is that project administrators can install oTranCe on their own server – so nobody is dependant of a third party provider.

    We love to get feedback from other users. User feedback influences the way oTranCe is developed. We believe that this way oTranCe satisfies the requirements of the real world.

    We also have extensive user documentation, in our “Working with oTranCe” wiki. We try to document use cases in an understandable way. We don’t write down marketing buzz words, but try to explain the use from the view of the user/administrator.

    Now that oTranCe 1.0 is out, what will you be working on next ?

    The language files can be exported to version control and oTranCe can commit changes to the target repository. Currently we support export to Subversion, and we are working on a Git export adapter, which will be released soon.

    Another issue we are trying to solve is the context problem. When your project uses many different phrases the translator often doesn’t know in which context the current phrase is used. Version 1.1.0 (not released yet, but you can grab the latest developer version from GitHub) introduces the oTranCe-connector. The idea behind it : a small plug in grabs the used phrases/keys on the current page, and on click this list is submitted to oTranCe, where the translator can edit the words. This way the translator knows in which context these phrases are used. I wrote a small plug in for OXID eShop. Since it is really easy to implement, my hope is that other plug ins for other applications will be added by the community.

    Matthieu : Congratulations Daniel for having created such an awesome Translation Platform. At Piwik we are really thankful for oTranCe, which has resulted in much better translation process, and happier translators. Keep up the good work !

    If you are a Piwik user, and if you want to participate in translating Piwik, please sign up for an account on oTrance and become part of the team making Piwik available in more languages across the world.

  • Unable to port FFmpeg C library into android

    13 décembre 2017, par Navjot Bedi

    What I exactly want to-do : Access the ffmpeg.c file to modify the int main(int argc, char **argv) function to JNI and passing the command of ffmpeg as string.

    I have tried to port ffmpeg C library to android(ARM processor). I followed following different ways to do this.

    1st Try : using official ffmpeg installation documentation. Steps as follows

    a) git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg

    b) Read the INSTALL file.

    c) Download x264 library and build by using build_x264.sh which build successfully.

       NDK=/home/nav/Work/android/ndk
       PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt
       PLATFORM=$NDK/platforms/android-8/arch-arm
       PREFIX=/home/nav/28ffmpeg/android-ffmpeg                
       ./configure --prefix=$PREFIX --enable-static --enable-pic --disable-asm --disable-cli --host=arm-linux --cross-prefix=$PREBUILT/linux-x86/bin/arm-linux-androideabi- --sysroot=$PLATFORM
     make
     sudo make install
     sudo ldconfig

    d) Then I download ffmpeg library from (http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2) build it by using build_android.sh

    #!/bin/bash

    NDK=/home/nav/Work/android/ndk
    PLATFORM=$NDK/platforms/android-8/arch-arm
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    PREFIX=/home/nav/28ffmpeg/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 \
                   --enable-demuxer=rtsp \
                   --enable-muxer=rtsp \
                   --disable-ffplay \
                   --disable-ffserver \
                   --enable-ffmpeg \
                   --disable-ffprobe \
                   --enable-libx264 \
                   --enable-encoder=libx264 \
                   --enable-decoder=h264 \
                   --enable-protocol=rtp \
                   --enable-hwaccels \
                   --enable-zlib \
                   --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

    e) Initially it works perfectly. But after that error comes :

    libavformat/libavformat.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
    libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
    libavutil/libavutil.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
    libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
    build_android.sh: 48: build_one: not found

    Result : libffmpeg.so not found.

    2nd Try : Then I follow steps in http://dl.dropbox.com/u/22605641/ffmpeg_android/main.html-> Builds

    a) I downloaded Pre-Build libffmpeg.so from above link.

    b) Add libffmpeg.so to libs/armeabi/ .

    c) Make Android.mk

    include $(CLEAR_VARS)
    LOCAL_MODULE := ffmpeg
    LOCAL_SRC_FILES := libffmpeg.so
    include $(PREBUILT_SHARED_LIBRARY)

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE := main
    LOCAL_STATIC_LIBRARIES += ffmpeg
    LOCAL_SRC_FILES := ffmpeg-test.c
    include $(BUILD_SHARED_LIBRARY)

    d) Then I do all ndk set up and all.Copy ffmpeg.c from library to ffmpeg-test.c by changing its int main function to my JNI functin and include all necessary include files.

    Error :

    Console :

     /home/nav/Work/android/ndk/ndk-build all
    Prebuilt       : libffmpeg.so <= jni/
    Install        : libffmpeg.so => libs/armeabi/libffmpeg.so
    Compile thumb  : main <= ffmpeg-test.c
    jni/ffmpeg-test.c: In function 'print_report':
    jni/ffmpeg-test.c:1139:94: warning: incompatible implicit declaration of built-in function 'log2' [enabled by default]
    SharedLibrary  : libmain.so
    /home/nav/Work/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/main/ffmpeg-test.o: in function check_keyboard_interaction:jni/ffmpeg-test.c:2496: error: undefined reference to 'qp_hist'

    and many other undefined references.