If you happen to do a lot of video encoding, you know that your computer can really drag while the process is carried out. Our own [Mike Szczys] transcodes videos at home fairly often, and because the process is automated, he doesn’t always know if a conversion is taking place in the background.
He has been tinkering with Larson Scanners recently and thought he could put everything he’s learned along the way to good use by using the scanner as a “busy” indicator for his PC. He hooked the scanner up to the computer’s parallel port, and took a few minutes to bang out some Python code that would alert him when his PC was busy.
He set his notifier script to launch along with FFMPEG, whenever his MythTV setup had something ready to convert. The Python script drives a pin on the parallel port high, triggering the Larson Scanner’s animation. Every minute, the script checks the status of FFMPEG and continues to hold the pin high until the application exits. Once the conversion is done, the scanner goes back to sleep, letting [Mike] know that the coast is clear.
Check out the video below the break to see his parallel port trigger in action.
Continue reading “Monitoring Batch Jobs The Cylon Way With Python And A Parallel Port”