Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (47)

  • 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

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

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

  • Trouble writing mp3 into flv container

    8 février 2013, par Sriram

    I am encoding a raw pcm stream with LAME and writing the mp3 encoded samples to an flv container using a c program. For debugging purposes, I am also writing the mp3 encoded samples to a file separately. The following is observed :

    1. The mp3 written to another file is correct. There are no clicks or any other artefacts observed.
    2. The flv file does not play anything. Examining with ffmpeg like so :

      $ ./ffmpeg.exe -i temp_local_flv.flv

    The above command gives the following :

    ffmpeg version N-49352-gc46943e Copyright (c) 2000-2013 the FFmpeg developers
     built on Jan 26 2013 12:12:14 with gcc 4.7.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 17.100 / 52. 17.100
     libavcodec     54. 91.100 / 54. 91.100
     libavformat    54. 61.104 / 54. 61.104
     libavdevice    54.  3.102 / 54.  3.102
     libavfilter     3. 34.101 /  3. 34.101
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [flv @ 0000000000307be0] Stream discovered after head already parsed
    [mp3 @ 000000000237d9c0] Header missing
    Input #0, flv, from 'temp_local_flv.flv':
     Duration: 00:00:00.07, start: 0.002000, bitrate: 643 kb/s
       Stream #0:0: Audio: mp3, 22050 Hz, mono, s16p, 32 kb/s
       Stream #0:1: Data: none
    At least one output file must be specified  

    My questions :
    1. What is this "Header missing" ? Is there a "special" mp3 header that needs to be written when writing encoded samples to an flv container ? If so, what does the header contain ? And given that the mp3 samples written to the file are decoded correctly by an audio player, what am I missing ?

  • ffmpeg transcode

    12 novembre 2015, par user2004388

    I want to do a audio trancode using ffmpeg library. Now i have out file but I can listen only noise .
    The steps of my program are :
    1) Open input file and decode in raw format using avcodec_decode_audio4
    2) encode and save the raw format .
    I don’t Know where I wrong. This is my code.

    /*
    * File:   newmain.c
    * Author: antonello
    *
    * Created on 23 gennaio 2013, 11.24
    */

    #include
    #include


    #include <libavutil></libavutil>samplefmt.h>
    #include <libavutil></libavutil>timestamp.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libavcodec></libavcodec>old_codec_ids.h>

    static AVCodecContext *get_encoder(int sampleRate, int channels, int audioBitrate)
    {
       AVCodecContext  *audioCodec;
       AVCodec *codec;



       //Set up audio encoder
       codec = avcodec_find_encoder(CODEC_ID_AAC);
       if (codec == NULL)
       {
           printf("avcodec_find_encoder: ERROR\n");
           return NULL;
       }
       audioCodec = avcodec_alloc_context();
       audioCodec->bit_rate = audioBitrate;
       audioCodec->sample_fmt = AV_SAMPLE_FMT_S16P;
       audioCodec->sample_rate = sampleRate;
       audioCodec->channels = channels;
       audioCodec->profile = FF_PROFILE_AAC_MAIN;
       audioCodec->channel_layout=AV_CH_LAYOUT_MONO;
       //audioCodec->time_base = (AVRational){1, sampleRate};
       audioCodec->time_base.num  = 1;
       audioCodec->time_base.den  = sampleRate;

       audioCodec->codec_type = AVMEDIA_TYPE_AUDIO;
       if (avcodec_open(audioCodec, codec) &lt; 0)
       {
           printf("avcodec_open: ERROR\n");
           return NULL;
       }

       return audioCodec;
    }


    int main(int argc, char** argv) {
     AVFormatContext *aFormatCtx_decoder = NULL;
     AVFormatContext *aFormatCtx_encoder = NULL;
     int             i, audioStream;
     AVPacket        packet_decoder;
     AVPacket        packet_encoder;
     int             got_frame=0;
     int             complete_decode=0;
     int             len;
     AVFrame         *decoded_frame = NULL;
     AVCodecContext  *aCodec_decoderCtx = NULL;
     AVCodec         *aCodec_decoder = NULL;
     FILE            *outfile;
     //reding input file
     avcodec_register_all();

      //register all codecs
       av_register_all();

    //open file
       if(avformat_open_input(&amp;aFormatCtx_decoder, "sample.aac", NULL, NULL)!=0){
           fprintf(stderr, "Could not open source file \n");
           return -1; // Couldn't open file
       }

     // Retrieve stream information
     if(avformat_find_stream_info(aFormatCtx_decoder, NULL)&lt;0){
         fprintf(stderr, "Couldn't find stream information \n");
         return -1; // Couldn't find stream information
     }

     // Dump information about file onto standard error
     //av_dump_format(aFormatCtx_decode, 0, argv[1], 0);

     // Find the first audio stream
     audioStream=-1;

     for(i=0; inb_streams; i++) {
       if(aFormatCtx_decoder->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO &amp;&amp;
          audioStream &lt; 0) {
         audioStream=i;
       }
     }
     if(audioStream==-1){
         fprintf(stderr, "File haven't sudio stream \n");
         return -1;
     }

     //get audio codec contex
     aCodec_decoderCtx=aFormatCtx_decoder->streams[audioStream]->codec;
     //get audio codec
     aCodec_decoder = avcodec_find_decoder(aCodec_decoderCtx->codec_id);
     aCodec_decoder->sample_fmts=AV_SAMPLE_FMT_S16P;
     if(!aCodec_decoder) {
       fprintf(stderr, "Unsupported codec!\n");
       return -1;//Unsupported codec!
     }
     //open codec
     // Open codec
     if(avcodec_open2(aCodec_decoderCtx, aCodec_decoder, NULL)&lt;0)
       return -1; // Could not open codec
     // allocate audio frame
     decoded_frame = avcodec_alloc_frame();
     if (!decoded_frame) {
       fprintf(stderr, "Could not allocate audio frame\n");
       return -1;//Could not allocate audio frame
       }
     aCodec_decoderCtx->bit_rate=12000;
     aFormatCtx_encoder=get_encoder(8000,1,12000);
     av_init_packet(&amp;packet_encoder);

     printf("param %d %d %d",aCodec_decoderCtx->sample_fmt,aCodec_decoderCtx->channels,aCodec_decoderCtx->bit_rate);

     outfile = fopen("out.aac", "wb");
       if (!outfile) {
           printf(stderr, "Could not open outfile \n");
           return -1;//Could not open outfile
       }
     while(av_read_frame(aFormatCtx_decoder, &amp;packet_decoder)>=0) {
        // decode frame
        len = avcodec_decode_audio4(aCodec_decoderCtx, decoded_frame, &amp;got_frame, &amp;packet_decoder);
           if (len &lt; 0) {
               fprintf(stderr, "Error while decoding\n");
               return -1;
               }

           if (got_frame){
             avcodec_encode_audio2(aFormatCtx_encoder,&amp;packet_encoder,decoded_frame,&amp;complete_decode);
             if(complete_decode){
             //    printf("complete decode frame");
                 fwrite(packet_encoder.data, 1, packet_encoder.size, outfile);
                 av_free_packet(&amp;packet_encoder);
             }
           }



       }
     fclose(outfile);
       return (EXIT_SUCCESS);
    }
  • Simple ffmpeg cutting of videos and storing in specific location

    18 octobre 2013, par Akash Deshpande

    How to cut a small segment from a video in ffmpeg

    ffmpeg.exe -i F:\\Ims\\144\\TestRun\\12907\\144151__cam144__10-10-2013 8.32.36 PM__10-10-2013 8.52.55 PM.avi -ss 00:00:01 -t 00:01:00 -vcodec -acodec -o F:\\IMS_Analysis\\cam144_0.avi

    Gives an error that the option "-o" is not know. How do I ask ffmpeg create the output file called cam144_o.avi ? what is the switch for this ?