Recherche avancée

Médias (0)

Mot : - Tags -/albums

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (55)

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

  • how do i create a stereo mp3 file with latest version of ffmpeg ?

    17 juin 2016, par Sean

    I’m updating my code from the older version of ffmpeg (53) to the newer (54/55). Code that did work has now been deprecated or removed so i’m having problems updating it.

    Previously I could create a stereo MP3 file using a sample format called :

    SAMPLE_FMT_S16

    That matched up perfectly with my source stream. This has now been replace with

    AV_SAMPLE_FMT_S16

    Which works fine for mono recordings but when I try to create a stereo MP3 file it bugs out at avcodec_open2 with :

    "Specified sample_fmt is not supported."

    Through trial and error I’ve found that using

    AV_SAMPLE_FMT_S16P

    ...is accepted by avcodec_open2 but when I get through and create the MP3 file the sound is very distorted - it sounds about 2 octaves lower than usual with a massive hum in the background - here’s an example recording :

    http://hosting.ispyconnect.com/example.mp3

    I’ve been told by the ffmpeg guys that this is because I now need to manually deinterleave my byte stream before calling :

    avcodec_fill_audio_frame

    How do I do that ? I’ve tried using the swrescale library without success and i’ve tried manually feeding in L/R data into avcodec_fill_audio_frame but the results i’m getting are sounding exactly the same as without interleaving.

    Here is my code for encoding :

    void add_audio_sample( AudioWriterPrivateData^ data, BYTE* soundBuffer, int soundBufferSize)
    {
       libffmpeg::AVCodecContext* c = data->AudioStream->codec;
       memcpy(data->AudioBuffer + data->AudioBufferSizeCurrent,  soundBuffer, soundBufferSize);
       data->AudioBufferSizeCurrent += soundBufferSize;
       uint8_t* pSoundBuffer = (uint8_t *)data->AudioBuffer;
       DWORD nCurrentSize    = data->AudioBufferSizeCurrent;

       libffmpeg::AVFrame *frame;

       int got_packet;
       int ret;
       int size = libffmpeg::av_samples_get_buffer_size(NULL, c->channels,
                                                 data->AudioInputSampleSize,
                                                 c->sample_fmt, 1);

       while( nCurrentSize >= size)    {

           frame=libffmpeg::avcodec_alloc_frame();
           libffmpeg::avcodec_get_frame_defaults(frame);

           frame->nb_samples = data->AudioInputSampleSize;

           ret = libffmpeg::avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt, pSoundBuffer, size, 1);
           if (ret<0)
           {
               throw gcnew System::IO::IOException("error filling audio");
           }
           //audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;

           libffmpeg::AVPacket pkt = { 0 };
           libffmpeg::av_init_packet(&pkt);

           ret = libffmpeg::avcodec_encode_audio2(c, &pkt, frame, &got_packet);

           if (ret<0)
                   throw gcnew System::IO::IOException("error encoding audio");
           if (got_packet) {
               pkt.stream_index = data->AudioStream->index;

               if (pkt.pts != AV_NOPTS_VALUE)
                   pkt.pts = libffmpeg::av_rescale_q(pkt.pts, c->time_base, c->time_base);
               if (pkt.duration > 0)
                   pkt.duration = av_rescale_q(pkt.duration, c->time_base, c->time_base);

               pkt.flags |= AV_PKT_FLAG_KEY;

               if (libffmpeg::av_interleaved_write_frame(data->FormatContext, &pkt) != 0)
                       throw gcnew System::IO::IOException("unable to write audio frame.");


           }
           nCurrentSize -= size;  
           pSoundBuffer += size;  
       }
       memcpy(data->AudioBuffer, data->AudioBuffer + data->AudioBufferSizeCurrent - nCurrentSize, nCurrentSize);
       data->AudioBufferSizeCurrent = nCurrentSize;

    }

    Would love to hear any ideas - I’ve been trying to get this working for 3 days now :(

  • Revision 8be3056c45 : Change buffer update rules on ARF overlay. When coding the frame that correspon

    12 mars 2013, par Paul Wilkins

    Changed Paths : Modify /vp9/decoder/vp9_onyxd_if.c Modify /vp9/encoder/vp9_onyx_if.c Change buffer update rules on ARF overlay. When coding the frame that corresponds to the midpoint frame defining an ARF, do not update the last reference frame buffer. Previously this buffer was updated meaning (...)

  • Isolate and expose the new method to get external

    17 février 2013, par Grandt
    Isolate and expose the new method to get external
    

    Added function getFileContents to use the previously added code for more
    robusylt get external file data. Will now attempt to use curl on
    external files, then fall back to file_get_content.