Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (8992)

  • Messages : Create messages_tj.js

    14 janvier 2014, par 1darvesh
    Messages : Create messages_tj.js
    

    Added Tajik (Asia/Tajikistan) language

    Closes gh-888

  • Create thumbnail from video without ffmpeg in php

    17 janvier 2014, par Naveed Ramzan

    I need to create thumbnail without ffmpeg because I have to deploy site on shared hosting and ffmpeg is not available on shared hosting.

    Can someone suggest some solution ?

    Waiting for fruitful replies.

  • 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 :(