Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (106)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (12864)

  • how play ogg/ape/wv/wma using ffmpeg

    25 novembre 2013, par user2361120

    I'm trying decode ogg,ape,wma,wv file formats
    I have posted the code below, but I'm having too much noise at the output

    av_init_packet(&packet);
           fmt_ctx = avformat_alloc_context();

           if ((ret = avformat_open_input(&fmt_ctx, szfile, NULL, NULL)) < 0)
           {
               LOGE("Cannot open input file\n");
           }
           if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0)
           {
               LOGE("Cannot find stream information\n");
           }

           /* select the audio stream */
           ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0);
           if (ret < 0)
           {
               LOGE("Cannot find a audio stream in the input file\n");
           }

           audio_stream_index = ret;
           dec_ctx = fmt_ctx->streams[audio_stream_index]->codec;

           LOGE(" ogg code %d codec id%d\n",AV_CODEC_ID_VORBIS,dec_ctx->codec_id);

           LOGE("avcodec_find_decoder\n");


           dec = avcodec_find_decoder(dec_ctx->codec_id);
                           if (!dec) {

                 __android_log_print(ANDROID_LOG_INFO, "BroovPlayer", "avcodec_find_decoder failed %d Name:%s\n", dec_ctx->codec_id, dec_ctx->codec_name);


                           }


           if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0)
           {
               LOGE("Cannot open audio decoder\n");
           }




           //dec_ctx->sample_fmt = AV_SAMPLE_FMT_S16P;
           LOGS("Stage 5 sample fmt %d",dec_ctx->sample_fmt);
           LOGE("Stage 5");
           LOGD("........%d", packet.size);
           while (1)
           {

                  if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
                  {
                      //LOGE("Stage........... %d",ret);
                      break;
                  }
                  if (packet.stream_index == audio_stream_index)
                  {
                          avcodec_get_frame_defaults(frame);
                          got_frame = 0;
                         // LOGE("file size=%d packet_index=%d",packet.size,packet.dts);


                          ret = avcodec_decode_audio4(dec_ctx, frame, &got_frame, &packet);
                        //  LOGE("len=%d",ret);
                          if (ret < 0)
                          {
                              LOGE("Error decoding audio\n");
                              continue;
                          }

                          if (!got_frame) {
                                       /* stop sending empty packets if the decoder is finished */
                                       if (!packet.data && dec->capabilities & CODEC_CAP_DELAY)
                                           //flush_complete = 1;
                                       continue;
                                   }

                          if (got_frame)
                          {
                              // LOGE("begin frame decode\n");
                               int data_size = av_samples_get_buffer_size(NULL, dec_ctx->channels,frame->nb_samples,dec_ctx->sample_fmt, 1);
                              // LOGE("after frame decode\n");

                               jbyte *bytes = (*env)->GetByteArrayElements(env, array, NULL);
                               memcpy(bytes, frame->data[0], data_size); //
                               (*env)->ReleaseByteArrayElements(env, array, bytes, 0);
                               (*env)->CallVoidMethod(env, obj,play, array, data_size);

                          }
                          packet.size -= ret;
                          packet.data += ret;
                          packet.pts = AV_NOPTS_VALUE;


                    }
             }

                  av_free_packet(&packet);



               when ,i am playing ogg/ape/wv audio file format .



             please help me to minimize the noise, as less as possible

    or if any other approach is there to decode these file formats then please let me know

    thanks

  • FFmpeg using complex filter amerge doesn't play on iOS

    11 juillet 2018, par SilenceKit

    I am using 2 different FFmpeg commands to add audio to a video :
    This adds audio and replace video’s existing audio :

    ffmpeg -i "inputVideo.wmv" -i "inputAudio.mp3" -map 0:v -map 1:a -shortest -vcodec libx264 -preset ultrafast -crf 22 -pix_fmt yuv420p -r 30 "outputVideo.mp4"

    It works fine.

    The problem comes when I try to mix the new audio with the video’s existing audio :

    ffmpeg -i "inputVideo.wmv" -i "inputAudio.mp3" -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map 0:v -map "[a]" -shortest -vcodec libx264 -preset ultrafast -crf 22 -pix_fmt yuv420p -r 30 "outputVideo.mp4"

    The video plays fine everywhere but on iOS. I’ve tried adding -profile:v main -level 3.1 and -profile:v baseline -level 3.1 but no luck either.

    ffmpeg -i "inputVideo.wmv" -i "inputAudio.mp3" -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map 0:v -map "[a]" -shortest -vcodec libx264 -profile:v baseline -level 3.1 -preset ultrafast -crf 22 -pix_fmt yuv420p -r 30 "outputVideo.mp4"

    WHat do I need to do to make the output video play on iOS ?

  • Using FFMPEG video convert, not play audio

    7 avril 2017, par Tarun Bhardwaj

    I am using this command its works fine, but remove audio of video file

    ffmpeg -i background.jpg -i man-1.mp4 -filter_complex [1:v]chromakey=0x3BBD1E:0.1:0.2[ckout];[0:v][ckout]overlay[out] -map [out] box3.mp4