Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (93)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (10765)

  • Ffmpeg conversion from RTSP to RTMP stops transmitting video in a Odroid C4 device

    14 mars 2023, par JuanN

    We hace a video camera (transmitting using RTSP) connected to an Odroid C4. We want to send the streaming to a OvenMediaEngine using RTMP. For us to achieve this goal, we run this command :

    &#xA;

    ffmpeg -rtsp_transport tcp -nostdin -i "rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub" -threads 1 -cod&#xA;ec copy -f flv -flvflags no_duration_filesize -an "rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx"&#xA;

    &#xA;

    Apparently the transmition is fine but, after a while (this "while" ranges from a few hours to a few days) the ffmpeg command stops working, with the following message [rtsp @ 0x55a46347b0] CSeq 3005 expected :

    &#xA;

    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, rtsp, from &#x27;rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub&#x27;:&#xA;  Metadata:&#xA;    title           : Session streamed by "preview"&#xA;    comment         : h264Preview_01_sub&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x360, 25 tbr, 90k tbn, 180k tbc&#xA;    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp&#xA;Output #0, flv, to &#x27;rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx&#x27;:&#xA;  Metadata:&#xA;    title           : Session streamed by "preview"&#xA;    comment         : h264Preview_01_sub&#xA;    encoder         : Lavf58.29.100&#xA;    Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 640x360, q=2-31, 25 tbr, 1k tbn, 90k tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;[flv @ 0x55a463c220] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;[rtsp @ 0x55a46347b0] CSeq 3005 expected, 0 received.1:25.81 bitrate= 207.3kbits/s speed=   1x&#xA;    Last message repeated 1 times&#xA;

    &#xA;

    We thought at first this was due to the limitation of ffmpeg when it is run on background (that's the reason for the nostdin option), but it keeps on failing. Looking online, we also found that it could be some issue of the file size (hence the no_duration_filesize option).

    &#xA;

    The weird part is the process is still running (if you check it using a top or ps command) when it fails, but it has to be rebooted to resume the transmision.

    &#xA;

    Any clues will be most welcome !&#xA;Thank you.

    &#xA;

  • Debugging in Visual Studio without Pdb files (C++ Access Voilation)

    2 décembre 2016, par Prakash M

    I built OpenCV binaries(.dll) using Cmake & visual studio which generated .pdb file which helped me to find the issue in code (Partially !)

    How this Crash is being caused. .
    I’m using a software with which we can set internet download speed limit (transfer rate) for any particular program.

    Now if i connect IP camera to the code below, i noticed that my app needs around 100Kb/s of internet usage (transfer rate) - only then i can watch live stream seamlessly.
    Lets say i cut down (set) my application internet usage to 10Kb/s [This is the reason behind crash]
    in this case, i should be able to see a new frame once in 4+ seconds.

    I’m getting access violation error probably because (cap>>img;) cap is trying to reach a location in ram & get the frame but there is no frame YET because its still being downloaded due to low internet speed.
    Clearly the pointer is reaching some location in ram to grab a frame which is not yet present.

    Some interesting behaviour . . .

    Void OpenCamera()
    {
       VideoCapture cap("http://192.168.1.3:8080/video?x.xmjpeg");
       Mat img;
       while(true)
       {
         try
         {
           if(cap.isOpened()) //also tried grab + retrieve, crashes at grab
           cap>>img; //code crashes here
         }
         catch(...)
         {
           cout&lt;&lt;"Camera Disconnected"&lt;code>

    If i use the entire code in same class (within same header file), there is no problem at all(new frame is displayed after 4+ seconds without crashing the program) but if i put the code into a separate class(different header file), then call the function to open camera from a class object, then it crashes if internet speed is cut down.
    weird behavior - if i debug step by step, it never crashes !

    when i build opencv library with ffmpeg , i get .pdb file only for opencv (opencv_world310.pdb)- so no issue debugging using call stack
    but i do not get pdb for ffmpeg (because Opencv_ffmpeg.dll is precompiled and that is where its crashing)

    hence its getting hard to debug, building ffmpeg doesn’t produce pdb file cause its built using MSYS
    so is it possible to debug with what we have ?

    I’m including snapshot from visual studio debugging,
    some of the variables that will help in understanding :

    typedef int (*CvGrabFrame_Plugin)( void* capture_handle );      [cap_ffmpeg_api.cpp]
    protected: void* ffmpegCapture;                                 [cap_ffmpeg.cpp]
    static CvGrabFrame_Plugin icvGrabFrame_FFMPEG_p = 0;            [cap_ffmpeg.cpp]

    enter image description here

    Exception thrown at 0x0A0AF6F0 (opencv_ffmpeg310.dll) in Sample.exe :
    0xC0000005 : Access violation reading location 0x00000020. If there is
    a handler for this exception, the program may be safely continued.

    in source code i included below line & compiled & used it in project - didn’t work, crashed again !
    if(ffmpegCapture) - null pointer check

    can we make some changes at line 214 in [cap_ffmpeg.cpp] to avoid crash ?
    other header files are just one folder up.

    Update : I noticed that program crashes immediately when i limit internet consumption speed. I’m using C++/Cli(winforms, target dot net Framework = 4.6), i have CameraClass (in separate header file) & main function in (separate header file)
    Main function has below code

    CameraClass ^CC = gcnew CameraClass();
    CC->OpenCamera();

    Some clash between .net memory handling & C++ memory handling ?

  • Ffmpeg decoder yuv420p

    4 décembre 2015, par user2466514

    I work on a video player yuv420p with ffmpeg but it’s not working and i can’t find out why. I spend the whole week on it...

    So i have a test which just decode some frame and read it, but the output always differ, and it’s really weird.

    I use a video (mp4 yuv420p) which color one black pixel in more each frame :

    For the video, put http://sendvid.com/b1sgf8r1 on a website like http://www.telechargerunevideo.com/en/

    VideoContext is just a little struct :

    struct  VideoContext {

    unsigned int      currentFrame;
    std::size_t       size;
    int               width;
    int               height;
    bool              pause;
    AVFormatContext*  formatCtx;
    AVCodecContext*   codecCtxOrig;
    AVCodecContext*   codecCtx;
    int               streamIndex;
    };

    So i have a function to count the number of black pixels :

    std::size_t  checkFrameNb(const AVFrame* frame) {

       std::size_t  nb = 0;

       for (int y = 0; y &lt; frame->height; ++y) {
         for (int x = 0 ; x &lt; frame->width; ++x) {

           if (frame->data[0][(y * frame->linesize[0]) + x] == BLACK_FRAME.y
               &amp;&amp; frame->data[1][(y / 2 * frame->linesize[1]) + x / 2] == BLACK_FRAME.u
               &amp;&amp; frame->data[2][(y / 2 * frame->linesize[2]) + x / 2] == BLACK_FRAME.v)
             ++nb;
         }
       }
       return nb;
     }

    And this is how i decode one frame :

    const AVFrame*  VideoDecoder::nextFrame(entities::VideoContext&amp; context) {

     int frameFinished;
     AVPacket packet;

     // Allocate video frame
     AVFrame*  frame = av_frame_alloc();
     if(frame == nullptr)
       throw;

     // Initialize frame->linesize
     avpicture_fill((AVPicture*)frame, nullptr, AV_PIX_FMT_YUV420P, context.width, context.height);

     while(av_read_frame(context.formatCtx, &amp;packet) >= 0) {

       // Is this a packet from the video stream?
       if(packet.stream_index == context.streamIndex) {
         // Decode video frame
         avcodec_decode_video2(context.codecCtx, frame, &amp;frameFinished, &amp;packet);

         // Did we get a video frame?
         if(frameFinished) {

           // Free the packet that was allocated by av_read_frame
           av_free_packet(&amp;packet);
           ++context.currentFrame;
           return frame;
         }
       }
     }

     // Free the packet that was allocated by av_read_frame
     av_free_packet(&amp;packet);
     throw core::GlobalException("nextFrame", "Frame decode failed");
    }

    There is already something wrong ?

    Maybe the context initialization will be useful :

    entities::VideoContext  VideoLoader::loadVideoContext(const char* file,
                                                         const int width,
                                                         const int height) {

     entities::VideoContext  context;

     // Register all formats and codecs
     av_register_all();

     context.formatCtx = avformat_alloc_context();


     // Open video file
     if(avformat_open_input(&amp;context.formatCtx, file, nullptr, 0) != 0)
       throw; // Couldn't open file

     // Retrieve stream information
     if(avformat_find_stream_info(context.formatCtx, nullptr) > 0)
       throw; // Couldn't find stream information

     // Dump information about file onto standard error
     //av_dump_format(m_formatCtx, 0, file, 1);


     // Find the first video stream because we don't need more
     for(unsigned int i = 0; i &lt; context.formatCtx->nb_streams; ++i)
       if(context.formatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         context.streamIndex = i;
         context.codecCtx = context.formatCtx->streams[i]->codec;
         break;
       }
     if(context.codecCtx == nullptr)
       throw; // Didn't find a video stream


     // Find the decoder for the video stream
     AVCodec*  codec = avcodec_find_decoder(context.codecCtx->codec_id);
     if(codec == nullptr)
       throw; // Codec not found
     // Copy context
     if ((context.codecCtxOrig = avcodec_alloc_context3(codec)) == nullptr)
       throw;
     if(avcodec_copy_context(context.codecCtxOrig, context.codecCtx) != 0)
       throw; // Error copying codec context
     // Open codec
     if(avcodec_open2(context.codecCtx, codec, nullptr) &lt; 0)
       throw; // Could not open codec

     context.currentFrame = 0;
     decoder::VideoDecoder::setVideoSize(context);
     context.pause = false;
     context.width = width;
     context.height = height;

     return std::move(context);
    }

    I know it’s not a little piece of code, if you have any idea too make an exemple more brief, go on.

    And if someone have an idea about this issue, there is my output :

    9 - 10 - 12 - 4 - 10 - 14 - 11 - 8 - 9 - 10

    But i want :

    1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10

    PS :
    get fps and video size are copy paste code of opencv