Recherche avancée

Médias (91)

Autres articles (40)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8146)

  • error while compiling simple c++ file with libavformat library

    21 février 2023, par Abdo Daood

    i create simple c++ file called test.cpp

    


    #include <iostream>&#xA;#include &#xA;using namespace std;&#xA;&#xA;int main() &#xA;{&#xA;    cout &lt;&lt; "Hello, World!";&#xA;    return 0;&#xA;}&#xA;&#xA;</iostream>

    &#xA;

    and using g++ in terminal to compile test.cpp file with the command :

    &#xA;

    &#xA;

    g++ test.cpp -o test

    &#xA;

    &#xA;

    i get this error =>

    &#xA;

    test.cpp:2:10: fatal error: libavformat\avformat.h: No such file or directory&#xA;    2 | #include &#xA;      |          ^~~~~~~~~~~~~~~~~~~~~~~~&#xA;compilation terminated.&#xA;

    &#xA;

    Notes :&#xA;libavformat\avformat.h path is : /usr/include/x86_64-linux-gnu/libavformat/avformat.h

    &#xA;

    and using ffmpeg version is :

    &#xA;

    $ ffmpeg -version

    &#xA;

    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)&#xA;configuration : —prefix=/usr —extra-version=0ubuntu0.22.04.1 —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —arch=amd64 —enable-gpl —disable-stripping —enable-gnutls —enable-ladspa —enable-libaom —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libcodec2 —enable-libdav1d —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libjack —enable-libmp3lame —enable-libmysofa —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librabbitmq —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libsrt —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx265 —enable-libxml2 —enable-libxvid —enable-libzimg —enable-libzmq —enable-libzvbi —enable-lv2 —enable-omx —enable-openal —enable-opencl —enable-opengl —enable-sdl2 —enable-pocketsphinx —enable-librsvg —enable-libmfx —enable-libdc1394 —enable-libdrm —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libx264 —enable-shared&#xA;libavutil 56. 70.100 / 56. 70.100&#xA;libavcodec 58.134.100 / 58.134.100&#xA;libavformat 58. 76.100 / 58. 76.100&#xA;libavdevice 58. 13.100 / 58. 13.100&#xA;libavfilter 7.110.100 / 7.110.100&#xA;libswscale 5. 9.100 / 5. 9.100&#xA;libswresample 3. 9.100 / 3. 9.100&#xA;libpostproc 55. 9.100 / 55. 9.100

    &#xA;

    using this command :

    &#xA;

    g&#x2B;&#x2B; `pkg-config --cflags libavformat` test.cpp  `pkg-config --libs libavformat` -o test&#xA;&#xA;

    &#xA;

  • Error : "libavformat\avformat.h : No such file or directory"

    21 février 2023, par Abdo Daood

    I create a simple c++ file called test.cpp :

    &#xA;

    #include <iostream>&#xA;#include &#xA;using namespace std;&#xA;&#xA;int main() &#xA;{&#xA;    cout &lt;&lt; "Hello, World!";&#xA;    return 0;&#xA;}&#xA;</iostream>

    &#xA;

    and using g++ in terminal to compile test.cpp file with the command :

    &#xA;

    g&#x2B;&#x2B; test.cpp -o test&#xA;

    &#xA;

    I get this error :

    &#xA;

    test.cpp:2:10: fatal error: libavformat\avformat.h: No such file or directory&#xA;    2 | #include &#xA;      |          ^~~~~~~~~~~~~~~~~~~~~~~~&#xA;compilation terminated.&#xA;

    &#xA;

    Notes :&#xA;libavformat\avformat.h path is : /usr/include/x86_64-linux-gnu/libavformat/avformat.h

    &#xA;

    and using ffmpeg version is :

    &#xA;

    $ ffmpeg -version&#xA;&#xA;ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)&#xA;configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;libavutil      56. 70.100 / 56. 70.100&#xA;libavcodec     58.134.100 / 58.134.100&#xA;libavformat    58. 76.100 / 58. 76.100&#xA;libavdevice    58. 13.100 / 58. 13.100&#xA;libavfilter     7.110.100 /  7.110.100&#xA;libswscale      5.  9.100 /  5.  9.100&#xA;libswresample   3.  9.100 /  3.  9.100&#xA;libpostproc    55.  9.100 / 55.  9.100&#xA;

    &#xA;

    Using this command :

    &#xA;

    g&#x2B;&#x2B; `pkg-config --cflags libavformat` test.cpp  `pkg-config --libs libavformat` -o test&#xA;

    &#xA;

  • av_read_frame and time stamps C++

    19 avril 2014, par halfwaythru

    I am recording an RTSP H264 stream from an Axis IP camera using libavformat. This camera is supposed to stamp every frame with the time that the frame was acquired, and this information is supposed to be in the RTP packet header.

    This is the code that I am using to read in the frames.

    AVFormatContext *inputFormatCtxt = NULL;
    avformat_open_input(&amp;inputFormatCtxt, inputURL, NULL, NULL)
    avformat_find_stream_info(inputFormatCtxt, NULL )

    while(av_read_frame(inputFormatCtxt, &amp;packet) >=0)
    {
       if(packet.stream_index == videoStreamIndex)
       {
          // Do something to video packet.
       }
       else
       {
          // Do something to audio packet.
       }

       if (packet.pts != AV_NOPTS_VALUE)
           packet.dts = packet.pts    = av_rescale_q(packet.pts, stream->time_base, oStream->time_base);
       else
           NSLog(@"packet.pts == AV_NOPTS_VALUE");

       if(av_interleaved_write_frame(outputFormatCtxt, &amp;packet) &lt; 0)
           NSLog(@"Could not write out frame.");

       av_free_packet(&amp;packet);
    }

    Now in AVPacket, the only time-related information is the pts and the dts. After converting them into seconds, these are supposed to be the offset of the packet (in seconds) from the start of the stream.

    My question is : How do I get the start time of the stream ?

    These are the many things that I have tried :

    1.) In AVFormatContext there is a variable start_time_realtime that is "supposed" to be the start time of the stream in real world time, in microseconds. This is exactly what I need. But no matter what I do, this value is always 0, and never changes. Am I missing a step in initialization that this never get set ?

    2.) Looking at this link, I added an RTPDemuxContext object to my code :

    RTSPState* rtsp_state = (RTSPState*) inputFormatCtxt->priv_data;
    RTSPStream* rtsp_stream = rtsp_state->rtsp_streams[0];
    RTPDemuxContext* rtp_demux_context = (RTPDemuxContext*) rtsp_stream->transport_priv;

    When I tried to look at the last_rtcp_reception_time, last_rtcp_ntp_time, last_rtcp_timestamp timestamps within the RTPDemuxContext object, these values are also 0 always, and dont change.

    3.) With the last point, I tried to force fetch a packet using ff_rtsp_fetch_packet(inputFormatCtxt, &amp;packet). This did update the RTPDemuxContext timestamps, but only while stepping through code. If I just ran the code in a loop, it always remained the same as whatever was in the RTDemuxContext object before the loop.

    int64_t x = 0;
    x = rtp_demux_context->last_rtcp_reception_time;   // x is 0.
    while(ff_rtsp_fetch_packet(inputFormatCtxt, &amp;packet))
    {
       x = rtp_demux_context->last_rtcp_reception_time;   // x changes only when stepping through code. else remains 0
    }

    At this point I have no idea what I am doing wrong. I cant seem to get this timestamp information, no matter what I try. Any help is much appreciated. Thanks !