Recorded TV Directory Monitor -> MPEG2Repair

Share your ARGUS TV tips & tricks here
Post Reply
Posts: 6
Joined: Thu Feb 28, 2013 6:40 am

Recorded TV Directory Monitor -> MPEG2Repair

Post by bobp » Fri Mar 22, 2013 12:16 am

I've been trying to automate the process of mpeg2repair with some success using the built in ARGUS functions, but not as much as I'd like.

I have instead just written a Python 3 script to monitor a recorded TV directory and make note of the file size. If the file size doesn't change between scans, then mpeg2repair is called on that file. This isn't the most robust way, but it works for me.

If the signal were to drop completely and the file were to stop growing larger between scans (default is 10s), it would open mpeg2repair on the unfinished file. 10s of lost footage is too much for me and I would have deleted the .ts anyways, but perhaps this script won't be suitable for your needs.

It renames the file to filename_fixed.ts and will ignore any files with fixed in the name. This is pretty hackish (for instance, it would refuse to work on a TV show with 'fixed' in the episode title), but it seems to be fine in practice.

To use this script, you will need to have Python 3.x installed. You will of course also need mpeg2repair and mpeg2repairhelper in the same directory. The script doesn't rely on any third party libraries. Edit the settings at the top with your own directories and scan time in seconds. If there is interest, I'm sure I could produce a Windows binary.

Try it out, and please do let me know if you have any issues, comments, or suggestions. To kill it, send a Ctrl+C from command prompt (Nasty, I know).

Code available at:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest