Recherche avancée

Médias (91)

Autres articles (33)

  • 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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (5876)

  • CANNOT LINK EXECUTABLE error with required libs loaded. How to link them properly ? [duplicate]

    4 avril 2013, par dentex

    edit : I'm aware of the possible duplicate, but the answer it's not directly applicable. I'm using ProcessBuilder and not Runtime.getRuntime().exec :

    public int execProcess(List<string> cmds, ShellUtils.ShellCallback sc) {    
       StringBuilder cmdlog = new StringBuilder();
       for (String cmd : cmds) {
            cmdlog.append(&#39; &#39;);
       }
       Utils.logger("v", cmdlog.toString(), DEBUG_TAG);

       ProcessBuilder pb = new ProcessBuilder();
       pb.directory(mBinFileDir);
       pb.command(cmds);

       Process process = null;
       int exitVal = 1; // Default error
       try {
           process = pb.start();

           StreamGobbler errorGobbler = new
           StreamGobbler(process.getErrorStream(), "ERROR", sc);

           StreamGobbler outputGobbler = new
           StreamGobbler(process.getInputStream(), "OUTPUT", sc);

           errorGobbler.start();
           outputGobbler.start();

           exitVal = process.waitFor();

           sc.processComplete(exitVal);

        } catch (Exception e) {
            Log.e(DEBUG_TAG, "Error executing ffmpeg command!", e);
        } finally {
            if (process != null) {
                Utils.logger("w", "destroyng process", DEBUG_TAG);
                process.destroy();
            }
       }
       return exitVal;
    }
    </string>

    I have two versions on FFmpeg compiled for android : with and without liblame enabled.

    When I load in /data/data/&lt;>/app_bin/ the FFmpeg binary compiled with NO lame support, it extracts audio from video without an issue. But when I use the one with lame support enabled, I get the error below into the log.

    Required libs, also compiled for android, are correctly loaded when shipped into the libs project folder with System.loadLibrary("lame").

    I was wondering if there is something else to do in order to properly make the FFmpeg binary find the libs.
    Those are the same libs given to the NDK to build the FFmpeg binary.

    D/dalvikvm(13741): Trying to load lib /data/app-lib/&lt;>/liblame.so 0x40ffed08
    D/dalvikvm(13741): Added shared lib /data/app-lib/&lt;>/liblame.so 0x40ffed08
    D/dalvikvm(13741): No JNI_OnLoad found in /data/app-lib/&lt;>/liblame.so 0x40ffed08, skipping init
    D/FfmpegController(13741): Trying to chmod &#39;/data/data/&lt;>/app_bin/ffmpeg&#39; to: 755
    V/FfmpegController(13741): /data/data/&lt;>/app_bin/ffmpeg -y -i /storage/sdcard0/Download/video.webm -vn -acodec copy /storage/sdcard0/Download/audio.ogg
    >>>>>> ---------- &lt;&lt;&lt;&lt;&lt;&lt;
    D/DownloadsService(13741): soinfo_link_image(linker.cpp:1673): could not load library "liblame.so" needed by "/data/data/&lt;>/app_bin/ffmpeg"; caused by load_library(linker.cpp:771): library "liblame.so" not foundCANNOT LINK EXECUTABLE
    >>>>>> ---------- &lt;&lt;&lt;&lt;&lt;&lt;
    I/DownloadsService(13741): FFmpeg process exit value: 255

    I'm not attaching code because it's fairly straightforward :

    • download the FFmpeg binary (it's not shipped with the app) ;
    • copy the binary from the download folder to /data/data/&lt;>/app_bin/ ;
    • chmod 755 ;
    • execute from there and read the output.

    Please comment if something else is required.

  • configure : link with built libs when pc-uninstalled is used

    6 octobre 2013, par Lukasz Marek
    configure : link with built libs when pc-uninstalled is used
    

    Signed-off-by : Lukasz Marek <lukasz.m.luki@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] configure
  • ffmpeg code does not link (undefined reference to avcodec_register_all

    28 janvier 2013, par Sriram

    I am trying to compile a simple introductory program using ffmpeg that tries to check if the mp3 codec is available. While the code compiles OK, I am facing difficulty in solving linker errors. Here is the code :

    #include
    #include
    #include <libavcodec></libavcodec>avcodec.h>

    float *generateSinusoid(unsigned int sampleRate, unsigned int nSecondsAudio) {

     unsigned int nsamples = (nSecondsAudio * sampleRate);
     float *arr;
     arr = (float*) malloc(sizeof(float) * nsamples);
     int i = 0;

     for(i = 0; i &lt; nsamples; i++) {
       arr[i] = 20 * sin(2.f * (M_PI) * (330/sampleRate) * i);  /*frequency of 330H
    z*/
     }

     return arr;

    }

    int main(int argc, char *argv[]) {

     avcodec_register_all();

     AVCodec *codec;

     unsigned int sampleRate = 22050;  /*assumed.*/
     unsigned int nSecondsAudio = 4;
     float *arr;
     arr = (float *) malloc(sizeof(float) * nSecondsAudio * sampleRate);

     /*Step 1. Generate sinusoid.*/
     arr = generateSinusoid(sampleRate, nSecondsAudio);

     /* Step 2. See if encoder exists.*/
     /*codec = avcodec_find_encoder(AV_CODEC_ID_MP3);*/

     if(!codec) {  /*codec = NULL.*/
       printf("MP3 codec not found!!!!");
     } else {
       printf("MP3 codec found!!!");
     }

      return 0;
    }  

    The code is compiled and linked like so :

    encoding_mp3: encoding_mp3.o
           gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec

    encoding_mp3.o: encoding_mp3.c
           gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o

    clean:
           rm encoding_mp3.o encoding_mp3  

    Linking gives the following error :

    gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o
    gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec
    encoding_mp3.o: In function `main&#39;:
    /cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/work/encoding_mp3.c:31: undefined reference to `_avcodec_register_all&#39;
    collect2: ld returned 1 exit status
    make: *** [encoding_mp3] Error 1  

    I have gone through most of the threads on SO regarding this problem and here is what I have tried so far :

    - Put libraries at the end of all non-option arguments

    - Commented out code that references functions. This seems to work. The undefined reference errors go away after all function calls are removed, though the presence of a struct AVCodec does not cause any problems.

    Any help on this is most welcome.