Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (96)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (4312)

  • FFmpeg4 android Applying Overlay (watermark) taking too long

    13 janvier 2019, par Web Developer

    I’m using ffmpeg4 on android (Java) to apply overlay/watermark on the bottom left corner of the recorded video that is saved in the SD CARD.

    The video recording has maximum duration of 59 seconds. The problem that I’m facing is that I’m applying water through this command of ffmpeg4

    String[] complexCommand1 = new String[]"ffmpeg", "-y", "-i",
    "input.mp4", "-strict", "experimental", "-c:v", "libx264", "-preset",
    "ultrafast", "-vf", "movie=/water.png [watermark] ; [in][watermark] overlay=main_w-overlay_w-", "10:10", " [out]", "-s", "320x480", "-aspect",
    "2:3", "-r", "30", "-b:v", "500k",
    "output.mp4"
     ;

    I’ve reduced the video resolution to 320x480 after the conversion and 480p to recorded video that is provided as input to this command but still the processing time is around 40 seconds.

    Can someone provide me workaround this to reduce this processing time.

    or what should I do to reduce this processing time. I’ve researched a lot on this and found some GitHub issues link and tried their solutions but none of them seemed to work for me.

  • FPS from RTSP stream info does not match actual framerate

    17 mai 2021, par Krapow

    I have a 25FPS RTSP stream coming from an IP-camera. I can successfully display the video stream. But when analyzing the stream with ffmpeg (ffprobe actually), I observe fewer frames per second rate :

    


    $ ffprobe -rtsp_transport tcp -i rtsp://camera_ip:554/stream -select_streams v:0 -show_frames -show_entries frame=coded_picture_number,pkt_pts_time -of csv=p=0
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 640x480, 25 fps, 25 tbr, 90k tbn, 50 tbc
0.400000,0
0.080000,1
0.120000,2
0.200000,3
0.240000,4
0.320000,5
0.360000,6
0.440000,7
0.480000,8
0.560000,9
0.600000,10
0.680000,11
0.720000,12
0.800000,13
0.840000,14
0.920000,15
0.960000,16
1.040000,17
1.080000,18
1.160000,19
1.200000,20
1.280000,21
1.320000,22
1.400000,23
1.440000,24
1.520000,25
1.560000,26
1.640000,27
1.680000,28
1.760000,29
1.800000,30
1.880000,31
1.920000,32
2.000000,33


    


    We can clearly see the 80ms gap between some of the frames, resulting in a 16fps stream.

    


    I have observed the same framerate issue with GStreamer (printing information in the rtpjitterbuffer indicates the frame gap is sometimes 80ms and sometimes 40ms). But the weird thing is, I encountered the same issue with an HDMI-RJ45 decoder, and I doubt the same issue comes from 2 different devices.
I didn't get much more informations using -loglevel debug or trace.
Does anybody have an idea about what is going wrong in the stream ?

    


    (I used ffprobe 4.2.3 and the last "2021-05-09-git-8649f5dca6-full_build-www.gyan.dev" with the same results, and GStreamer 1.16.2 with a pipeline like "urisourcebin ! h264depay ! h264parse ! fakesink")

    


    EDIT : The camera skipping of frames was caused by the activation of a third stream in the options. I find it really weird that it skips exactly the same frames every seconds. However, I still haven't found the cause of the downrate on my RTSP encoder.
Anyway, this was actually hardware related and not software related.

    


  • Does this code contain a potential memory leak ?

    26 juillet 2017, par Johnnylin

    Here is the code :

    cv::Mat YV12ToBRG24_FFmpeg(unsigned char* pYUV, int width,int height)
    {
       if (width < 1 || height < 1 || pYUV == nullptr){
           return cv::Mat();
       }

       cv::Mat result(height,width,CV_8UC3, cv::Scalar::all(0));
       uchar* pBGR24 = result.data;

       AVFrame* pFrameYUV = av_frame_alloc();
       pFrameYUV->width = width;
       pFrameYUV->height = height;
       pFrameYUV->format = AV_PIX_FMT_YUV420P;
       av_image_fill_arrays(pFrameYUV->data, pFrameYUV->linesize, pYUV, AV_PIX_FMT_YUV420P, width, height, 1);

       //U,V exchange
       uint8_t * ptmp=pFrameYUV->data[1];
       pFrameYUV->data[1]=pFrameYUV->data[2];
       pFrameYUV->data[2]=ptmp;

       AVFrame* pFrameBGR = av_frame_alloc();
       pFrameBGR->width = width;
       pFrameBGR->height = height;
       pFrameBGR->format = AV_PIX_FMT_BGR24;
       av_image_fill_arrays(pFrameBGR->data, pFrameBGR->linesize, pBGR24, AV_PIX_FMT_BGR24, width, height, 1);

       struct SwsContext* imgCtx = nullptr;
       imgCtx = sws_getContext(width,height,AV_PIX_FMT_YUV420P,width,height,AV_PIX_FMT_BGR24,SWS_BILINEAR,0,0,0);
       if (imgCtx != nullptr){
           sws_scale(imgCtx,pFrameYUV->data,pFrameYUV->linesize,0,height,pFrameBGR->data,pFrameBGR->linesize);
           sws_freeContext(imgCtx);
           imgCtx = nullptr;
           ptmp = nullptr;
           pBGR24 = nullptr;
           av_frame_free(&pFrameYUV);
           av_frame_free(&pFrameBGR);
           return result;
       }
       else{
           sws_freeContext(imgCtx);
           imgCtx = nullptr;
           ptmp = nullptr;
           pBGR24 = nullptr;
           av_frame_free(&pFrameYUV);
           av_frame_free(&pFrameBGR);
           return cv::Mat();
       }
    }

    This function is called every 40 ms (25 fps) and I saw a significant memory increase after several days(like 12GB). But if I ran this code for hours, the memory leak problem would not be obvious enough to be observed.

    Can anyone help ?
    Thanks.