Recherche avancée

Médias (91)

Autres articles (111)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (9359)

  • Mixing two live streams like picture in picture from 2 obs using FFmpeg

    4 septembre 2020, par Argu

    I am trying to get live streams from 2 OBS and do picture in picture using FFMPEG. But I am getting error as : ' Cannot open connection tcp ://127.0.0.1:1935 ?listen&listen_timeout=-1000
rtmp ://127.0.0.1:1935/obs/test : Immediate exit requested'. I think this is because of IP adresses. Can someone help me with guiding me to what IP's to add and also with the overlay command.

    


  • How to increase conversions to meet your business goals

    8 septembre 2020, par Joselyn Khor — Analytics Tips, Marketing

     Through optimizing your messaging, content, or your page layouts, you can increase conversions by getting your visitors through a clear pathway to achieve your business goals.

    Conversion Rate Optimization

    When we talk about optimizing websites to improve and increase conversions, we’re really talking about conversion rate optimization (CRO).

    CRO is the process of learning what the most valuable content/aspect of your website is and how to best optimize this for your visitors to increase its chance to convert. It typically involves generating ideas for elements on your site or app that can be improved, learning which pathways visitors are most likely going to take to conversion and then validating those assumptions through A/B testing and multivariate testing to transform learning into actionable insights.

    Conversion Rate

    The conversion rate is expressed as a % and the goal for any business should be to increase the % of conversions for any given goal e.g. in February a website had 200 newsletter sign-ups from 1,000 visitors on its sign-up page, a conversion rate of 20%. CRO should be used to increase the sign-up rate from 20% to 25%, and then eventually from 25% to 30% and so on.

    CRO cheat sheet

    You need to consider your website or business’ objectives (bigger picture) as well as your website goals (smaller achievements). Whatever the aim of your website, it’s crucial for this to be your starting point. Figure out what you want your website to do and what you want visitors to get from it. When you do that, you’ll know what conversions to focus on.
    • Define your business/website’s objectives. Do you want the website to drive sales ? Is the website a hub to raise awareness for a charity ? Do you want to increase readership for your news site ?
    • Define what your conversion goals are. This helps you narrow your focus so you follow a path to meet your overall objectives. By defining these, you clarify for yourself the next actions you should take, such as wanting to funnel users through to a sign up landing page. Then you’ll need to optimize and test your sign up landing page. If conversions are low, then tweak it and measure the results until you find you’ve increased conversion rates.
    • Conversion goals can include :
      • Purchases in your ecommerce store
      • eBook downloads
      • Sign ups to your mailing list
      • Visitors successfully filling in a contact form
    • Figure out what your Key Performance Indicators (KPIs) are and the metrics you need to focus on to achieve them.

    1. Set goals

    “Make Sure Goals Are Clearly Understood. To prove the value of an analytics-focused company, any project you take on needs to have clear goals. If you don’t have a goal in mind you’ll fail. Everyone involved in the project needs to be aligned around the goals.”

    - Lean Analytics : Use Data to Build a Better Startup Faster

    A goal is the measure of a successful action that you want your visitors to take. The more goals you track, the more you can learn about behavioural changes as you implement and modify paths that lead to conversions over time.

    Matomo goal feature

    You’ll understand which channels and campaigns (SEO, PPC, newsletter, blogging etc.) are converting the best for your business, which cities/countries are most popular, what devices are working and how engaged your visitors are before converting. Learn more

    2. Set Heatmaps

    This is vital to show how your visitors are engaging with your website, blog pages, signup and sales pages. If you want to learn how your visitors really engage with your website to increase conversions, Heatmaps lets you see the results visually without any guesswork.

    Matomo's heatmaps feature

    By showing where your visitors try to click, move the mouse or how far down they’re scrolling on each page, you can effortlessly discover how your visitors truly engage with your most important web pages. Rather than guessing, rely on facts to prove if the changes you make actually improve your website or not. Learn more

    How to improve conversion rates with Heatmaps :

    • If you’ve got important information that will sell your service/product or bring you loyal followers, make sure it’s in the hot zones as shown in your heatmaps.
    • Try to rearrange parts of your pages to see if that increases engagement.
    • Make it easy for people to take important actions by having the CTA above-the-fold where 100% of visitors see it. Make sure you don’t clutter this section with too many messages or actions.
    • You can also identify areas to add links as heatmaps shows where people want to click.
    • Find what content is most popular on the page

    3. Session Recordings

    This is a conversion research technique where you learn what your users are trying to do and make sure your website is optimized to give them what they want. With Session Recordings you can playback all the interactions your visitors took on your website, such as clicks, mouse movements, scrolls, resizes, form interactions and page changes in a video. Truly understand how real visitors are using your website and what experiences they’re having.

    Also, by understanding what’s working you’re increasing the usability of your website, Session Recordings allow you to identify problem areas as well as where users are getting stuck. Learn more

    Session Recordings

    How to improve conversion rates with Session Recordings : For example, on a product landing page, you see your visitor highlighting specific words and putting it into search. With this you can observe what they’re trying to find and what they’re actually interested in. As you tweak the page to ensure what the visitor wants can be easily found, you’re taking steps to increase the chance for more conversions.

    4. A/B Testing

    Test anything and test anywhere to increase your conversions. Grow your website by comparing different versions of your landing pages to determine what works best for your users. Subtle tweaks across different versions of your landing pages can have a significant impact on converting incoming traffic.

    Matomo's a/b testing feature

    The changes for each landing page could be :

    • A different headline
    • Less copy vs more copy
    • Different calls-to-action
    • Colour schemes, forms, fonts, links, testimonials,
    • Or, it could be an entirely different page layout altogether.

    The idea is to see if either page A or page B (or C or D) was most successful in getting your visitors to the next step in the conversion funnel. Learn more

    How Matomo used A/B Testing : For our sign up page we tested three different CTAs and found how phrasing words differently could help improve conversion rates. Both “Start improving your websites” and “Start converting more users now” were stronger CTAs and converted 7% more than, “Start my free 30-day trial”.

    5. Form Analytics

    Form Analytics gives you powerful insights into how your visitors interact with your forms (like cart, sign-up and checkout forms).

    Form Analytics

    Online forms can come in thousands of different variations. It’s an area on your website that if not done right, could lead to you missing out on converting a large portion of your visitors. Rely on facts when you change your forms. Learn more

    How to improve conversion rates with Form Analytics : By proving whether your form is doing better when you change it and by how much. This lets you consistently increase form submission rates (conversions) on your website which is crucial to the success of your business.

    6. Funnels

    At a glance you will learn the steps (actions, events and pages) your users go through to the desired outcomes you want them to achieve whether it’s a sale, sign-up or any other particular goal you have defined.

    Funnels feature

    Looking at the entire conversion funnel and focusing on usability, you’ll be able to identify where your visitors are having problems, where they aren’t understanding the flow of your webpages and identify obstacles that get in the way of your users reaching that end goal. Learn more

    How to improve conversion rates with Funnels : Learn what makes your visitors take action (or what stops them) in progressing to the next step in the conversion funnel. At each step, you’ll discover what content/layout resonates with your visitors and you can optimize your website to have the greatest impact on your business.

    7. Behaviour

    This is one of the most important features to help you optimize your website for conversions. Learning visitor behaviour is a driving force to increase conversions. How ? It lets you identify where you could be taking action to increase conversions. You get to learn first-hand what content or feature on your site is or isn’t working for your visitors. 

    Behaviour feature

    Engagement is essential to help increase conversion rates. If your visitors aren’t interested in the content on your site, then there’s very little chance they’ll be interested in what you have to offer. Learn more

    How to improve conversion rates with Behaviour : Get started by reducing bounce rates on important pages, testing messaging on your most popular entry pages, testing on the highest exit pages to reduce visitors leaving the site, learning pathways through Users Flow and Transitions to see if users are taking pathways that lead them to conversions or are the journeys currently long or go in odd directions. Discover how your visitors are responding to your content. The happier your visitors are to stay on your site, the more likely they’ll be able to move through the journey to help you achieve the goals you’ve set for your site.

    Do privacy-focused industries need conversion optimization ?

    For industries that place extra emphasis on privacy and security, Matomo is a complete analytics tool that can cater for all your needs. You get the full benefits of a web analytics and conversion optimization platform as well as peace of mind knowing Matomo places emphasis on security/privacy and adheres strictly to GDPR.

    If you operate in a data sensitive industry like in government, healthcare, finance, education etc. you can rest assured knowing your user’s privacy is respected and that you will have 100% data ownership.

    Other conversion optimization metrics in Matomo to look at :

    Get a good indication that your conversion optimization efforts are working by knowing where to look and this starts by going through the metrics in your analytics. Below we list how you can make a start.

    “Best” metrics are hard to determine so you’ll need to ask yourself what you want your site to do. How do you want your users to behave or what kind of customer journey do you want them to have ?

    You can start with :

    • Decreasing abandonment rate
    • Decreasing bounce rate
    • Increasing interactions per visit
    • Reducing exit rates on pages that significantly impact your visitors to leave your site
    • Constantly test and learn what content resonates with your visitors
    • Look to advance more users through each stage of the conversion funnel
    • Improve your forms to increase submission rates
    • Always improve the conversion rate % for your goals e.g. if you currently have a 5% conversion rate for selling a product, aim for 10% ; if 30% of your visitors are downloading your e-book, then aim for 40%, then 50% and so on.

    Through optimizing your messaging, content or your page layouts, you will increase conversions by getting your visitors through a clear pathway to meet your website’s goal.

  • I am using ffmpeg java library to convert captured screenshots to video. Video output is blurry

    2 octobre 2020, par dark prince

    I am using ffmpeg java library to convert captured screenshots to video. Video which is generated as output is blurry.

    


    I am using bit rate as 9000, frames per sec as 25 and video size as that of desktop screen size.

    


    Any suggestions on how to solve this issue.

    


    P.S. I cannot use ffmpeg.exe and command line due to certain restrictions and hence I am opting for ffmpeg java library.

    


    Any suggestions on the issue or suggestions on any better approach will be helpful.

    


        import java.awt.AWTException;&#xA;    import java.awt.Dimension;&#xA;    import java.awt.FlowLayout;&#xA;    import java.awt.Rectangle;&#xA;    import java.awt.Robot;&#xA;    import java.awt.Toolkit;&#xA;    import java.awt.event.ActionEvent;&#xA;    import java.awt.event.ActionListener;&#xA;    import java.awt.image.BufferedImage;&#xA;    import java.io.File;&#xA;    import java.io.IOException;&#xA;    import java.util.Date;&#xA;    &#xA;    import javax.imageio.ImageIO;&#xA;    import javax.swing.JButton;&#xA;    import javax.swing.JFrame;&#xA;    import javax.swing.JLabel;&#xA;    import javax.swing.JOptionPane;&#xA;    &#xA;    import org.bytedeco.javacpp.avcodec;&#xA;    import org.bytedeco.javacv.FFmpegFrameRecorder;&#xA;    import org.bytedeco.javacv.OpenCVFrameConverter;&#xA;    &#xA;    public class ScreenRecorder{&#xA;    &#xA;        public static boolean videoComplete=false;&#xA;        public static String inputImageDir="inputImgFolder"&#x2B;File.separator;&#xA;        public static String inputImgExt="png";&#xA;        public static String outputVideo="recording.mp4"; &#xA;        public static int counter=0;&#xA;        public static int imgProcessed=0;&#xA;        public static FFmpegFrameRecorder recorder=null;&#xA;        public static int videoWidth=1920;&#xA;        public static int videoHeight=1080;&#xA;        public static int videoFrameRate=3;&#xA;        public static int videoQuality=0; // 0 is the max quality&#xA;        public static int videoBitRate=9000;&#xA;        public static String videoFormat="mp4";&#xA;        public static int videoCodec=avcodec.AV_CODEC_ID_MPEG4;&#xA;        public static Thread t1=null;&#xA;        public static Thread t2=null;&#xA;        public static JFrame frame=null;&#xA;        public static boolean isRegionSelected=false;&#xA;        public static int c1=0;&#xA;        public static int c2=0;&#xA;        public static int c3=0;&#xA;        public static int c4=0;&#xA;        &#xA;        &#xA;        public static void main(String[] args) {&#xA;            &#xA;            try {&#xA;                if(getRecorder()==null)&#xA;                {&#xA;                    System.out.println("Cannot make recorder object, Exiting program");&#xA;                    System.exit(0);&#xA;                }&#xA;                if(getRobot()==null)&#xA;                {&#xA;                    System.out.println("Cannot make robot object, Exiting program");&#xA;                    System.exit(0);&#xA;                }&#xA;                File scanFolder=new File(inputImageDir);&#xA;                scanFolder.delete();&#xA;                scanFolder.mkdirs();&#xA;                &#xA;                createGUI();&#xA;            } catch (Exception e) {&#xA;                System.out.println("Exception in program "&#x2B;e.getMessage());&#xA;            }&#xA;        }&#xA;        &#xA;        public static void createGUI()&#xA;        {&#xA;            frame=new JFrame("Screen Recorder");&#xA;            JButton b1=new JButton("Select Region for Recording");&#xA;            JButton b2=new JButton("Start Recording");&#xA;            JButton b3=new JButton("Stop Recording");&#xA;            JLabel l1=new JLabel("<br />If you dont select a region then full screen recording <br /> will be made when you click on Start Recording");&#xA;            l1.setFont (l1.getFont ().deriveFont (20.0f));&#xA;            b1.addActionListener(new ActionListener() {&#xA;                @Override&#xA;                public void actionPerformed(ActionEvent e) {&#xA;                    try {&#xA;                        JOptionPane.showMessageDialog(frame, "A new window will open. Use your mouse to select the region you like to record");&#xA;                        new CropRegion().getImage();&#xA;                    } catch (Exception e1) {&#xA;                        // TODO Auto-generated catch block&#xA;                        System.out.println("Issue while trying to call the module to crop region");&#xA;                        e1.printStackTrace();&#xA;                    } &#xA;                }&#xA;            });&#xA;            b2.addActionListener(new ActionListener() {&#xA;                @Override&#xA;                public void actionPerformed(ActionEvent e) {&#xA;                    counter=0;&#xA;                    startRecording();&#xA;                }&#xA;            });&#xA;            b3.addActionListener(new ActionListener() {&#xA;                @Override&#xA;                public void actionPerformed(ActionEvent e) {&#xA;                    stopRecording();&#xA;                    System.out.print("Exiting...");&#xA;                    System.exit(0);&#xA;                }&#xA;            });&#xA;            &#xA;            frame.add(b1);&#xA;            frame.add(b2);&#xA;            frame.add(b3);&#xA;            frame.add(l1);&#xA;            frame.setLayout(new FlowLayout(0));&#xA;            frame.setVisible(true);&#xA;            frame.setSize(1000, 170);&#xA;            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&#xA;        }&#xA;        &#xA;        public static void startRecording()&#xA;        {&#xA;            t1=new Thread()&#xA;            {&#xA;                public void run() {&#xA;                    try {&#xA;                        takeScreenshot(getRobot());&#xA;                    } catch (Exception e) {&#xA;                        JOptionPane.showMessageDialog(frame, "Cannot make robot object, Exiting program "&#x2B;e.getMessage());&#xA;                        System.out.println("Cannot make robot object, Exiting program "&#x2B;e.getMessage());&#xA;                        System.exit(0);&#xA;                    }&#xA;                }&#xA;            };&#xA;            &#xA;            t2=new Thread()&#xA;            {&#xA;                public void run() {&#xA;                    prepareVideo();&#xA;                }&#xA;            };&#xA;            &#xA;            t1.start();&#xA;            t2.start();&#xA;            System.out.println("Started recording at "&#x2B;new Date());&#xA;        }&#xA;        &#xA;        public static Robot getRobot() throws Exception&#xA;        {&#xA;            Robot r=null;&#xA;            try {&#xA;                r = new Robot();&#xA;                return r;&#xA;            } catch (AWTException e) {&#xA;                JOptionPane.showMessageDialog(frame, "Issue while initiating Robot object "&#x2B;e.getMessage());&#xA;                System.out.println("Issue while initiating Robot object "&#x2B;e.getMessage());&#xA;                throw new Exception("Issue while initiating Robot object");&#xA;            }&#xA;        }&#xA;        &#xA;        public static void takeScreenshot(Robot r)&#xA;        {&#xA;            Dimension size = Toolkit.getDefaultToolkit().getScreenSize();&#xA;            Rectangle rec=new Rectangle(size);&#xA;            if(isRegionSelected)&#xA;            {&#xA;                rec=new Rectangle(c1, c2, c3-c1, c4-c2);&#xA;            }&#xA;            while(!videoComplete)&#xA;            {&#xA;            counter&#x2B;&#x2B;;&#xA;            BufferedImage img = r.createScreenCapture(rec);&#xA;            try {&#xA;                ImageIO.write(img, inputImgExt, new File(inputImageDir&#x2B;counter&#x2B;"."&#x2B;inputImgExt));&#xA;            } catch (IOException e) {&#xA;                JOptionPane.showMessageDialog(frame, "Got an issue while writing the screenshot to disk "&#x2B;e.getMessage());&#xA;                System.out.println("Got an issue while writing the screenshot to disk "&#x2B;e.getMessage());&#xA;                counter--;&#xA;            }&#xA;            }&#xA;        }&#xA;        &#xA;        public static void prepareVideo()&#xA;        {&#xA;            File scanFolder=new File(inputImageDir);&#xA;            while(!videoComplete)&#xA;            {&#xA;                File[] inputFiles=scanFolder.listFiles();&#xA;                try {&#xA;                    getRobot().delay(500);&#xA;                } catch (Exception e) {&#xA;                }&#xA;                //for(int i=0;i/imgProcessed&#x2B;&#x2B;;&#xA;                    addImageToVideo(inputFiles[i].getAbsolutePath());&#xA;                    //String imgToAdd=scanFolder.getAbsolutePath()&#x2B;File.separator&#x2B;imgProcessed&#x2B;"."&#x2B;inputImgExt;&#xA;                    //addImageToVideo(imgToAdd);&#xA;                    //new File(imgToAdd).delete();&#xA;                    inputFiles[i].delete();&#xA;                }&#xA;            }&#xA;            &#xA;            File[] inputFiles=scanFolder.listFiles();&#xA;            for(int i=0;i/ maximum quality&#xA;             recorder.start();&#xA;             }&#xA;             catch(Exception e)&#xA;             {&#xA;                 JOptionPane.showMessageDialog(frame, "Exception while starting the recorder object "&#x2B;e.getMessage());&#xA;                 System.out.println("Exception while starting the recorder object "&#x2B;e.getMessage());&#xA;                 throw new Exception("Unable to start recorder");&#xA;             }&#xA;             return recorder;&#xA;        }&#xA;        &#xA;        public static OpenCVFrameConverter.ToIplImage getFrameConverter()&#xA;        {&#xA;            OpenCVFrameConverter.ToIplImage grabberConverter = new OpenCVFrameConverter.ToIplImage();&#xA;            return grabberConverter;&#xA;        }&#xA;        &#xA;        public static void addImageToVideo(String imgPath)&#xA;        {&#xA;            try {&#xA;                getRecorder().record(getFrameConverter().convert(cvLoadImage(imgPath)));&#xA;            } catch (Exception e) {&#xA;                JOptionPane.showMessageDialog(frame, "Exception while adding image to video "&#x2B;e.getMessage());&#xA;                System.out.println("Exception while adding image to video "&#x2B;e.getMessage());&#xA;            }&#xA;        }&#xA;        &#xA;        public static void stopRecording()&#xA;        {&#xA;            try {&#xA;                videoComplete=true;&#xA;                System.out.println("Stopping recording at "&#x2B;new Date());&#xA;                t1.join();&#xA;                System.out.println("Screenshot thread complete");&#xA;                t2.join();&#xA;                System.out.println("Video maker thread complete");&#xA;                getRecorder().stop();&#xA;                System.out.println("Recording has been saved successfully at "&#x2B;new File(outputVideo).getAbsolutePath());&#xA;                JOptionPane.showMessageDialog(frame, "Recording has been saved successfully at "&#x2B;new File(outputVideo).getAbsolutePath());&#xA;            } catch (Exception e) {&#xA;                System.out.println("Exception while stopping the recorder "&#x2B;e.getMessage());&#xA;            }&#xA;        }&#xA;    }&#xA;

    &#xA;

    Imagepanel.java

    &#xA;

    import java.awt.Dimension;&#xA;import java.awt.Graphics;&#xA;import java.awt.Image;&#xA;import javax.swing.ImageIcon;&#xA;import javax.swing.JPanel;&#xA;&#xA;class ImagePanel&#xA;  extends JPanel&#xA;{&#xA;  private Image img;&#xA;  &#xA;  public ImagePanel(String img)&#xA;  {&#xA;    this(new ImageIcon(img).getImage());&#xA;  }&#xA;  &#xA;  public ImagePanel(Image img)&#xA;  {&#xA;    this.img = img;&#xA;    Dimension size = new Dimension(img.getWidth(null), img.getHeight(null));&#xA;    &#xA;    setPreferredSize(size);&#xA;    setMinimumSize(size);&#xA;    setMaximumSize(size);&#xA;    setSize(size);&#xA;    setLayout(null);&#xA;  }&#xA;  &#xA;  public void paintComponent(Graphics g)&#xA;  {&#xA;    g.drawImage(this.img, 0, 0, null);&#xA;  }&#xA;}&#xA;

    &#xA;

    CropRegion.java

    &#xA;

    import java.awt.AWTException;&#xA;import java.awt.Dimension;&#xA;import java.awt.FlowLayout;&#xA;import java.awt.Graphics;&#xA;import java.awt.Rectangle;&#xA;import java.awt.Robot;&#xA;import java.awt.Toolkit;&#xA;import java.awt.event.MouseEvent;&#xA;import java.awt.event.MouseListener;&#xA;import java.awt.event.MouseMotionListener;&#xA;import java.awt.image.BufferedImage;&#xA;import java.io.IOException;&#xA;import javax.swing.JFrame;&#xA;import javax.swing.JLabel;&#xA;import javax.swing.JOptionPane;&#xA;&#xA;&#xA;public class CropRegion implements MouseListener,&#xA;        MouseMotionListener {&#xA;&#xA;    int drag_status = 0;&#xA;    int c1;&#xA;    int c2;&#xA;    int c3;&#xA;    int c4;&#xA;    JFrame frame=null;&#xA;    static int counter=0;&#xA;    JLabel background=null;&#xA;&#xA;    &#xA;    public void getImage() throws AWTException, IOException, InterruptedException {&#xA;        Dimension size = Toolkit.getDefaultToolkit().getScreenSize();&#xA;        Robot robot = new Robot();&#xA;        BufferedImage img = robot.createScreenCapture(new Rectangle(size));&#xA;        ImagePanel panel = new ImagePanel(img);&#xA;        frame=new JFrame();&#xA;        frame.add(panel);&#xA;        frame.setLocation(0, 0);&#xA;        frame.setSize(size);&#xA;        frame.setLayout(new FlowLayout());&#xA;        frame.setUndecorated(true);&#xA;        frame.setVisible(true);&#xA;        frame.addMouseListener(this);&#xA;        frame.addMouseMotionListener(this);&#xA;        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);&#xA;    }&#xA;&#xA;    public void draggedScreen() throws Exception {&#xA;        ScreenRecorder.c1=c1;&#xA;        ScreenRecorder.c2=c2;&#xA;        ScreenRecorder.c3=c3;&#xA;        ScreenRecorder.c4=c4;&#xA;        ScreenRecorder.isRegionSelected=true;&#xA;        JOptionPane.showMessageDialog(frame, "Region Selected.Please click on Start Recording button to record the selected region.");&#xA;        frame.dispose();&#xA;    }&#xA;&#xA;    public void mouseClicked(MouseEvent arg0) {&#xA;    }&#xA;&#xA;    public void mouseEntered(MouseEvent arg0) {&#xA;    }&#xA;&#xA;    public void mouseExited(MouseEvent arg0) {&#xA;    }&#xA;&#xA;    public void mousePressed(MouseEvent arg0) {&#xA;        paint();&#xA;        this.c1 = arg0.getX();&#xA;        this.c2 = arg0.getY();&#xA;    }&#xA;&#xA;    public void mouseReleased(MouseEvent arg0) {&#xA;        paint();&#xA;        if (this.drag_status == 1) {&#xA;            this.c3 = arg0.getX();&#xA;            this.c4 = arg0.getY();&#xA;            try {&#xA;                draggedScreen();&#xA;            } catch (Exception e) {&#xA;                e.printStackTrace();&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    public void mouseDragged(MouseEvent arg0) {&#xA;        paint();&#xA;        this.drag_status = 1;&#xA;        this.c3 = arg0.getX();&#xA;        this.c4 = arg0.getY();&#xA;    }&#xA;&#xA;    public void mouseMoved(MouseEvent arg0) {&#xA;    }&#xA;&#xA;    public void paint() {&#xA;        Graphics g = frame.getGraphics();&#xA;        frame.repaint();&#xA;        int w = this.c1 - this.c3;&#xA;        int h = this.c2 - this.c4;&#xA;        w *= -1;&#xA;        h *= -1;&#xA;        if (w &lt; 0) {&#xA;            w *= -1;&#xA;        }&#xA;        g.drawRect(this.c1, this.c2, w, h);&#xA;    }&#xA;}&#xA;

    &#xA;