Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (55)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

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

Sur d’autres sites (8802)

  • cmake build error with libswresample, works fine with clang

    19 août 2018, par Dan Gordon

    I’m building an FFmpeg project with CLion which uses cmake to compile the code. Everything has been working great until I started to use the libswresample library. For some reason, cmake isn’t seeing the dylib and won’t build the code.

    /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/user/CLionProjects/IC4D/cmake-build-debug --target all -- -j 4
    [ 50%] Linking C executable IC4D
    Undefined symbols for architecture x86_64:
     "_swr_alloc_set_opts", referenced from:
         _audio_decode_frame in main.c.o
     "_swr_convert", referenced from:
         _audio_decode_frame in main.c.o
     "_swr_free", referenced from:
         _audio_decode_frame in main.c.o
     "_swr_init", referenced from:
         _audio_decode_frame in main.c.o
     "_swr_set_compensation", referenced from:
         _audio_decode_frame in main.c.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [IC4D] Error 1
    make[1]: *** [CMakeFiles/IC4D.dir/all] Error 2
    make: *** [all] Error 2

    But if I run this clang code, it compiles just fine

    clang -I/usr/local/include -L/usr/local/lib -lavcodec -lavcodec -lswscale -lavformat -lswresample -lSDL2 -lavutil -o IC4D2 ../main.c

    Here’s my CMakeList.txt file :

    cmake_minimum_required(VERSION 3.10)
    project(IC4D C)

    set(CMAKE_C_STANDARD 99)

    include_directories( /Users/user/CLionProjects/IC4D/include/ )
    link_directories( /Users/user/CLionProjects/IC4D/lib/ )

    find_path(AVDEVICE_INCLUDE_DIR include/libavdevice/avdevice.h)
    find_library(AVDEVICE_LIBRARY lib/libavdevice.58.dylib)

    find_path(AVFORMAT_INCLUDE_DIR include/libavformat/avformat.h)
    find_library(AVFORMAT_LIBRARY lib/libavformat.58.dylib)

    find_path(AVCODEC_INCLUDE_DIR include/libavcodec/avcodec.h)
    find_library(AVCODEC_LIBRARY lib/libavcodec.58.dylib)

    find_path(SWSCALE_INCLUDE_DIR include/libswscale/swscale.h)
    find_library(SWSCALE_LIBRARY lib/libswscale.5.dylib)

    find_path(AVUTIL_INCLUDE_DIR include/libavutil/avutil.h)
    find_library(AVUTIL_LIBRARY lib/libavutil.56.dylib)

    find_path(SWRESAMPLE_INCLUDE_DIR include/libswresample/swresample.h)
    find_library(SWRESAMPLE_LIBRARY lib/libswresample.3.dylib)

    find_package(SDL2 REQUIRED)

    add_executable(IC4D main.c)

    target_include_directories(IC4D PRIVATE ${SDL2_INCLUDE_DIRS} ${AVDEVICE_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVCODEC_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWRESAMPLE_INCLUDE_DIR})
    target_link_libraries(IC4D PRIVATE ${SDL2_LIBRARIES} ${AVDEVICE_LIBRARY} ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${SWSCALE_LIBRARY} ${AVUTIL_LIBRARY} ${SWRESAMPLE_LIBRARY})

    What am I doing wrong with cmake ?

    Thanks

  • Error inclunding in FFMPEG project on a Mac using clang

    3 juillet 2018, par benwiz

    I’m having trouble running the remuxing.c example code. I get the following error. I have confirmed that the files can be found in /usr/local/include. I am running macOS Sierra 10.12.6.

    $ cc -v playground/remuxing.c
    Apple LLVM version 9.0.0 (clang-900.0.39.2)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecat
    ed-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-v
    erifier -discard-value-names -main-file-name remuxing.c -mrelocation-model pic -pic-level 2 -mthread-mo
    del posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -target
    -linker-version 305 -v -dwarf-column-info -debugger-tuning=lldb -resource-dir /Library/Developer/Comman
    dLineTools/usr/lib/clang/9.0.0 -fdebug-compilation-dir /Users/myuser/github/personal/synthesthesi
    a -ferror-limit 19 -fmessage-length 103 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fenc
    ode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/
    folders/8s/2xc3v8dd7zz2c2trymzybvd534bnhg/T/remuxing-819223.o -x c playground/remuxing.c
    clang -cc1 version 9.0.0 (clang-900.0.39.2) default target x86_64-apple-darwin16.7.0
    #include "..." search starts here:
    #include <...> search starts here:
    /usr/local/include
    /Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/include
    /Library/Developer/CommandLineTools/usr/include
    /usr/include
    /System/Library/Frameworks (framework directory)
    /Library/Frameworks (framework directory)
    End of search list.
    "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/8s/2xc3v8dd7zz2c2trymzybvd534bnhg/T/remuxing-819223.o -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a
    Undefined symbols for architecture x86_64:
     "_av_dump_format", referenced from:
         _main in remuxing-819223.o
     "_av_freep", referenced from:
         _main in remuxing-819223.o
     "_av_interleaved_write_frame", referenced from:
         _main in remuxing-819223.o
     "_av_mallocz_array", referenced from:
         _main in remuxing-819223.o
     "_av_packet_unref", referenced from:
         _main in remuxing-819223.o
     "_av_read_frame", referenced from:
         _main in remuxing-819223.o
     "_av_rescale_q", referenced from:
         _main in remuxing-819223.o
     "_av_rescale_q_rnd", referenced from:
         _main in remuxing-819223.o
     "_av_strerror", referenced from:
         _av_make_error_string in remuxing-819223.o
     "_av_write_trailer", referenced from:
         _main in remuxing-819223.o
     "_avcodec_parameters_copy", referenced from:
         _main in remuxing-819223.o
     "_avformat_alloc_output_context2", referenced from:
         _main in remuxing-819223.o
     "_avformat_close_input", referenced from:
         _main in remuxing-819223.o
     "_avformat_find_stream_info", referenced from:
         _main in remuxing-819223.o
     "_avformat_free_context", referenced from:
         _main in remuxing-819223.o
     "_avformat_new_stream", referenced from:
         _main in remuxing-819223.o
     "_avformat_open_input", referenced from:
         _main in remuxing-819223.o
     "_avformat_write_header", referenced from:
         _main in remuxing-819223.o
     "_avio_closep", referenced from:
         _main in remuxing-819223.o
     "_avio_open", referenced from:
         _main in remuxing-819223.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • 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.