Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (52)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

Sur d’autres sites (6231)

  • converting one video file to another video file with sound from ffmpeg using vc++2010 [closed]

    18 février 2013, par user2047514

    I am devloping a application that convert one video to another including sound (means in source file has video as well as sound) with the help of FFMPEG Librrary. I have created a video. But sound is not availabe in converted video. so please help me how can i fix this issue. I am sending You link .

    FFmpeg not honoring bitrate for different containers ?
    i have used this code for doing my work but sound is not availble. so please help my how can we handle this situation.

    Thanks for your cooperation
    Waiting your response.

  • 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 !"

  • get audio current freqency for each 0.1 second of audio file with ffmpeg sox or opus into file.txt

    15 mars 2019, par Vlad

    I am trying to get audio freqency statistic from call record in file.opus for each 0,1 second, have try ffmpeg (spectrum) ffprobe ,
    for example
    sox  '.$file.' −n rate 6k spectrogram −z 62 -w Hamming -o aaaaaa/test10.png stat -freq 2>aaaaaa/test10.txt
    return spectrum
    all of them return values but no freqency found any other library ? Or what I am doing wrong I now it retrun spectrum but I need concrete freqency of human voice it is possible with ffmpeg or ffprobe or sox ? I am working in php but running shel comands any help will be aprisiatied. What should be my next step ? I am lost I have no idea how could get freqency from this numbers or "it is possible " ??? What is the first step comand in sox etc.