Recherche avancée

Médias (91)

Autres articles (56)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

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

  • How to fix " Could not open codec 'libx264' : Unspecified error" ?

    3 février 2016, par Nakeun Choi

    I am using BeagleBone Black on my project. When I try x264 codec in my opencv code, it shows me error like this :

    [libx264 @ 0x2b1600] broken ffmpeg default settings detected
    [libx264 @ 0x2b1600] use an encoding preset (e.g. -vpre medium)
    [libx264 @ 0x2b1600] preset usage : -vpre -vpre
    [libx264 @ 0x2b1600] speed presets are listed in x264 —help
    [libx264 @ 0x2b1600] profile is optional ; x264 defaults to high
    Could not open codec ’libx264’ : Unspecified error

    How can I fix this ?
    I have to encode with h264 codec.

  • Do I need to open source my application If I use x264 through Android MediaCodec ? [closed]

    14 août 2019, par sanjay

    I want to encode some animation and save them as video. I want to use x264 Lib. But x264 license is GPL or commercial so I can not link with it directly without purchasing license. Do I need to opensource my app, If I use Android MediaCodec (https://developer.android.com/reference/android/media/MediaCodec) to encode which internally uses x264 ?

  • Decode .wav file and write it into another file using ffmpeg

    16 février 2017, par deshu

    How to decode a .wav file and write it into another file using ffmpeg ?

    I got decoded data by this piece of code :

    -(void)audioDecode:(const char *)outfilename inFileName:(const char *)filename

    {

    const char* input_filename=filename;

       //avcodec_register_all();
       av_register_all();
       avcodec_register_all();
      // av_register_all();
       //av_ini

    //    AVFormatContext* container=avformat_alloc_context();
    //    if(avformat_open_input(&container,filename,NULL,NULL)<0){
    //        NSLog(@"Could not open file");
    //    }

       AVCodec *codec;
       AVCodecContext *c= NULL;
       int len;
       FILE *f, *outfile;
       uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
       AVPacket avpkt;
       AVFrame *decoded_frame = NULL;

       av_init_packet(&avpkt);

       printf("Decode audio file %s to %s\n", filename, outfilename);
       avcodec_register_all();

       AVFrame* frame = av_frame_alloc();
       if (!frame)
       {
           fprintf(stderr, "Could not allocate audio frame\n");
                           exit(1);
       }

       AVFormatContext* formatContext = NULL;
       /* Opening the file, and check if it has opened */
       if (avformat_open_input(&formatContext, filename, NULL, NULL) != 0)
       {
           av_frame_free(&frame);
           NSLog(@"Could not open file");
       }

       if (avformat_find_stream_info(formatContext, NULL) < 0)
       {
           av_frame_free(&frame);
           avformat_close_input(&formatContext);

           NSLog(@"Error finding the stream info");
       }

           outfile = fopen(outfilename, "wb");
           if (!outfile) {
               av_free(c);
               exit(1);
           }

       /* Find the audio Stream, if no audio stream are found, clean and exit */
       AVCodec* cdc = NULL;
       int streamIndex = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &cdc, 0);
       if (streamIndex < 0)
       {
           av_frame_free(&frame);
           avformat_close_input(&formatContext);
           NSLog(@"Could not find any audio stream in the file");
           exit(1);
       }

       /* Open the audio stream to read data  in audioStream */
       AVStream* audioStream = formatContext->streams[streamIndex];

       /* Initialize the codec context */
       AVCodecContext* codecContext = audioStream->codec;
       codecContext->codec = cdc;
       /* Open the codec, and verify if it has opened */
       if (avcodec_open2(codecContext, codecContext->codec, NULL) != 0)
       {
           av_frame_free(&frame);
           avformat_close_input(&formatContext);
           NSLog(@"Couldn't open the context with the decoder");
           exit(1);
       }

       /* Initialize buffer to store compressed packets */
       AVPacket readingPacket;
       av_init_packet(&readingPacket);
       int lenght = 1;
       long long int chunk = ((formatContext->bit_rate)*lenght/8);
       int j=0;
       int count = 0;
       //audioChunk output;


       while(av_read_frame(formatContext, &readingPacket)==0){
           //if((count+readingPacket.size)>start){
               if(readingPacket.stream_index == audioStream->index){

                   AVPacket decodingPacket = readingPacket;

                   // Audio packets can have multiple audio frames in a single packet
                   while (decodingPacket.size > 0){
                       // Try to decode the packet into a frame
                       // Some frames rely on multiple packets, so we have to make sure the frame is finished before
                       // we can use it
                       int gotFrame = 0;
                       int result = avcodec_decode_audio4(codecContext, frame, &gotFrame, &decodingPacket);

                       count += result;

                       if (result >= 0 && gotFrame)
                       {
                           decodingPacket.size -= result;
                           decodingPacket.data += result;
                           int a;

                           for(int i=0;idata[0], 1, decodingPacket.size, outfile);
    //                            *(output.data+j)=frame->data[0][i];
    //
                               j++;
                               if(j>=chunk) break;
                           }

                           // We now have a fully decoded audio frame
                       }
                       else
                       {
                           decodingPacket.size = 0;
                           decodingPacket.data = NULL;
                       }
                      // if(j>=chunk) break;
                   }
               }
    //        }else count+=readingPacket.size;
    //        
    //        // To prevent memory leak, must free packet.
    //        av_free_packet(&readingPacket);
    //        if(j>=chunk) break;
       }
       fclose(outfile);

    But the file is created with zero bytes. I don’t know what’s wrong with this code. And I got one more error : "Format adp detected only with low score of 25, misdetection possible !"