|SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.|
||Thread Tools||Search this Thread||Display Modes|
Overnight Conversion MPG to XviD
I've been using various DOS batch scripts for the last few months, to automate overnight transcodes from MPG to XviD. Pretty amateurish I'm sure, but I've been improving them and they work pretty well for me. Quality is generally excellent (of the ouput, not the scripts). Figure I'll post them here and some people might find them useful, and might be able to improve them for me.
Anyway, the scripts are here. Each script contains comments and references, and urls.txt shows where to find a number of the utilities used. Could be adapted easily to produce DivX if that's what you prefer.
Summaries of each script follows! As background, I prefer to use Mencoder to transcode my XviD, but have found that the DVB data from some channels in the UK makes Mencoder crash (five) or Mencoder picks the wrong audio stream (C4). Therefore I use a combination of Mencoder and AutoGK, and decide which by using WGET to query nielm's excellent webserver to see what channel the recording is from. Whew...
I also have a stack of scripts to do odd bits and pieces like one-off transcodes, films etc.
This is my main script, and runs three further scripts. I schedule this to run overnight (2:30), but you could just as easily use another utility to run this for one file using DirMon or similar. Kicks off at low priority for the most part, so TV is unaffected.
Here is where you'll need to set up where MPG, XviD and Temp folders are. Firstly it looks in your MPG folder and calls VRD.BAT, which takes each file which doesn't already have an XviD, and uses VideoReDo to fix it up and copy it to the Temp folder. If you don't want to use VideoReDo, you can just copy the file here. Then it calls both MEN.BAT and AGK.BAT, each checking the channel for the recording to see whether it's the right one to use.
Checks if the file exists in the XviD folder and if not, uses VideoReDo to run a quickstream fix and output to the Temp folder (this fixes a lot of sync problems etc.). If not using VideoReDo, just change to a copy.
This script ignores films, which I encode using FILM.BAT, and you may need to change "Film" to "Movie" if you're from the wrong side of the pond...
Takes the files in the Temp folder, and uses WGET to check what channel the recording is from, by grabbing the data from nielm's webserver. Doesn't transcode from any of three problem channels otherwise uses 2-pass Mencoder transcoding to produce the XviD.
See above, if it's a problem channel this script uses AutoGK for the transcode. If you prefer AutoGK you can just not call men.bat, drop the WGET and use AutoGK exclusively.
You can choose one-pass or two-pass transcoding depending on whether you use a percentage or a calculated filesize (see comments). Then uses AutoGKAdd.EXE to add the file to the AutoGK queue, which is kicked off at the end of the whole process using AutoGKStart.EXE (in MPG2XVID). Simple huh?
AutoGKStart.exe and AutoGKAdd.exe are produced using AutoIt v3, which is a free automation tool. If you want to check them out you can reverse-compile the EXEs using AutoIT.
I use this one to transcode Films. Uses VideoReDo, AutoGK and 2-pass transcoding to produce films at 1.4GB (3 per DVD). Tweak as neccessary! Associated in WinXP with MPG files, so appears on right-click as "Transcode Film". If you make the size 1400 like in this file, AutoGK will also create two 700MB files for CD Archiving; if you make it 1401 no split files will be created (a bit qucker).
Simple right-click transcode, kicks off VideoReDo then AutoGK with a fixed quality of 62%. I use this where I want a quick encode without waiting overnight. Associated in WinXP with MPG files, so appears on right-click as "Transcode with AutoGK".
Simple script to compare XviD folder with MPG folder; looks for XviDs with Sage-style names, and if no equivalent MPG exists asks you if you want to delete the XviD. Just used to clean the XviD folder when you've watched the video in Sage.
Use WinXP to associate with MPG, passing %1 as parameter, so it appears on right-click as "Exclude from XviD"; just creates a small fake XviD .avi so the file won't be processed overnight.
Questions, corrections, improvements, insults - bring 'em on!
Oh, and use at your own risk - if these scripts crash your PC, burn down your house or cop off with your girlfriend/boyfriend/wife/cat/dog, then I take no responsibility!
Server: Intel Core i5 3330 3GHz, 8GB DDR3, 128GB SATA3 SSD System Disk, 2TB SATA3 Recording Disk, 1.5TB SATA2 Archive Disk, 2x TBS 6284 PCI-E DVB-T2 Quad TV Tuner Card, XMLTV from DigiGuide, SageTV 7.1.9, Win7 Pro 64bit
Clients: 4 Wired MVPs, 1 Dell Inspiron 530 Client (64bit Win7, Core2Duo E6550, 2GB DDR2, 160GB System Disk, Asus GeForce GT 610, 24" TFT), 2 Acer Aspire Revo R3700 Nettop (Intel Atom Dual Core D525B 1.8GHz, 2GB RAM, 500GB HDD, Win7 Pro)
Last edited by rickgillyon; 04-11-2006 at 02:16 PM.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread Tools||Search this Thread|