Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (77)

  • 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (5896)

  • undefined reference in ffmpeg (use code blocks)

    6 février 2015, par Yonghao Zhao

    I am currently testing a video encoding program using ffmepg codeblocks.I encountered several undefined reference warning. I have checked on internet and add extern "c" to the headers but it still doesnt work. Please help me check.

    Here is part of the code :

    extern "C" {

    #include "libavcodec/avcodec.h"
    #include "libavutil/channel_layout.h"
    #include "libavutil/common.h"
    #include "libavutil/imgutils.h"
    #include "libavutil/mathematics.h"
    #include "libavutil/samplefmt.h"


    }

    #include
    #include "libavutil/opt.h"

    static void video_encode_example(const char *filename, int codec_id)
    {

    AVCodec *codec;
    AVCodecContext *c= NULL;
    int i, ret, x, y, got_output;
    FILE *f;
    AVFrame *frame;
    AVPacket pkt;
    uint8_t endcode[] = { 0, 0, 1, 0xb7 };
    printf("Encode video file %s\n", filename);
    /* find the mpeg1 video encoder */
    codec = avcodec_find_encoder(AV_CODEC_ID_H264);
    if (!codec) {
    fprintf(stderr, "Codec not found\n");
    exit(1);
    }
    c = avcodec_alloc_context3(codec);
    if (!c) {
    fprintf(stderr, "Could not allocate video codec context\n");
    exit(1);
    }

    int main(int argc, char **argv)
    {
    avcodec_register_all();
    video_encode_example("test.mpg", AV_CODEC_ID_MPEG1VIDEO);

    return 0;
    }

    The error given :

    ||=== Build : Debug in ffmepg_video_en (compiler : GNU GCC Compiler) ===|
    obj/Debug/main.o||In function

    video_encode_example':|
    codeblocksfile/ffmepg_video_en/main.cpp|36|undefined reference to

    avcodec_find_encoder’|
    codeblocksfile/ffmepg_video_en/main.cpp|41|undefined reference to

    avcodec_alloc_context3'|
    codeblocksfile/ffmepg_video_en/main.cpp|63|undefined reference to

    av_opt_set(void*, char const*, char const*, int)’|
    codeblocksfile/ffmepg_video_en/main.cpp|65|undefined reference to

    avcodec_open2'|
    codeblocksfile/ffmepg_video_en/main.cpp|74|undefined reference to

    av_frame_alloc’|
    codeblocksfile/ffmepg_video_en/main.cpp|85|undefined reference to

    av_image_alloc(unsigned char**, int*, int, int, AVPixelFormat, int)'|
    codeblocksfile/ffmepg_video_en/main.cpp|92|undefined reference to

    av_init_packet’|
    codeblocksfile/ffmepg_video_en/main.cpp|112|undefined reference to

    avcodec_encode_video2'|
    codeblocksfile/ffmepg_video_en/main.cpp|120|undefined reference to

    av_free_packet’|
    codeblocksfile/ffmepg_video_en/main.cpp|126|undefined reference to

    avcodec_encode_video2'|
    /home/yonghao/codeblocksfile/ffmepg_video_en/main.cpp|134|undefined reference to

    av_free_packet’|
    codeblocksfile/ffmepg_video_en/main.cpp|140|undefined reference to

    avcodec_close'|
    codeblocksfile/ffmepg_video_en/main.cpp|141|undefined reference to

    av_free’|
    codeblocksfile/ffmepg_video_en/main.cpp|142|undefined reference to

    av_freep'|
    codeblocksfile/ffmepg_video_en/main.cpp|143|undefined reference to

    av_frame_free’|
    obj/Debug/main.o||In function

    main':|
    codeblocksfile/ffmepg_video_en/main.cpp|151|undefined reference to

    avcodec_register_all’|
    ||=== Build failed : 16 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

  • flac and metaflac : Don’t always call setlocale() in Windows.

    19 juillet 2014, par Erik de Castro Lopo
    flac and metaflac : Don’t always call setlocale() in Windows.
    

    Windows (MSVC, MinGW) versions of setlocale don’t care about LC_*
    environment variables. For example, flac cannot pass the test for
    — until and —skip options the script calls it with —skip=0:01.1001
    and it expects decimal comma (—skip=0:01,1001) on some locales.

    Solve this (on Windows) by calling setlocale(LC_ALL, "") if some
    LC_* variable is set to "C".

    Patch-from : lvqcl <lvqcl.mail@gmail.com>

    • [DH] src/flac/main.c
    • [DH] src/metaflac/main.c
  • 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