Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (13360)

  • What is the right way to clean memory in ffmpeg ?

    27 mars 2018, par hagor

    Hi i have a class with these fields :

    bool m_initializedAndRegistered = false;
       std::atomic <bool> m_recievingFrames = false;
       int m_init_frames = 10000;
       int m_capacity = 10;
       std::thread readingThread;
       std::string m_streamAdress;
       SwsContext *m_img_convert_ctx_ptr = NULL;
       AVFormatContext *m_format_ctx_ptr = NULL;
       AVFormatContext *m_output_ctx_ptr = NULL;
       AVCodecContext *m_codec_ctx_ptr= NULL;// = NULL;
       AVPacket m_packet;
       AVStream *m_stream_ptr = NULL;
       AVCodec *m_codec_ptr = NULL;
       AVFrame *m_picture_ptr = NULL;
       AVFrame *m_picture_rgb_ptr = NULL;
       int m_video_stream_index = -1;
       uint8_t *m_picture_buffer_ptr = NULL;
       uint8_t *m_picture_buffer_2_ptr = NULL;
       circ_buffer m_imageBuffer;
    </bool>

    is it a correct way to clean all memory or do I forget to clean something ?
    It seems that I have 0.2 MB memory leak when I do this :

    m_recievingFrames = false;
    readingThread.join();
    readingThread.~thread();

    while (m_imageBuffer.size() > 0)
    {
       m_imageBuffer.receive().release();
    }
    av_packet_unref(&amp;m_packet);

    av_frame_free(&amp;m_picture_ptr);

    av_frame_free(&amp;m_picture_rgb_ptr);

    av_read_pause(m_format_ctx_ptr);
    avio_close(m_output_ctx_ptr->pb);
    avio_close(m_format_ctx_ptr->pb);

    avformat_close_input(&amp;m_format_ctx_ptr);
    avformat_close_input(&amp;m_output_ctx_ptr);
    avformat_free_context(m_output_ctx_ptr);
    avformat_free_context(m_format_ctx_ptr);

    m_video_stream_index = -1;
    av_free(m_picture_buffer_ptr);
    av_free(m_picture_buffer_2_ptr);

    avcodec_free_context(&amp;m_codec_ctx_ptr);

    av_free(m_stream_ptr);
    sws_freeContext(m_img_convert_ctx_ptr);

    I used malloc in m_picture_buffer_ptr allocation, but I cant free() it, because I get a heap exception. Do I need manually clean all Info for streams as it is suggested here ?

    My work is based on this old ffmpeg streamer.
    I don’t do av_register_all() and avformat_network_init() on every streamer restart.
    What is a good way (tool) to find memory leaks ?

  • Android FFMPEG Build with librtmp

    20 décembre 2013, par Dan Turner

    I have been pulling my hair out trying to compile FFMPEG for Android with librtmp enabled. I have successfully built FFMPEG using the Guardian Project here, but it doesn't have librtmp support. The only answer I have found to this issue is on a previous Stack Overflow question (HERE), but it doesn't want to work for me.

    At the moment, I have the cross-compiled librtmp.so.0 file from the official rtmpdump android build in an rtmpdump/librtmp folder sitting in the android-ffmpeg folder. An extract from my configure_ffmpeg.sh file reads as follows :

    ./configure \
    $DEBUG_FLAG \
    --arch=arm \
    --cpu=cortex-a8 \
    --target-os=linux \
    --enable-runtime-cpudetect \
    --prefix=$prefix \
    --enable-pic \
    --disable-shared \
    --enable-static \
    --cross-prefix=$NDK_TOOLCHAIN_BASE/bin/$NDK_ABI-linux-androideabi- \
    --sysroot="$NDK_SYSROOT" \
    --extra-cflags="-I../x264 -mfloat-abi=softfp -mfpu=neon" \
    --extra-ldflags="-L../x264" \
    --extra-cflags="-I/home/dan/android-ffmpeg/rtmpdump" \
    --extra-ldflags="-L/home/dan/android-ffmpeg/rtmpdump -lrtmp"
    \

    --enable-version3 \
    --enable-gpl \
    \
    --disable-doc \
    --enable-yasm \
    \
    --enable-decoders \
    --enable-encoders \
    --enable-muxers \
    --enable-demuxers \
    --enable-parsers \
    --enable-protocols \
    --enable-filters \
    --enable-avresample \
    --enable-libfreetype \
    \
    --disable-indevs \
    --enable-indev=lavfi \
    --disable-outdevs \
    \
    --enable-hwaccels \
    \
    --enable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --enable-ffserver \
    --enable-network \
    \
    --enable-libx264 \
    --enable-zlib \
    --enable-librtmp \

    When I try to compile this, it eventually displays an error and my FFMPEG config.log file tells me that it can't find -lrtmp. I'm positive I'm directing it to the right directory... does anyone have any ideas ?

    Regards

    Dan

  • Why motion vector extracted from b frames are unchange ?

    19 août 2019, par 霍宇琦

    I am writing c codes to extract motion vectors from b frame in MPEG4(Part2) compressed video format. But some motion vector seems wrong.

    I use a raw video clips, using the extract_mvs.c from ffmpeg 4.2. For example if the frame seq is IPBPPBPP.... i can get all the side data for all frame. But when inspecting the mv->src_x, mv->src_y, mv->dst_x, mv->dst_y i find that all the srcs are equal to dsts for some individual frames, there must be sth wrong in it, but i change little from the official code.

    //modify from ffmpeg/doc/example/extract_mvs.c:

    while(getting frames one by one) {
       AVFrameSideData *sd;
       video_frame_count++;

       //printf("%d", video_frame_count);
       if(video_frame_count &lt; 19){
           if (frame->pict_type == AV_PICTURE_TYPE_I ) printf("\nI");
           if (frame->pict_type == AV_PICTURE_TYPE_B ) printf("B");
           if (frame->pict_type == AV_PICTURE_TYPE_P ) printf("P");

           sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);
           if (sd) {
               const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
               for (i = 0; i &lt; sd->size / sizeof(*mvs); i++) {
                   const AVMotionVector *mv = &amp;mvs[i];
                   if (mv->dst_x - mv->src_x != 0 || mv->dst_y - mv->src_y != 0) {
                   printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
                       video_frame_count, mv->source,
                       mv->w, mv->h, mv->src_x, mv->src_y,
                       mv->dst_x, mv->dst_y, mv->flags);
                       break;
                   }
               }
           }
           av_frame_unref(frame);
       }
    }

    Outputs are :

    Input #0, avi, from 'origin.avi':
     Duration: 00:00:13.63, start: 0.000000, bitrate: 492 kb/s
       Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 486 kb/s, 30 fps, 30 tbr, 30 tbn, 30k tbc
       Metadata:
         title           : H:\HumanActionDB\MotionClips\hmdb51_30fps_wBrd_10off_divx\brush_??
    framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags

    [mpeg4 @ 0x55739dc29580] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.
    IP2,-1,16,16, 137,  24, 136,  24,0x0
    BP4,-1,16,16, 152,  57, 152,  56,0x0
    P5,-1,16,16,  56, 155,  56, 152,0x0
    BP7,-1,16,16, 151,  40, 152,  40,0x0
    PB9,-1,16,16, 151,  40, 152,  40,0x0
    P10,-1,16,16, 152,  39, 152,  40,0x0
    P11,-1,16,16,  26,  55,  24,  56,0x0
    B12,-1,16,16, 152,  39, 152,  40,0x0
    P13,-1,16,16, 152,  39, 152,  40,0x0
    P14,-1,16,16,  41, 168,  40, 168,0x0
    B15,-1,16,16, 152,  39, 152,  40,0x0
    P16,-1,16,16, 153,  39, 152,  40,0x0
    PB18,-1,16,16, 168,  55, 168,  56,0x0

    you can see that the third frame(B) and the sixth, eighth frame(B, P) and the 17th frame (P) can be read, and the data can be extract from them, but

    mv->dst_x == mv->src_x &amp;&amp; mv->dst_y - mv->src_y

    Can someone help me ? Thanks.