Video Overlay with PHP

Posted on 2009-02-24
Last Modified: 2012-05-06
I run a retail business and I am trying to deter theft by my employees.

I have a usb camera setup pointing towards each register.  The camera records and stores the video on the hard drive.

 My point of sale software is a php base software that was developed in house.  I would like to add a feature to my video where
when the employee scans an item, that item would show up on the video (as a video overlay) and the timed scanned would correspond with
the video. (Picture is attached for visual effect)

Does anyone have a clue where I would start?  Write the data to a port?  Not real sure where to go.

Any ideas would help



Question by:jmsloan
    LVL 6

    Expert Comment

    Well, as you already know PHP itself can't handle this.  But, through PHP you can send commands to other programs.  So you could make a program in another language that receives command line input.  So in your php script you could do something like this:

    //purchase processing code
    exec('addoverlay.exe {$productname} {$price}');

    Good luck,

    LVL 3

    Author Comment

    Perhaps I need to ask if there is an open source recording program that will except arguments and overlay them into the recording video?

    Does this sound right?
    LVL 6

    Accepted Solution

    Yeah, that's what I'd do.  From the php side all you need to do is output the data.  You would need some overlay program to take it in as input, either through a text file, xml, command line arguments or something like that.  I'd say the most important thing would be finding the overlay program, from there it should not be too difficult in PHP to output the data in the correct format.  

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to count occurrences of each item in an array.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now