Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (89)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (9840)

  • Failed to hard-ware accelerate video decoding via Tesla P40

    20 mai 2018, par Potemkin

    While I am writing a surveillance video recognition demo, I find it is much slower to simply play a video in the server(Xeon E5-2680 2.4GHz, Tesla P40) than in my laptop(i7-8550 1.8GHz, Intel UHD Graphics 620).

    I use DXVA-Checker to see the video decoder device, and notice that my laptop use the GPU for decoding, but the server use no GPU for the job. Then I check ’nvidia-smi’, and it shows all of GPUs are running in TCC driver model, not WDDM driver model. And I cannot turn it to WDDM because nvidia-smi says it is not supported.

    The video play demo is written via OPENCV, in which the video decoding part is from ffmpeg. The server runs in Windows-server-2012, and my laptop is on Windows 10.

    The question is how can I get the server decoding videos with GPUs, and is this the reason for the slowness or there is something else ?

  • carrierwave-ffmpeg .weba audio convert to .mp3 or .mp4

    14 mai 2018, par nmadoug

    I use react-mic on the front-end of my React/Rails application to capture audio from the user. react-mic formats the audio blob as .weba. I’m trying to convert the .weba to .mp4 or .mp3 using carrierwave-ffmpeg . I can isolate the issue to my Rails uploader, which is as follows :

    require 'fog/aws'

    class UserResponseUploader < CarrierWave::Uploader::Base
     include CarrierWave::FFmpeg

     if Rails.env.test?
       storage :file
     else
       storage :fog
     end

     version :mp3 do
       puts `which ffmpeg`
       # binding.pry
       process encode: [:mp3, audio_codec: "a libmp3lame -qscale:a 2"]
       # process :encode_audio=> [:mp4, audio_codec: "aac",:custom => "-strict experimental -qscale:a 2"]

       def full_filename(for_file)
         super.chomp(File.extname(super)) + '.mp3'
       end
     end

     # Directory where uploaded files will be stored on file system or AWS
     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end
    end

    ffmpeg is installed on my local PC and I can run the command on the terminal to get an audio file created

    ffmpeg -i audio.weba -codec:a libmp3lame -qscale:a 2 willwork.mp3

    My problem is when I try and run everything in my code, I get the following error message :

    NameError (undefined local variable or method `e' for #):

    I don’t know where it’s complaining. I have a feeling the encoding line is causing the problem and I don’t have it set up properly.

    Any ideas ?

  • Building C library (FFmpeg) with Android NDK r17 : undefined reference to '__mulodi4'

    14 mai 2018, par fpsulli3

    My problem happens to be with FFmpeg but I suspect that this would happen with almost any C library.

    Problem Description

    My app uses FFmpeg that is compiled with NDK r10e. I am trying to update everything to NDK r17, while also switching to clang, since Google prefers us to use that over gcc.

    My first step is to just build FFmpeg.

    To that end, I have used the make_standalone_toolchain.py script to create a stand-alone toolchain for the x86 architecture, like so :

    make_standalone_toolchain.py --arch x86 --api 21 --install-dir ~/Development/ndk-toolchains/x86

    Then I configure the FFmpeg build as follows :

    TOOLCHAIN_DIR=~/Development/ndk-toolchains/x86

    ./configure \
    --prefix=$(pwd)/android/x86 \
    --cross-prefix=$TOOLCHAIN_DIR/bin/i686-linux-android- \
    --target-os=android \
    --arch=x86 \
    --enable-cross-compile \
    --disable-asm \
    --toolchain=clang-usan \
    --disable-stripping \
    --extra-cflags="-m32" \
    --sysroot=$TOOLCHAIN_DIR/sysroot/

    And then I build it as follows :

    make clean
    make -j4
    make install

    Everything seems to compile fine, but I get several linker errors that all say the same thing :

    undefined reference to ’__mulodi4’

    Solutions I’ve tried

    1. Linking against libclang_rt.builtins*

    I found a few places around the Web which suggested that this is caused by the fact that libgcc doesn’t provide __mulodi4. A github user named sitsofe was nice enough to post a work-around here. However, I am sure where to find this libclang_rt.builtins-i686.a library. Here is what I was able to find in my standalone toolchain directory :

    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-x86_64.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i386.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-aarch64-android.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-mips64-android.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-x86_64-android.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i686-android.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-arm-android.a
    ./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-mips-android.a

    The libclang_rt.builtins-i686-android.a library looks close but (I think) no cigar. When I try to link to it, I get the same error :

    undefined reference to ’__mulodi4’

    Here is my new FFmpeg build config command :

    ./configure \
    --prefix=$(pwd)/android/x86 \
    --cross-prefix=$TOOLCHAIN_DIR/bin/i686-linux-android- \
    --target-os=android \
    --arch=x86 \
    --enable-cross-compile \
    --disable-asm \
    --toolchain=clang-usan \
    --disable-stripping \
    --extra-cflags="-m32" \
    --extra-ldflags="-L${TOOLCHAIN_DIR}/lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i686-android.a" \
    --sysroot=$TOOLCHAIN_DIR/sysroot/

    I checked with -v to make sure that this line was added to the linker flags, and it was. However, I have no idea if this library should even be expected to work, let alone whether I’m adding it to the linker flags correctly. In any case, what I’m doing here doesn’t work.

    2. Switching to a different sanitizer

    Instead of using the undefined sanitizer, I tried switching to the address sanitizer. This is (frankly) a total stab in the dark, based on a vague mention of asan being available in r17 at Google I/O this week.

    In this case, FFmpeg builds just fine !

    However, when I try to pull FFmpeg into my test project (a simple AAR w/ C++ support, that just has one jni method that calls av_gettime(), I get a ton of linker errors :

    Error:error : undefined reference to ’__asan_option_detect_stack_use_after_return’
    Error:error : undefined reference to ’__asan_stack_malloc_0’
    Error:error : undefined reference to ’__asan_report_load4’
    Error:error : undefined reference to ’__asan_report_load4’
    Error:error : undefined reference to ’__asan_shadow_memory_dynamic_address’
    Error:error : undefined reference to ’__asan_option_detect_stack_use_after_return’
    Error:error : undefined reference to ’__asan_stack_malloc_0’
    Error:error : undefined reference to ’__asan_report_load4’
    Error:error : undefined reference to ’__asan_report_load4’
    Error:error : undefined reference to ’__asan_shadow_memory_dynamic_address’
    Error:error : undefined reference to ’__asan_option_detect_stack_use_after_return’
    Error:error : undefined reference to ’__asan_stack_malloc_0’
    Error:error : undefined reference to ’__asan_report_store4’
    Error:error : undefined reference to ’__asan_report_store4’
    Error:error : undefined reference to ’__asan_init’
    Error:error : undefined reference to ’__asan_version_mismatch_check_v9’

    So it seems to find the FFmpeg library just fine, indicating that that part of my CMake file is correct, but it can’t locate any of these asan references.

    This seems to be a common problem that people are running into, but I can’t see to find a work-around that actually works for me.