SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-04-2005, 08:38 PM
bluenote bluenote is offline
Sage Aficionado
 
Join Date: Nov 2004
Location: Vancouver, canada
Posts: 336
automating editing and compression with mencoder

So I've been working on making my use of mencoder, video redo as automated and easy as possible.

I've created a couple of batch files that so far seem to be making the tasks about as easy as I can make them.

Please don't use these if you don't understand them. While I've tried to make them easy to understand and configurable, I still don't have the confidence that they are bullet proof. I'm including them so that perhaps other people here who have helped me can benefit, and perhaps give ideas to others.

A word on the assumptions:

They are configured for having 3 sage recordings directories, this can easily be changed.
They are setup to utilize malore's awesome STV and malore's & Jere Jones comskip. I use the STV "create xml" function as a trigger to mark recordings that either need to be edited, or need to be compressed or both. The logic is, nightly (or more often) a "cleanup orphan" batch runs, which cleans up any xml vprj or txt orphans. It then looks for XML files, any XML files that exist, it then checks for VPRJ files -- if there are vprj files, it creates a shortcut to the MPG and puts it in my editing directory. If there is no VPRJ, it adds the mpg file to my compression queue file.

My xcompress file operates in two ways. in "Queue" mode, it checks the queue file sequentially, then checks for a duplicate in the compress directory (ie: has this file already been compressed somehow) , it then checks for a duplicate in the compress log file (has this file been compressed but I've already moved the file out of the compress directory). If neither are true, it runs a two pass mencoder job on the file, wherever it resides, with a target of the compress dir.

One note: the shortcuts work well, BUT, if you use video redo to open the project file, the path is wrong (since I use two computers, and the path is a drive letter...). This could be adjusted for one by using UNC paths for all video directories I think. It is easy enough to use the shortcut to open the project file, then say Ok to video redo to find the file yourself.

I think that's it. This version does not delete any mpg files, but it does delete orphans, and I recommend anyone go through just to make sure as I've been working on this so much I'm a little punchy at this point.

Shortcut.exe is a resource kit tool, and mencoder is a file you can get from the mplayer project.

One last thing. There's a funny feature of dos that makes environment variables be evaluated at read time if they are in a code block. I have set my registry to include this "delayed evaluate" setting. I believe this can be set locally in a batch by the command:

setlocal ENABLEDELAYEDEXPANSION
I run XP on both machines, I am not 100% certain that all features exist in all other versions of DOS so YMMV.
mencoder.exe is not included because it is above the file size compressed for the forums. I also assume comskip.ini contains:
output_default=1
output_videoredo=1

which makes comskip output both vprj and txt files. This takes advantage of malore's channel ignore feature, essentially, movie channels without commercials go straight to compression, and TV shows go for editing.

Cory
Here they are:
Attached Files
File Type: zip autocompress.zip (253.9 KB, 266 views)

Last edited by bluenote; 06-04-2005 at 08:43 PM.
Reply With Quote
  #2  
Old 06-23-2005, 04:34 AM
dooferlad's Avatar
dooferlad dooferlad is offline
Sage Advanced User
 
Join Date: Aug 2004
Posts: 165
Which version of mencoder are you using? I am having trouble with large files crashing during the recompress.
Reply With Quote
  #3  
Old 06-26-2005, 06:41 AM
bluenote bluenote is offline
Sage Aficionado
 
Join Date: Nov 2004
Location: Vancouver, canada
Posts: 336
1.0pre7-3-4-2, if I remember correctly I pulled it out of the mplayer distrib.

I do have a small problem with random files that dont like being played back in WMP, but zoomplayer takes them fine. I havent actually spent the time to track this down, but I believe the problem resides in my codecs, not anywhere else. Since I end up playing my compressed stuff from my DVD player (which works fine) I haven't gone any further.

I seem to recall something about file size crashes a while back, but its so hazy Im not sure if it was ffmpeg or mencoder. Im game to help if I can, anyways.

Cory
Reply With Quote
  #4  
Old 06-26-2005, 07:53 AM
dooferlad's Avatar
dooferlad dooferlad is offline
Sage Advanced User
 
Join Date: Aug 2004
Posts: 165
I appear to have found a build that is a bit happier. It was going crazy because the official mplayer build for mingw didn't have large file support enabled, but I have found one optimised for my system that does. Good thing too - the build process is a bit painful!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.