Recherche avancée

Médias (91)

Autres articles (63)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6243)

  • mp4 muxing problems on dm365 board

    25 mai 2013, par Ulterior

    I happen to be stuck with strange TI codec issues while encoding video. To cut story short - the encoded data which is generated by TI mpeg4 codecs are not 'understood' by nothing else, but VLC and media classic player.

    After really long googling and several seasons I face to you stackoverlowers to help me understand what is wrong in the encoded frame headers, because I really fail to find any answers.

    AviDemux 2.6.1 opens and remux-es video data without problems. So there is hope to understand whats is wrong with mp4 generated data...

    I would really appreciate any help from mp4 gurus out there...

    the link to the problem file

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