Recherche avancée

Médias (91)

Autres articles (40)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

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

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (5107)

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