Recherche avancée

Médias (91)

Autres articles (26)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (4451)

  • ffmpeg converting mov files to mp4

    27 février 2013, par user1503606

    Hi i have just installed ffmpeg and i am trying to encode all my uploaded videos to .mp4 file most of the users currently upload .mov and i want to convert every video to .mp4.

    i am running the command as follows.

    ffmpeg -i movie.mov -vcodec copy -acodec cop out.mp4

    But all i am getting is the following errors

    ffmpeg version 0.8.5, Copyright (c) 2000-2011 the FFmpeg developers
     built on Aug 19 2012 11:38:20 with clang 3.1 (tags/Apple/clang-318.0.61)
     configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang
     libavutil    51.  9. 1 / 51.  9. 1
     libavcodec   53.  7. 0 / 53.  7. 0
     libavformat  53.  4. 0 / 53.  4. 0
     libavdevice  53.  1. 1 / 53.  1. 1
     libavfilter   2. 23. 0 /  2. 23. 0
     libswscale    2.  0. 0 /  2.  0. 0
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2012-03-28 07:13:20
     Duration: 00:00:26.23, start: 0.000000, bitrate: 12974 kb/s
       Stream #0.0(eng): Video: mjpeg, yuvj420p, 1280x720 [PAR 72:72 DAR 16:9], 12972 kb/s, 11.67 fps, 600 tbr, 600 tbn, 600 tbc
       Metadata:
         creation_time   : 2012-03-28 07:13:20
    File 'out.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'out.mp4':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2012-03-28 07:13:20
       encoder         : Lavf53.4.0
       Stream #0.0(eng): Video: mjpeg, yuvj420p, 1280x720 [PAR 72:72 DAR 16:9], q=2-31, 12972 kb/s, 600 tbn, 600 tbc
       Metadata:
         creation_time   : 2012-03-28 07:13:20
    Stream mapping:
     Stream #0.0 -> #0.0
    Press [q] to stop, [?] for help
    frame=  121 fps=  0 q=-1.0 size=   16408kB time=00:00:10.08 bitrate=13332.2kbitsframe=  306 fps=  0 q=-1.0 Lsize=   41543kB time=00:00:26.12 bitrate=13025.0kbits/s    
    video:41538kB audio:0kB global headers:0kB muxing overhead 0.012531%

    Can anyone point me in the right direction thanks

  • FFmpeg works out mp3 duration with file input, but fails with pipe ?

    16 août 2012, par user1599160

    I am trying to get PCM data from mp3's using ffmpeg, but the files are stored on a database, gridfs, so I am trying to use pipes to give ffmpeg the data with some sucess, however there is one file which ffmpeg handles correctlt if fed the filename as an input, and incorrectly when given the file as a pipe :( any idea why ?

    ffmpeg -i - -f s16le -acodec pcm_s16le output.raw < testMp3s/test-corrupt.mp3

    gives

    ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
    built on Jun  9 2012 13:50:13 with gcc 4.7.0 20120505 (prerelease)
    configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --        enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex -- enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-libv4l2 --enable-gpl --enable-version3 --enable-runtime-cpudetect --  disable-debug --disable-static
    libavutil      51. 54.100 / 51. 54.100
    libavcodec     54. 23.100 / 54. 23.100
    libavformat    54.  6.100 / 54.  6.100
    libavdevice    54.  0.100 / 54.  0.100
    libavfilter     2. 77.100 /  2. 77.100
    libswscale      2.  1.100 /  2.  1.100
    libswresample   0. 15.100 /  0. 15.100
    libpostproc    52.  0.100 / 52.  0.100
    [mp3 @ 0x16d7100] Unknown attached picture mimetype: JPG, skipping.
    [mp3 @ 0x16d7100] max_analyze_duration 5000000 reached at 5015510
    [mp3 @ 0x16d7100] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from 'pipe:':
    Metadata:
    album           : FreshNewMusik.Com
    encoded_by      : iTunes 10.6.3
    title           : No Lie (Freestyle)
    artist          : Lil Wayne
    album_artist    : Lil Wayne
    genre           : Hip-Hop/Rap
    TT3             : twitter.com/jakejarvis
    date            : 2012
    Duration: N/A, start: 0.000000, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s

    Yet

    ffmpeg -i testMp3s/test-corrupt.mp3 -f s16le -acodec pcm_s16le output.raw

    gives

    ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
    built on Jun  9 2012 13:50:13 with gcc 4.7.0 20120505 (prerelease)
    configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --    enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-libv4l2 --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disable-static
    libavutil      51. 54.100 / 51. 54.100
    libavcodec     54. 23.100 / 54. 23.100
    libavformat    54.  6.100 / 54.  6.100
    libavdevice    54.  0.100 / 54.  0.100
    libavfilter     2. 77.100 /  2. 77.100
    libswscale      2.  1.100 /  2.  1.100
    libswresample   0. 15.100 /  0. 15.100
    libpostproc    52.  0.100 / 52.  0.100
    [mp3 @ 0xf33100] Unknown attached picture mimetype: JPG, skipping.
    [mp3 @ 0xf33100] max_analyze_duration 5000000 reached at 5015510
    [mp3 @ 0xf33100] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from 'testMp3s/test-corrupt.mp3':
    Metadata:
    album           : FreshNewMusik.Com
    encoded_by      : iTunes 10.6.3
    title           : No Lie (Freestyle)
    artist          : Lil Wayne
    album_artist    : Lil Wayne
    genre           : Hip-Hop/Rap
    TT3             : twitter.com/jakejarvis
    date            : 2012
    Duration: 00:02:33.86, start: 0.000000, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s

    How do I get the duration with the pipe ? (the data is available on memory in a python app)

  • Decoding audio w/ ffmpeg error on Android

    14 août 2012, par stranded

    Well, I knew I was going out of my comfort zone when I decided to try and decode audio using ffmpeg on Android but now I will have to admit that I'm stranded.
    It took me many days to just build ffmpeg for Android. Roman's10 guide did not work for me but finally things started looking up, thanks to this tutorial. So because of Dmitry's help I managed to build the armeabi version (not armeabi-v7) for my phone (LG P500) and everything basic works.

    But when I try to use avcodec_decode_audio3() things go downhill :( Never before have I felt so close to making things work (after all it seems to be only one line that is troublesome)
    but unable to though. I've read many questions here on SO that have brought me closer to the goal. Googling, on the other hand, has had limited results - making questions here the only fruit.

    Yes, I know ! I ramble. But I can't help it, I'm only trying to explain in detail where I'm stuck and how I got there. So without further ado I bring you the code :

    NATIVE CODE :

    #include
    #include <android></android>log.h>

    #include "libavcodec/avcodec.h"
    #include "libavformat/avformat.h"

    #define LOG_TAG "mylib"
    #define LOGI(...)  __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
    #define LOGE(...)  __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

    #define INBUFF_SIZE 4096
    #define AUDIO_INBUFF 20480
    #define AUDIO_REFILL_SIZE 4096

    jint Java_com_nothingworks_for_me_MainActivity_decode(JNIEnv * env, jobject this, jstring jfilename){
       const char *filename = (*env)->GetStringUTFChars(env, jfilename, NULL);
       AVCodec *codec;
       AVCodecContext *c= NULL;
       int audioStream;
       int out_size, len, i;
       FILE *f, *outfile;
       uint8_t *outbuf;
       uint8_t inbuf[AUDIO_INBUFF + FF_INPUT_BUFFER_PADDING_SIZE];
       AVPacket avpkt;
       AVFormatContext *pFormatCtx;

       av_register_all();
       avcodec_init();
       av_init_packet(&amp;avpkt);

       if(av_open_input_file(&amp;pFormatCtx, filename, NULL, 0, NULL)!=0)
       {
           LOGE("Can&#39;t open file &#39;%s&#39;\n", filename);
           return 1;
       }
       else
       {
           LOGI("File was opened\n");
           LOGI("File &#39;%s&#39;, Codec %s",
                   pFormatCtx->filename,
                   pFormatCtx->iformat->name
           );
       }

       if (av_find_stream_info(pFormatCtx) &lt; 0){
           LOGE("Can&#39;t find stream info");
       }
       audioStream = -1;
       for (i = 0; i &lt; pFormatCtx->nb_streams; i++) {
           if (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO) {
               audioStream = i;
               break;
           }
       }

       if (audioStream == -1) {
           LOGE("Didn&#39;t find stream!");
       }
       c = pFormatCtx->streams[audioStream]->codec;

       codec = avcodec_find_decoder(c->codec_id);
       if (!codec) {
           LOGE("Unsupported Codec!");
       }

       c= avcodec_alloc_context();

       /* open it */
       if (avcodec_open(c, codec) &lt; 0) {
           LOGE("Can&#39;t open codec");
           exit(1);
       }

       outbuf = av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE * 2);

       f = fopen(filename, "rb");
       if (!f) {
           LOGE("Can&#39;t open file");
           exit(1);
       }

       /* decode until eof */
       avpkt.data = inbuf;
       avpkt.size = fread(inbuf, 1, AUDIO_INBUFF, f);
       LOGI("avpkt.size %d", avpkt.size);

       while (avpkt.size > 0) {
           out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE * 2;

    THINGS GO WRONG HERE ! avcodec_decode_audio3() The code continues from ▲ to ▼ :

           len = avcodec_decode_audio3(c, (int16_t *)outbuf, &amp;out_size, &amp;avpkt);
           LOGI("data_size %d len %d", out_size, len);
           if (len &lt; 0) {
               LOGE("Error while decoding");
               exit(1);
           }
           if (out_size > 0) {

           }
           avpkt.size -= len;
           avpkt.data += len;
           if (avpkt.size &lt; AUDIO_REFILL_SIZE) {
               /* Refill the input buffer, to avoid trying to decode
                * incomplete frames. Instead of this, one could also use
                * a parser, or use a proper container format through
                * libavformat. */
               memmove(inbuf, avpkt.data, avpkt.size);
               avpkt.data = inbuf;
               len = fread(avpkt.data + avpkt.size, 1,
                       AUDIO_INBUFF - avpkt.size, f);
               if (len > 0)
                   avpkt.size += len;
           }
       }
       fclose(f);
       free(outbuf);

       avcodec_close(c);
       av_free(c);
       return 0;
    }

    What happens is that avcodec_decode_audio3() returns -1 and that's pretty much it :(
    I have no idea what to do next. I can't find much info about this and I only started fiddling with C less than two weeks ago so your guidance is my only hope now [play dramatic sound]. Hope someone can shed a little light on this mystery.

    Ohh ! And the native code is some kind of a hybrid between what I have found here on SO, like this and this, and the ffmpeg example. On the java side I only have a call to this native method and pass it string which is the path to a MP3 song on my droid. I don't use AudioTrack or anything else in my java code yet 'cause I'm only trying to get the decoding to work for now.

    -Drama Queen OUT !