|
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 |
#1
|
||||
|
||||
Simplification of standing recompression of Sage shows?
I’m sure I’m far from the only one a little frustrated with the inability to do standing recompression of Sage shows without plowing through 28 steps of manual procedures, stopping the Sage service, running several command line apps, touching the time/date of the files etc… etc… and then crossing your fingers and hoping when you restart Sage your shows aren't all jacked up.
So I started fiddling with a way I can automate this on my own box at least. One of the things I’ve noticed is that when I compress an MPEG created by Sage (via a Hauppauge 250) it makes a nice, tight AVI file that’s less than 1/5th the size (with the compression I’m using, I’m sure more can be had)– all good. But I’m able to copy this file directly over the MPEG file (yes – renaming the .AVI to .MPG), and I touch the date/time on the file to match the original and when I go into Sage, the show is still there, the comskip stuff is still right (for the couple shows I’ve tried this on anyway), it plays back just dandy on my client box. Via the MVP client not so much but I can’t get any DIVX files to play back via MVP even after fiddling with the transcoding support in the properties file – that’s a discussion for another time on another thread… Which brings up the possibility of being able to skip all that tommyrot involving “tricking” sage into slurping different shows back into the DB based on their IDs and such. Which means shutting down and restarting the service should not be necessary. Right? Or am I sniffing glue? Is there a down side to taking this route other than the file extension lying about the actual format of the file? For not the first time I find myself wishing the Sage database were in _some_ format we could crack open. mySQL is free, folks… and very powerful. And fabulously open. But I digress… I may just let this rip on my own system at home after doing backups and seeing if I can get my MVP clients happy with MPEG4 output – but thought I’d ask if I’m missing something terribly obvious that would make this a very bad idea…
__________________
Server: 2 PVR 150s hooked to DirectTV tuners w/ serial control. 1 HDHR unit with Comcast QAM. Intel duo core 2.4 GHz, 1 gig RAM. 500 Gig SATA. ReadyNAS with 4 500 Gig WD drives. Sage 6. Clients: Living room: HD Extender w/ Pannasonic 42" plasma via HDMI cable. Basement: HD Extender connected to Dell projector. Back room: MVP 1000 hooked to 21" CRT TV. Bedroom: MVP 1000 hooked to 27" CRT TV. Last edited by jlindborg; 04-14-2006 at 02:30 PM. |
#2
|
|||
|
|||
Quote:
EDIT: Ok I guess he stops and starts Sage to be sure there isn't any corruption. http://forums.sagetv.com/forums/show...=recompression Last edited by dblaine2; 04-14-2006 at 03:27 PM. |
#3
|
||||
|
||||
yeah - and he's using different file names - during restart Sage apparently tries to reconcile those file names using the show Id. It's all a little goofy for me - I just want to compress standing shows where they sit - not create other file names in another folder or require Sage to be off line etc... which is what just about all other solutions setup.
I have a snappy little GUI app setup to do this all for me just about flying - think I'll backup some of the important shows (i.e. the ones my wife would be angry were missing) and just unleash this thing over the weekend and see what happens. God hates a coward after all...
__________________
Server: 2 PVR 150s hooked to DirectTV tuners w/ serial control. 1 HDHR unit with Comcast QAM. Intel duo core 2.4 GHz, 1 gig RAM. 500 Gig SATA. ReadyNAS with 4 500 Gig WD drives. Sage 6. Clients: Living room: HD Extender w/ Pannasonic 42" plasma via HDMI cable. Basement: HD Extender connected to Dell projector. Back room: MVP 1000 hooked to 21" CRT TV. Bedroom: MVP 1000 hooked to 27" CRT TV. |
#4
|
||||
|
||||
Did you ever get any further with your GUI app? I've been wishing for a way to do this for a very long time, but have been too busy/lazy to do it.
__________________
-Eric Client: STX-HD100 Extender, Connected to 47" Visio 1080p LCD via HDMI, Running SageMC Client: Media MVP Running SageMC Server: Antec SLK3800B, AMD Athlon 64 X2 4200+, Biostar TForce 550, GeForce 7300LE, 1GB DDR2 800, 2 x HVR-1600, PVR-150MCE, 1.4TB HD Space, XP Pro, Java6, Latest SageTV Version |
#5
|
|||
|
|||
Below is a sample of a batch file I use to re-encode old shows and I don't have to restart sage at all. I currently use a script to generate the batch files using DIRMON according to criteria I specify. SageTVTranscoder.exe comes with sage and touch.exe could be found on the net.
cd S:\Program Files\SageTV\SageTV\ S: start /B /w /belownormal SageTVTranscoder.exe -i D:\sage1\HGWellsWaroftheWorlds-292392-0.mpg -s 320x240 -vcodec msmpeg4v2 -b 600 -r 29.97 -ab 128 -acodec mp3 D:\sage1EncodedMP4\HGWellsWaroftheWorlds-292392-0.avi touch.exe -r D:\sage1\HGWellsWaroftheWorlds-292392-0.mpg D:\sage1EncodedMP4\HGWellsWaroftheWorlds-292392-0.avi del D:\sage1\HGWellsWaroftheWorlds-292392-0.mpg move D:\sage1EncodedMP4\HGWellsWaroftheWorlds-292392-0.avi D:\sage1 |
#6
|
||||
|
||||
Could you expand a bit on the way that you have DirMon set up?
Thanks!
__________________
-Eric Client: STX-HD100 Extender, Connected to 47" Visio 1080p LCD via HDMI, Running SageMC Client: Media MVP Running SageMC Server: Antec SLK3800B, AMD Athlon 64 X2 4200+, Biostar TForce 550, GeForce 7300LE, 1GB DDR2 800, 2 x HVR-1600, PVR-150MCE, 1.4TB HD Space, XP Pro, Java6, Latest SageTV Version |
#7
|
||||
|
||||
Excellent! Thank you for your explanation. I'll try to implement this tonight.
__________________
-Eric Client: STX-HD100 Extender, Connected to 47" Visio 1080p LCD via HDMI, Running SageMC Client: Media MVP Running SageMC Server: Antec SLK3800B, AMD Athlon 64 X2 4200+, Biostar TForce 550, GeForce 7300LE, 1GB DDR2 800, 2 x HVR-1600, PVR-150MCE, 1.4TB HD Space, XP Pro, Java6, Latest SageTV Version |
#8
|
|||
|
|||
one more thing the CreateMPG2MP4.vbs works 2 ways.
iDaysOld = 3 .... this you can set to how old the mpg's should be before encoding. You can change to 999999999 etc. to not encode any. the second part is to encode by movie name. movie1="StarTrek" movie2="Charmed" movie3="CSI" movie4="Smallville" movie5="TheOuterLimits" movie6="xxxxx" movie7="xxxxx" movie8="xxxxx" movie9="xxxxx" movie10="xxxxx" This will re-encode any series that matches the names regardless of how old. It will ignore iDaysOld. if You don't want to encode any series right away just change them all to xxxxx. PS if you don't want a specific series ever to be to encoded just add the name to the Ignore list in Dirmon. Last edited by nyplayer; 06-27-2006 at 05:31 PM. |
#9
|
||||
|
||||
Can you explain a little more about the following line? Like what the chkdvd.txt file is, and what it signifies?
Code:
checkfile="C:\chkdvd.txt" Thanks!
__________________
-Eric Client: STX-HD100 Extender, Connected to 47" Visio 1080p LCD via HDMI, Running SageMC Client: Media MVP Running SageMC Server: Antec SLK3800B, AMD Athlon 64 X2 4200+, Biostar TForce 550, GeForce 7300LE, 1GB DDR2 800, 2 x HVR-1600, PVR-150MCE, 1.4TB HD Space, XP Pro, Java6, Latest SageTV Version |
#10
|
|||
|
|||
the checkfile="C:\chkdvd.txt" makes sure that not all your encodes run at once. I just picked that name because I encode some files to DVD.
I made a change that's very important. Change the line below in MPG2MP4.vbs ... f.Write "del " & fullname To: f.Write "if exist " & mp4target & " del " & fullname Last edited by nyplayer; 06-28-2006 at 09:52 AM. |
#11
|
||||
|
||||
Another question:
What is contained in the following file? Code:
encodempeg4bat="c:\eddie.bat" Edit: After looking at the code some more, I think that this is the file that is being written... is this correct?
__________________
-Eric Client: STX-HD100 Extender, Connected to 47" Visio 1080p LCD via HDMI, Running SageMC Client: Media MVP Running SageMC Server: Antec SLK3800B, AMD Athlon 64 X2 4200+, Biostar TForce 550, GeForce 7300LE, 1GB DDR2 800, 2 x HVR-1600, PVR-150MCE, 1.4TB HD Space, XP Pro, Java6, Latest SageTV Version |
#12
|
|||
|
|||
These batch jobs and scripts will re-encode mpg files and replace the MPG in sage and maintain all show data.
I updated all the batchfiles and scripts to make it much easier. Requirements 1. Dirmon 2. Touch.exe at unxutils.sourceforge.net in the UnxUtils.zip. Should be copied over to your Sagetv directory. 3. SageTVTranscoder which comes with SageTV also will work with FFMPEG by changing Scripts.. 4. Attached Script files. 5. All encoded files will be created in the same drive as your sage record folders. For example. Your sage directory is d:\sage1 then the encode files for that folder will be in d:\sage1encoded This is done to facilitate moving. Unzip the files it should contain samples of AVI and MP4 encodes. Below you will find a sample to encode to XVID. CreateMPG2AVI.bat set trigger=MPG2AVI set iDaysOld=999999999 set scriptpaths=C:\SageScripts\ set movie1="xxxxx" set movie2="xxxxx" set movie3="xxxxx" set movie4="xxxxx" set movie5="xxxxx" set movie6="xxxxx" set movie7="xxxxx" set movie8="xxxxx" set movie9="xxxxx" set movie10="xxxxx" Rem Do Not touch this line Below-------------------------------------------------- "%scriptpaths%CreateTrigger.vbs" %1 %trigger% %iDaysOld% %movie1% %movie2% %movie3% %movie4% %movie5% %movie6% %movie7% %movie8% %movie9% %movie10% exit The above batch will create the Trigger for DIRMON... Based on 2 things. iDaysOld = .... this you can set to how old the mpg's should be before encoding. You can change to 999999999 etc. to not encode any. The second part is to encode by movie name. movie1="StarTrek" movie2="Charmed" movie3="CSI" movie4="Smallville" movie5="TheOuterLimits" movie6="xxxxx" movie7="xxxxx" movie8="xxxxx" movie9="xxxxx" movie10="xxxxx" This will re-encode any series that matches the names regardless of how old. It will ignore iDaysOld. If you don't want to encode any series right away just change them all to xxxxx. PS if you don't want a specific series ever to be encoded just add the name to the Ignore list in Dirmon. MPG2AVI.bat Below IF EXIST C:\SageEncode.txt goto :end set encodesettings="-f avi -vcodec xvid -s 320x240 -aspect 4:3 -b 600 -g 300 -acodec mp3 -ab 128" set OuputExtension="avi" set scriptpaths=C:\SageScripts\ set sagepath="S:\Program Files\SageTV\SageTV" Rem DeleteOriginal 1=yes 0=no set DeleteOriginal=0 Rem Do Not touch the line Below-------------------------------------------------- "%scriptpaths%EncodeSage.vbs" "%1" %encodesettings% %sagepath% %OuputExtension% %DeleteOriginal% :end exit Most of it is self explanatory. set encodesettings >>> Here you can set your encoder settings etc... you can use any AVI Codec that SageTVTranscoder or ffmpeg support. set scriptpaths >> path where you put the attached scripts EncodeSage.vbs , CreateTrigger.vbs and your batchfiles. ****The most important part of the batchfile is "set DeleteOriginal=" If set to no (0) all it will do is encode the original file and touch it with the original date. It will also create a small file with the extension sav in your sage directory so that DIRMON will not reschedule a re-encode. Nothing is done to the Original file. If set to yes (1) it will encode the file and Touch the file with the original date... Delete your original and move the encoded file to your original sage folder. Dirmon Settings CreateMPG2AVI- must not exist=MPG2AVI or sav , program to run = C:\SageScripts\CreateMPG2AVI.bat targets=mpg Directories your sage directories of course. MPG2AVI - must exist=MPG2AVI and must not exist=sav . program to run C:\SSageScripts\MPG2AVI.bat targets= mpg plus your sage directories of course. Last edited by nyplayer; 08-09-2006 at 07:20 AM. |
#13
|
|||
|
|||
Quote:
|
#14
|
|||
|
|||
Never mind, found it.
http://forums.sagetv.com/forums/show...exe#post169981 Also noted: If you edit out the commercials you'll have some red bar in the beginning of the file. It will reflect how much time you've removed from the original file. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|