Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (56)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (8122)

  • How to convert audio stream from PureTool/CVS video ?

    1er janvier 2013, par Mark

    I apologize if there is a better place to post this. I recently came across a couple CVS single-use video cameras that I had been using back in 2005. I still have the USB cable I made and now that I've switched to Mac I can use Puretool to extract the old videos from the cameras. The problem I'm having is that I can only hear the audio when viewing the videos with VLC media player. I read on PureTools site, a common problem is that the audio codec used is incompatible with Quicktime and the audio stream needs to be converted. There is a link on their site to a program called FixSound which is purported to fix this, but the link is dead and I've been unable to find any further information about this. If anyone could point me in the right direction, I'd be very grateful. All the videos I'm dealing with are from the first year of my son's life and I'd really like to be able to archive them in a more uniform format. I would think this would be possible to do using Adobe Audition or some other program in Adobe's CS6 Master Collection but I've only dealt with Photoshop, Illustrator, Dreamweaver, Flash & Fireworks. I have no experience with audio or video yet.

    Thanks,

    Mark

  • Decode a video file from memory using libav

    21 octobre 2015, par Dídac Pérez

    Supose I have an entire video file in memory and I want to use libav to decode the whole frames. How should I do it ? The point is that I can do it reading directly from a file using avformat_open_input() function but I do need to do it from a file which is stored in memory.

    My AVIOContext implementation :

    class AVIOMemContext
    {

    public:

       AVIOMemContext(char* videoData, const int videoLen)
       {
           // Output buffer
           bufferSize = 32768;
           buffer = static_cast(av_malloc(bufferSize));

           // Internal buffer
           pos = 0;
           this->videoData = videoData;
           this->videoLen = videoLen;

           ctx_ = avio_alloc_context((unsigned char*) buffer, bufferSize, AVIO_FLAG_READ, this, &AVIOMemContext::read, &AVIOMemContext::write, &AVIOMemContext::seek);
       }

       ~AVIOMemContext()
       {
           av_free(videoData);
       }

       static int read(void *opaque, unsigned char *buf, int buf_size)
       {
           AVIOMemContext* This = static_cast(opaque);

           // Read from pos to pos + buf_size
           if (This->pos + buf_size > This->videoLen)
           {
               int len = This->videoLen - This->pos;
               memcpy(buf, This->videoData + This->pos, len);
               return len;
           }
           else
           {
               memcpy(buf, This->videoData + This->pos, buf_size);
               return buf_size;
           }
       }

       static int write(void *opaque, unsigned char *buf, int buf_size)
       {
           /*
           AVIOMemContext* This = static_cast(opaque);
           return fwrite(buf, 1, buf_size, This->f_);
           */

           return 0;
       }

       static int64_t seek(void *opaque, int64_t offset, int whence)
       {
           AVIOMemContext* This = static_cast(opaque);

           if (offset + whence > This->videoLen)
           {
               This->pos = This->videoLen;

               return -1;
           }
           else
           {
               This->pos = offset + whence;

               return 0;
           }
       }

       AVIOContext *get_avio()
       {
           return ctx_;
       }

    private:

       // Output buffer
       int bufferSize;
       char* buffer;

       // Internal buffer
       int pos;
       char* videoData;
       int videoLen;

       AVIOContext* ctx_;

    };

    My current code :

    [...]

    av_register_all();
    avcodec_register_all();

    AVFormatContext* context;
    AVCodec* pCodec;
    AVPacket packet;
    AVCodecContext* pCodecCtx;
    int video_stream_index;
    int res;
    int got_picture;

    // Init variables and objects
    context = avformat_alloc_context();

    AVIOMemContext priv_ctx(videoData, videoLen);
    context->pb = priv_ctx.get_avio();

    res = avformat_find_stream_info(context, NULL);

    if (res < 0)
    {
       // Error
       avformat_free_context(context);

       return 0;
    }

    // Obtain the video stream of the total set of streams
    for (unsigned int k = 0; k < context->nb_streams; ++k)
    {
       if (context->streams[k]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
           video_stream_index = k;
       context->streams[k]->codec->time_base.den = 90000;
    }

    pCodecCtx = context->streams[video_stream_index]->codec;
    pCodec = avcodec_find_decoder(pCodecCtx->codec_id);

    avcodec_open(pCodecCtx, pCodec);

    //allocate video frame
    AVFrame *pFrame = avcodec_alloc_frame();

    unsigned int nFrame = 0;

    while (av_read_frame(context, &packet) >= 0)

    [...]

    Thanks in advance,

    Dídac Pérez

  • lavf : introduce AVFMT_TS_NEGATIVE

    3 avril 2013, par Luca Barbato
    lavf : introduce AVFMT_TS_NEGATIVE
    

    Most formats do not support negative timestamps, shift them to avoid
    unexpected behaviour and a number of bad crashes.

    CC:libav-stable@libav.org

    Signed-off-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>

    • [DBH] libavformat/avformat.h
    • [DBH] libavformat/ffmenc.c
    • [DBH] libavformat/framecrcenc.c
    • [DBH] libavformat/md5enc.c
    • [DBH] libavformat/mux.c
    • [DBH] libavformat/oggenc.c
    • [DBH] tests/ref/lavf/asf
    • [DBH] tests/ref/lavf/mkv
    • [DBH] tests/ref/lavf/mpg
    • [DBH] tests/ref/lavf/ts
    • [DBH] tests/ref/seek/lavf-asf
    • [DBH] tests/ref/seek/lavf-mkv
    • [DBH] tests/ref/seek/lavf-mpg
    • [DBH] tests/ref/seek/lavf-ts