Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (53)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (6100)

  • Choppy sound when using ffmpeg

    24 novembre 2011, par Kurt

    I suffered some choppy audio when i try to capture audio from a live stream.
    Another essential problem which could explain the problem is that the Wav file created is twice longer than the capture time.

    The audio is perfect when i play the avs input file with ffplay, so the avs is ok, the problem is after whether in the capture or in the Wav writing.

    To capture :

    av_read_frame(pFormatCtx, &packet)

    if(packet.stream_index == mAudioStream)
    {
       int buff_size = sizeof(mAudioBuffer);
       std::cout << "Buff_size " << buff_size << std::endl;
       len = avcodec_decode_audio3(pAudioCodecCtx,(int16_t*)mAudioBuffer, &buff_size,&packet);
       if(len < 0){
           qDebug("Extractor - Audio isEnd = -1;");
           mAudioBufferSize = 0;
           isEnd = ERROR_;
           return isEnd;
       }

       // Set packet result type
       mFrameType = AUDIO_PKT;
       mAudioBufferSize = buff_size;
       //store audio synchronization informations:
       if(packet.pts != AV_NOPTS_VALUE) {
            mAudioPts_ = av_q2d(pFormatCtx->streams[mAudioStream]->time_base);
            mAudioPts_ *= packet.pts;
       }
    }

           // store a copy of current audio frame in _frame
           _frame.audioFrame = new decoded_frame_t::audio_frame_t();
           _frame.audioFrame->sampleRate = mediaInfos.audioSampleRate;
           _frame.audioFrame->sampleSize = mediaInfos.audioSampleSize;
           _frame.audioFrame->nbChannels = mediaInfos.audioNbChannels;
           _frame.audioFrame->nbSamples = mAudioBufferSize / ((mediaInfos.audioSampleSize/8) * mediaInfos.audioNbChannels);
           _frame.audioFrame->buf.resize(mAudioBufferSize);
           memcpy(&_frame.audioFrame->buf[0],mAudioBuffer,mAudioBufferSize);

    Then i store in a Wav File using libsndfile :

    SNDFILE*            fd;
    SF_INFO             sfInf;

    sfInf.frames = 0;
    sfInf.channels = p_capt->ui_nbChannels;
    sfInf.samplerate = p_capt->ui_sampleRate;
    sfInf.format = SF_FORMAT_WAV | SF_FORMAT_PCM_U8;
    sfInf.sections = 0;
    sfInf.seekable = 0;

    if (sf_format_check(&sfInf) == FALSE)
       std::cout << "Format parameter are uncorrect ! Exit saving !" << std::endl;
    else
    {
       fd = sf_open(fileName.toStdString().c_str(), SFM_WRITE, &sfInf);
       if (fd == NULL)
       {
           std::cout << "Unable to open the file " << fileName.toStdString() << std::endl;
           return GRAB_ST_NOK;
       }

       //little trick because v_buf is a uint8_t vector
       sf_count_t l = sf_write_short(fd, (const short *)(&(p_capt->v_buf[0])), p_capt->v_buf.size()/2);

       if (l != p_capt->v_buf.size()/2)
       {
          std::cout << "sf_write didn't write the right amoung of bits " << l << " != " << p_capt->v_buf.size()/2 << std::endl;
          ret = GRAB_ST_NOK;
       }
       else
       {
           sf_write_sync(fd);
           sf_close(fd);
           ret = GRAB_ST_OK;
       }
    }

    I hope it's understandable. Waiting for remarks.

    Kurt

  • How to capture camera devices on Windows using Libav ?

    22 septembre 2011, par Occulta

    Is there any way to capture frames from as many camera types as DirectShow do on Windows platform using Libav ? I need to capture a camera output without using DirectShow filters and I want my application to work with many camera devices types.

    I have searched the Internet about this capability of libav and found that it can be done via libav using special input format "vfwcap". Something like that (don't sure about code correctness - I wrote it by myself) :

    AVFormatParameters formatParams = NULL;
    AVInputFormat* pInfmt = NULL;
    pInFormatCtx*  pInFormatCtx = NULL;

    av_register_all();

    //formatParams.device = NULL; //this was probably deprecated and then removed
    formatParams.channel = 0;
    formatParams.standard = "ntsc"; //deprecated too but still available
    formatParams.width = 640;
    formatParams.height = 480;
    formatParams.time_base.num = 1000;
    formatParams.time_base.den = 30000; //so we want 30000/1000 = 30 frames per second
    formatParams.prealloced_context = 0;


    pInfmt = av_find_input_format("vfwcap");
    if( !pInfmt )
    {
     fprintf(stderr,"Unknown input format\n");
     return -1;
    }

    // Open video file (formatParams can be NULL for autodetecting probably)
    if (av_open_input_file(&pInFormatCtx, 0, pInfmt, 0, formatParams) < 0)
      return -1; // Couldn't open device

    /* Same as video4linux code*/

    So another question is : how many devices are supported by Libav ? All I have found about capture cameras output with libav on windows is advice to use DirectShow for this purpose because libav supports too few devices. Maybe situation has already changed now and it does support enough devices to use it in production applications ?

    If this isn't possible.. Well I hope my question won't be useless and this composed from different sources piece of code will help someone interested in this theme 'coz there are really too few information about it in the whole internet.

  • Recording a mp3 stream with FFMPEG and drop-outs

    14 mars 2013, par Rob Oliver

    I hope someone can give me pointer, I have a php script that runs the command below to record an live radio mp3 stream to create hour long mp3 recordings. It works very well for my purpose. The only issue is occasionally no recording is made. As far as I can tell its because the stream has dropped out and ffmpeg just aborts.

    /usr/local/bin/ffmpeg -i http://www.mystream.com:8000/radiostream.mp3 -t 60:00 -acodec copy /var/www/mydomain/audio/".$recorded_audio_title;

    So my question, is there anyway to tell ffmpeg to continuously record for the 60:00 minutes to make a recording even if their are drop outs ? I'd be happy with a odd bit of silence providing it completed the recording.

    I hope this makes sense and I'd appreciate even a pointer to a FFMPEG option or flag. Having Google'd I havnt seen anything that would fit the bill.

    Many thanks in advance

    rob