Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (69)

  • 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 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (6800)

  • how to resolve pixel jittering in javacv generated video

    16 septembre 2024, par Vikram

    I am trying to generate video using images, where image have some overlays text and png icons. I am using javacv library for this.
Final output video seems pixelated, i don't understand what is it since i do not have video processing domain knowledge, i am beginner to this.
I know that video bitrate and choice of video encoder are important factor which contributes to video quality and there are many more factors too.

    


    I am providing you two output for comparison, one of them is generated using javacv and another one is from moviepy library

    


    Please watch it in full screen since the problem i am talking about only gets highlighted in full screen, you will see the pixel dancing in javacv generated video, but python output seems stable

    


    https://imgur.com/a/aowNnKg - javacv generated

    


    https://imgur.com/a/eiLXrbk - Moviepy generated

    


    I am using same encoder in both of the implementation

    


    Encoder - libx264
bitrate - 
   800 Kbps for javacv 
   500 Kbps for moviepy

frame rate - 24fps for both of them

output video size -> 
    7MB (javacv)
    5MB (Moviepy)




    


    generated output size from javacv is bigger then moviepy generated video.

    


    here is my java configuration for FFmpegFrameRecorder

    


            FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(this.outputPath, 
                                           this.screensizeX, this.screensizeY);
        if(this.videoCodecName!=null && "libx264".equals(this.videoCodecName)) {
            recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
        }
        recorder.setFormat("mp4"); 
        recorder.setPixelFormat(avutil.AV_PIX_FMT_YUV420);
        recorder.setVideoBitrate(800000);
        recorder.setImageWidth(this.screensizeX);
        recorder.setFrameRate(24);



    


    and here is python configuration for writing video file

    


    Full_final_clip.write_videofile(
                            f"{video_folder_path}/{FILE_ID}_INTERMEDIATE.mp4",
                            codec="libx264",
                            audio_codec="aac",
                            temp_audiofile=f"{FILE_ID}_INTER_temp-audio.m4a",
                            remove_temp=True,
                            fps=24,
                        )



    


    as you can see i am not specifying bitrate in python, but i checked that bitrate of final output is around 500 kbps, which is lower then what i specified in java, yet java generated video quality seems poor.

    


    I have tried setting crf value also , but it seems it does not have any impact when used.

    


    increasing bitrate improve quality somewhat but at the cost of file size, still generated output seems pixelated.

    


    Can someone please highlight what might be the issue, and how python is generating better quality video, when both of the libraries use ffmpeg at the backend.

    


    Edit 1 : also, I am adding code which is being used to make zoom animation for continuous frames, As somewhere i read that this might be the cause for pixel jitter, please see and let me know if there is any improvement we can do to remove pixel jittering

    


    private Mat applyZoomEffect(Mat frame, int currentFrame, long effectFrames, int width, int height, String mode, String position, double speed) {
        long totalFrames = effectFrames;
        double i = currentFrame;
        if ("out".equals(mode)) {
            i = totalFrames - i;
        }
        double zoom = 1 + (i * ((0.1 * speed) / totalFrames));

        double originalCenterX = width/2.0;
        double originalCenterY = height/2.0;
   

        // Resize image
        //opencv_imgproc.resize(frame, resizedMat, new Size(newWidth, newHeight));

        // Determine crop region based on position
        double x = 0, y = 0;
        switch (position.toLowerCase()) {
            case "center":
                // Adjusting for center zoom
                 x = originalCenterX - originalCenterX * zoom;
                 y = originalCenterY - originalCenterY * zoom;
                 
                 x= (width-(width*zoom))/2.0;
                 y= (height-(height*zoom))/2.0;
                break;
        }

        double[][] rowData = {{zoom, 0, x},{0,zoom,y}};

        double[] flatData = flattenArray(rowData);

        // Create a DoublePointer from the flattened array
        DoublePointer doublePointer = new DoublePointer(flatData);

        // Create a Mat object with two rows and three columns
        Mat mat = new Mat(2, 3, org.bytedeco.opencv.global.opencv_core.CV_64F); // CV_64F is for double type

        // Put the data into the Mat object
        mat.data().put(doublePointer);
        Mat transformedFrame = new Mat();
        opencv_imgproc.warpAffine(frame, transformedFrame, mat, new Size(frame.cols(), frame.rows()),opencv_imgproc.INTER_LANCZOS4,0,new Scalar(0,0,0,0));
        return transformedFrame;
    }


    


  • ffmpeg RTSP error while decoding MB

    2 mai 2018, par Hugh W

    I’m using ffmpeg to read an h264 RTSP stream from a Cisco 3050 IP camera and reencode it to disk as h264 (there are reasons why I’m not just using -codec:copy).

    The ffmpeg version is as follows :

    ffmpeg version 3.2.6 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (Alpine 6.3.0)

    I’ve also tried with ffmpeg 2.8.14-0ubuntu0.16.04.1 and the latest ffmpeg built from source (I used this commit) and see the same behaviour as below.

    The command I’m running is :

    ffmpeg -rtsp_transport udp -i 'rtsp://<user>:<pw>@<ip>:554/StreamingSetting?version=1.0&amp;action=getRTSPStream&amp;ChannelID=1&amp;ChannelName=Channel1' -r 10 -c:v h264 -crf 23 -x264-params keyint=60:min-keyint=60 -an -f ssegment -segment_time 60 -strftime 1 /output/%Y%m%d_%H%M%S.ts -abort_on empty_output
    </ip></pw></user>

    I get a variety of errors at a fairly steady rate of at least one per second. Here’s a sample :

    [rtsp @ 0x7f268c5e9220] max delay reached. need to consume packet
    [rtsp @ 0x7f268c5e9220] RTP: missed 40 packets
    [h264 @ 0x55b1e115d400] left block unavailable for requested intra mode
    [h264 @ 0x55b1e115d400] error while decoding MB 0 12, bytestream 114567
    [h264 @ 0x55b1e115d400] concealing 3889 DC, 3889 AC, 3889 MV errors in I frame

    The most common one is ’error while decoding MB x x, bytestream x’. This corresponds to severe corruption in the video file when played back.

    I see many references to that error message on stackoverflow and elsewhere, but I’ve yet to find a satisfying explanation or workaround. It comes from this line which appears to correspond to missing data at the end of the stream. ’left block unavailable’ comes from here and also looks like missing data.

    Others have suggested using -rtsp_transport tcp instead (1, 2, 3) which in my case just gives a slightly different mix of errors, and still video corruption :

    [h264 @ 0x557923191b00] left block unavailable for requested intra4x4 mode -1
    [h264 @ 0x557923191b00] error while decoding MB 0 28, bytestream 31068
    [h264 @ 0x557923191b00] concealing 2609 DC, 2609 AC, 2609 MV errors in I frame
    [rtsp @ 0x7f88e817b220] CSeq 5 expected, 0 received.

    Using Wireshark I confirmed that in both UDP and TCP mode, all of the packets are making it from the camera to the PC (sequential RTP sequence numbers without any missing) which makes me think the data is being lost after it arrives at ffmpeg.

    I also see similar behaviour when running the same command against a Panasonic WV-SFV110 camera, but with less frequent errors overall. Switching from UDP to TCP on the Panasonic camera reduces but does not completely eliminate the errors/corruption.

    I also tried a similar command with VLC and got similar errors (cvlc rtsp://<user>:<pw>@<ip>/MediaInput/h264 :sout='#transcode{vcodec=h264}:std{access=file, mux=ts, dst="output.ts"}</ip></pw></user>) — presumably the code hasn’t diverged much since libav forked from ffmpeg.

    The camera is plugged directly into a PoE port on the PC so network congestion can’t be a problem. Given that the PC has enough CPU to keep up encoding the live stream, it seems to me a problem with ffmpeg that it still drops data from the TCP stream.

    Qualitatively, there are several factors which seem to make the problem worse :

    • Higher video resolution
    • Higher system load on the machine running ffmpeg (e.g. transcoding to a low res .avi file produces fewer errors than transcoding to h264 VBR ; using -codec:copy eliminates all errors except a couple while ffmpeg is starting up)
    • Greater motion within the camera view

    What the does the error mean ? And what can I do about it ?

  • Switch to Matomo for WordPress from Google Analytics

    10 mars 2020, par Joselyn Khor — Plugins, Privacy

    While Google Analytics may seem like a great plugin option on the WordPress directory, we’d like to present a new ethical alternative called Matomo for WordPress, which gives you 100% data ownership and privacy protection.

    Firstly what does Google Analytics offer in WordPress ?

    When you think of getting insights about visitors on your WordPress (WP) sites, the first thing that comes to mind might be Google Analytics. Why not right ? Especially when there are good free Google Analytics plugins, like Monster Insights and Site Kit. 

    These give you access to a great analytics platform, but the downside with Google Analytics is the lack of transparency around privacy and data ownership.

    Google Analytics alternative

    Matomo Analytics for WordPress is an ethical alternative to Google Analytics for WordPress

    If you’re more interested in a privacy-respecting, GDPR compliant alternative, there’s now a new option on the WP plugins directory : Matomo Analytics – Ethical Stats. Powerful Insights. 

    It’s free and can be considered the #1 ethical alternative to Google Analytics in terms of features and capabilities. Why is it important to choose a web analytics platform that respects privacy ?

    Matomo Analytics for WordPress

    Risk facing fines for non-GDPR compliance and privacy/data breaches

    In Europe there’s an overarching privacy law called GDPR which provides better privacy protection for EU citizens on the web. 

    Websites need to be GDPR compliant and follow rules governing how personal data is used or risk facing fines up to 4% of their yearly revenue for data/privacy breaches or non-compliance. Even if your website is based outside of Europe. If you have visitors from Europe, you can still be liable.

    Matomo Analytics GDPR Google Analytics

    In the US, there isn’t one main privacy law, there hundreds on both the federal and state levels to protect the personal data (or personally identifiable information) of US residents – like the California Consumer Privacy Act (CCPA). There are also industry-specific statutes related to data privacy like HIPAA.

    To protect your website from coming under fire for privacy breaches, best practise is to find platforms that are privacy and GDPR compliant by design. 

    When you own your own data – as with the case of Matomo – you have control over where data is stored, what you’re doing with it, and can better protect the privacy of your visitors.

    At this point you may be asking, “what’s the point of an analytics platform if you have to follow all these rules ?”

    The importance of analytics for your WordPress site

    • Figuring out how your audience behaves to increase conversions
    • Setting, tracking and measuring conversion goals
    • Being able to find insights to improve and optimize your site 
    • Making smarter, data-driven decisions so your company can thrive, rather than risk being left behind

    Analytics is used to answer questions like :

    • Where are your website visitors coming from (location) ?
    • How many people visit your website ?
    • Which are the most popular pages on your site ?
    • What sources of traffic are coming to your site (social, marketing campaigns, search) ?
    • Is your marketing campaign performing better this month compared to last ?

    Matomo can answer all of the above questions. BONUS : On top of that, with Matomo you get the peace of mind knowing you’re the only one who has access to those answers.

    Web analytics for WordPress

    Matomo Analytics vs Google Analytics on WordPress

    The top 5 most useful features in Matomo Analytics that’s comparable to GA

    1. Campaign measurement – traffic. Matomo also has a URL builder that lets you track which campaigns are working effectively
    2. Tracking goals. Matomo empowers you to set goals you can track. Being able to see this means you can accurately measure your return on investment (ROI) 
    3. Audience reports to learn about visitors. Matomo’s powerful visitors feature lets you learn who is visiting your site, what their journey is and the steps they take to conversion.
    4. In depth view of behaviour with Funnels in Matomo. This tracks the journey of your visitors from the moment they enter your site, to when they leave. Giving you insight into where and why you lose your visitors.
    5. Custom reports. Where you create your unique reports to fit your business goals.

    Other benefits of using Matomo :

    • No data sampling which means you get 100% accurate reporting
    • 100% data ownership
    • Free Tag Manager
    • Search engine keyword rankings
    • Unlimited websites
    • Unlimited team members
    • GDPR manager
    • API access
    • Hosted on your own servers so you have full control over where your data is stored

    Learn more about the differences in this comprehensive table.

    Benefits of web analytics for WordPress

    Matomo Analytics for WordPress is free !

    Matomo Analytics is the best free Google Analytics alternative on the WordPress Directory. In addition to having comparable features where you can do pretty much do everything you wanted to do in GA. Matomo Analytics for WordPress makes for an ethical choice because you can respect your visitor’s privacy, can become GDPR compliant, and maintain control over your own data.

    Google Analytics leads the market for good reasons. It’s a great free tool for those who want analytics, but there’s no clarity when it comes to grey areas like privacy and data ownership. If these are major concerns for you, Matomo offers complete peace of mind that you’re doing the best you can to stay ethical while growing your business and website.

    It’s just as easy to install in a few click !