Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (30)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (7432)

  • avutil/log : check that len is within the buffer before reading it

    27 novembre 2013, par Michael Niedermayer
    avutil/log : check that len is within the buffer before reading it
    

    Fixes out of array read
    Fixes : asan_heap-oob_19d6979_6857_mmw_deadzy.ogg
    Found-by : Mateusz "j00ru" Jurczyk and Gynvael Coldwind
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavutil/log.c
  • Revision 1b556e1f9a : vp9_spatial_svc_encoder : Enable aq-mode for real-time mode. For real-time mode

    27 août 2015, par Marco

    Changed Paths :
     Modify /examples/vp9_spatial_svc_encoder.c



    vp9_spatial_svc_encoder : Enable aq-mode for real-time mode.

    For real-time mode (speeds >=5) enable aq-mode=3.

    Change-Id : Ib8b4ef7609bc30ac935742c8d27e8cd89933c6af

  • Why android video player that based on ffmpeg can't sync video' time and audio's time ?

    6 juillet 2021, par ZSpirytus

    Background

    &#xA;

    Recently, I use ffmpeg to write my first Android video player. But video channel's time is faster than audio channel's time about 2 3 times.

    &#xA;

    Question

    &#xA;

    Why android video player audio and video is out of sync ? Video is about faster than audio 2 3 times. Thanks for your reading and answers.

    &#xA;

    Code

    &#xA;

    In short, I use PacketDispatcher to read AVPacket from http hlv source :

    &#xA;

    void PacketDispatcher::RealDispatch() {&#xA;    while (GetStatus() != DISPATCHER_STOP) {&#xA;        ...&#xA;&#xA;        AVPacket *av_packet = av_packet_alloc();&#xA;        int ret = av_read_frame(av_format_context, av_packet);&#xA;&#xA;        // PacketDispatcher is who read the AVPacket from http hlv source &#xA;        // and dispatch to decoder by its stream index.&#xA;        decoder_map[av_packet->stream_index]->Push(av_packet);&#xA;    }&#xA;}&#xA;

    &#xA;

    And then, Decoder written by Producer-Consumer Pattern, Decoder maintain a queue that store all the AVPacket received from PacketDispatcher. The code like this :

    &#xA;

    // write to the queue&#xA;void BaseDecoder::Push(AVPacket *av_packet) {&#xA;    ...&#xA;    av_packet_queue.push(av_packet);&#xA;    ...&#xA;}&#xA;&#xA;// real decode logic&#xA;void BaseDecoder::RealDecode() {&#xA;    ...&#xA;    while (true) {&#xA;        // read frame from codec&#xA;        AVFrame *av_frame = av_frame_alloc();&#xA;        ret = avcodec_receive_frame(av_codec_ctx, av_frame);&#xA;&#xA;        void *decode_result = DecodeFrame(av_frame);&#xA;        // send to render&#xA;        m_render->Render(decode_result);&#xA;    }&#xA;}&#xA;

    &#xA;

    And then, I do rendering logic in Render. Render also written by Producer-Consumer Pattern, it maintain a queue that store AVFrame received from Decoder, the code like this :

    &#xA;

    // write AVFrame&#xA;void BaseRender::Render(void *frame_data) {&#xA;    ...&#xA;    frame_queue.push(frame_data);&#xA;    ...&#xA;}&#xA;&#xA;// render to surface or Open SL&#xA;void BaseRender::RealRender() {&#xA;    if (m_render_synchronizer &amp;&amp; m_render_synchronizer->Sync(frame_data)) {&#xA;        continue;&#xA;    }&#xA;}&#xA;

    &#xA;

    Finally, the synchronizer will decide to sleep time or drop video frame according to the frame pts, frame pts is :

    &#xA;

    frame_data->pts = av_frame->best_effort_timestamp * av_q2d(GetTimeBase());&#xA;

    &#xA;

    Also, video extra delay is :

    &#xA;

    frame_data->video_extra_delay = av_frame->repeat_pict * 1.0 / fps * 2.0;&#xA;

    &#xA;

    RenderSynchronizer code like this :

    &#xA;

    bool RenderSynchronizer::Sync(void *frame_data) {&#xA;    auto base_frame_data = static_cast<baseframedata>(frame_data);&#xA;    if (base_frame_data->media_type == AVMEDIA_TYPE_AUDIO) {&#xA;        audio_pts = pcm_data->pts;&#xA;        return false;&#xA;    } else if (base_frame_data->media_type == AVMEDIA_TYPE_VIDEO) {&#xA;        video_pts = rgba_data->pts;&#xA;        return ReceiveVideoFrame(static_cast<rgbadata>(frame_data));&#xA;    }&#xA;    return false;&#xA;}&#xA;&#xA;bool RenderSynchronizer::ReceiveVideoFrame(RGBAData *rgba_data) {&#xA;    if (audio_pts &lt;= 0 || video_pts &lt;= 0) {&#xA;        return false;&#xA;    }&#xA;&#xA;    double diff = video_pts - audio_pts;&#xA;    if (diff > 0) {&#xA;        if (diff > 1) {&#xA;            av_usleep((unsigned int) (rgba_data->extra_delay * 1000000.0));&#xA;        } else {&#xA;            av_usleep((unsigned int) ((diff &#x2B; rgba_data->extra_delay) * 1000000.0));&#xA;        }&#xA;        return false;&#xA;    } else if (diff &lt; 0) {&#xA;        LOGD(TAG, "drop video frame");&#xA;        return true;&#xA;    } else {&#xA;        return false;&#xA;    }&#xA;}&#xA;</rgbadata></baseframedata>

    &#xA;