Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (103)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

Sur d’autres sites (11187)

  • avformat/mpegtsenc : Preserve disposition in the absence of language

    3 avril 2021, par Andreas Rheinhardt
    avformat/mpegtsenc : Preserve disposition in the absence of language
    

    Implements ticket #9113.

    Reviewed-by : Marton Balint <cus@passwd.hu>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavformat/mpegtsenc.c
  • OpenCV reading from live camera creates a short video that moves quickly

    17 novembre 2022, par user19019404

    I am reading in a live vide stream from a CCTV camera. The camera is set to 5 fps, another is set to 25fps and another to 30fps. Irrespective of the FPS that the camera is set, I can record 5 minutes but end up with a 30 second recorded clip where everyone is running around the scene.

    &#xA;

    My code is the 'typical' read in video and write video code that you would find online such as (code below simplified for readability) :

    &#xA;

    import cv2&#xA;&#xA;video = cv2.VideoCapture(live RTSP address of camera)&#xA;&#xA;if (video.isOpened() == False):&#xA;    print("Error reading video file")&#xA;else:&#xA;    frame_width = video.get(cv2.CAP_PROP_FRAME_WIDTH)&#xA;    frame_height = video.get(cv2.CAP_PROP_FRAME_HEIGHT)&#xA;    frame_fps = video.get(cv2.CAP_PROP_FPS)&#xA;    size = (frame_width, frame_height)&#xA;    result = cv2.VideoWriter(&#x27;filename.avi&#x27;,cv2.VideoWriter_fourcc(*&#x27;MJPG&#x27;),frame_fps , size)&#xA;&#xA;    while(True):&#xA;        ret, frame = video.read()&#xA;        if ret == True:&#xA;            result.write(frame)&#xA;            cv2.imshow(&#x27;Frame&#x27;, frame)&#xA;        if cv2.waitKey(1) &amp; 0xFF == ord(&#x27;s&#x27;):&#xA;            break&#xA;        else:&#xA;            break&#xA;    video.release()&#xA;    result.release()&#xA;    cv2.destroyAllWindows()&#xA;print("The video was successfully saved with new fps")&#xA;

    &#xA;

    I have tried playing with the FPS by reading in the FPS from the live camera and using the same FPS in the video write, but all that results is a video that is a fraction of the real time and with people zooming around the scene. So watching a 5 minute smooth video results in a 20 second recorded video with everyone zooming around.

    &#xA;

    Is this something that I need to fix in the writing of the video or do I need a second pass with ffmpeg to readjust the video ?

    &#xA;

    Much appreciated

    &#xA;

    Update, corrected the code above and :&#xA;When printing the frames read and the frame written the numbers are the same, showing that each frame that is read is being written (so I am not losing frames along the way thereby writing half the amount of frames).

    &#xA;

  • My C++ software uses ffmpeg in streaming mode, but I want to decode the data as quickly as possible, how do I do that ?

    14 septembre 2022, par Alexis Wilke

    When I run ffmpeg in my command line to convert an m4a file to mp3, it says ×45 to ×55 for the speed at which is decodes the input data. In this case, the 45 minute audio file gets converter in 2 minutes.

    &#xA;

    When I run the same process through my C++ code, I stream the data. This is because my code accepts data coming from the network so often it will a little faster to do streaming (unfortunately, not with m4a data since the header is placed at the end of the file...)

    &#xA;

    However, there seems to be something in ffmpeg that makes it think that if I want to stream the data it needs to be done in realtime. In other words, the frames come through at a speed of ×1 instead of the possible average of ×50.

    &#xA;

    Is there a flag/setup that I need to turn ON or OFF so the streaming process goes ×50 or so ?

    &#xA;


    &#xA;

    I allocate the context like so :

    &#xA;

    size_t const avio_buffer_size(4096);&#xA;unsigned char * avio_buffer(reinterpret_cast<unsigned char="char">(av_malloc(avio_buffer_size)));&#xA;AVIOContext * context(avio_alloc_context(&#xA;                          avio_buffer&#xA;                        , avio_buffer_size&#xA;                        , 0             // write flag&#xA;                        , this          // opaque&#xA;                        , decoder_read_static&#xA;                        , nullptr       // write func.&#xA;                        , decoder_seek_static));&#xA;</unsigned>

    &#xA;

    To do the streaming, I use custom I/O in the context :

    &#xA;

    AVFormatContext * format_context(avformat_alloc_context());&#xA;format_context->pb = context;&#xA;format_context->flags |= AVFMT_FLAG_CUSTOM_IO;&#xA;avformat_open_input(&#xA;          &amp;format_context&#xA;        , "input"           // filename (unused)&#xA;        , nullptr           // input format&#xA;        , nullptr);         // options&#xA;

    &#xA;

    Next I get the audio stream index :

    &#xA;

    avformat_find_stream_info(format_context, nullptr);&#xA;AVCodec * decoder_codec(nullptr);&#xA;int const index(av_find_best_stream(&#xA;              format_context&#xA;            , AVMEDIA_TYPE_AUDIO&#xA;            , -1            // wanted stream number&#xA;            , -1            // related stream&#xA;            , &amp;decoder_codec&#xA;            , 0));          // flags&#xA;

    &#xA;

    That has the side effect of telling us which decoder to use :

    &#xA;

    AVCodecContext * decoder_context = avcodec_alloc_context3(decoder_codec);&#xA;avcodec_parameters_to_context(&#xA;          decoder_context&#xA;        , format_context->streams[index]->codecpar);&#xA;avcodec_open2(&#xA;              decoder_context&#xA;            , decoder_codec&#xA;            , nullptr);        // options&#xA;

    &#xA;

    And finally, I loop through the frames :

    &#xA;

    AVFrame *frame(av_frame_alloc());&#xA;AVPacket av_packet;&#xA;av_init_packet(&amp;av_packet);&#xA;for(;;)&#xA;{&#xA;    av_read_frame(format_context, &amp;av_packet);&#xA;    if(end-detected)&#xA;    {&#xA;        break;&#xA;    }&#xA;    if(av_packet.stream_index != index) continue;&#xA;    avcodec_send_packet(decoder_context, &amp;av_packet);&#xA;    for(;;)&#xA;    {&#xA;        avcodec_receive_frame(decoder_context, frame);&#xA;        if(end-detected)&#xA;        {&#xA;            break;&#xA;        }&#xA;        ...copy data from frame...&#xA;        av_frame_unref(frame);&#xA;    }&#xA;    av_packet_unref(&amp;av_packet);&#xA;}&#xA;

    &#xA;

    Note : I don't show all the error handling, use of RAII, etc. in an attempt to show the code in its simplest form.

    &#xA;