|
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
|
||||
|
||||
Dirmon2 + Comskip + Mencoder
So..I've been experimenting with the stock compression, transcoding plugins, auto-compression stvi's, SageMC video tools, and anything relevant to compression and/or auto-comskipping.
While I'm sure all the downloads add value to base installation, i don't feel like i'm...well... in control of the functionality. I don't mind tinkering, and in fact, it's how i learn best and can better predict what will happen as processes get automated. So, what i would like to do is write my own utility to edit commercials and compress and/or transcode to my whim. I'm not a complete novice about video concepts, but i admit i have never actually spent time re-encoding the same clip, over and over, changing parameters, codecs, bitrates, quantizers, etc.. and comparing the results...i kind of prefer the vast experience of the internet to do that for me. With that said, tonight i started a very simple exercise to create a windows bat file, called by dirmon2, to comskip a captured mpg file, cut the commercials, and transcode to xvid. I wanted to do this outside of Sage, to be sure i understood what was happening. My results have been less than stellar. Now, if the experts of this forum read this (like evilpenguin, jrewiki, nielm, Opus, sorry i don't have room to list the many others) and say 'why should i bother replying to this noob', i hope there is value to other non-experts trying the same thing i am. Ultimately, i would like to achieve a predictable process for removing commercials from either an SD or HD recording, and transcode/compress the result of that to a file playable by Sage, its clients, sage extenders, and in my case, also a networked media player- the Klegg mediashare. The probs... 1) i discover dirmon2 doesn't pass optional arguments to the program to run. I can only get it to pass the target name if i leave the command line options blank. Jere_Jones created a great utility, but i don't understand the syntax. Am i missing something? [[%PATH%/%BASENAME%]] didn't work. 2) so, i created a VBS script to be the program that dirmon2 runs and constructed the base target file myself, but dirmon2 can't run a VBS file natively. That's okay, i create a .bat wrapper, but still it seems ugly. I'm a windows shop so i have to live with that restriction right? 3) I chose mencoder to do the cutting and transcoding, simply because it appeared it could do both at the same time. My vbs script command string is: strCommand=MENCODERPATH & " " & MPGNAME & _ " -edl " & EDLNAME & _ " -oac copy " & _ " -ovc xvid -xvidencopts pass=2:bitrate=800" & _ " -of avi " & _ " -o " & AVINAME That completely successfully on an SD capture, but the commercials remained intact and compressed a 984MB file to only 763MB. Now i realize, i probably haven't optimized the compression settings, quantizers, etc...but at least the commercials should have been cut, right? The .edl file has: 411.88 544.11 0 835.70 967.83 0 1759.66 1799.10 0 4) Okay, so what am i missing? I have a math/compsci degree, and programming background. However, all that started 20+ years ago, and i'm now a pointy-haired IT manager. Please don't tell me i don't get it. This seems like a straight-forward task that any of my staff could accomplish. Although i admit it is fun to delve into these mysteries.....my wife isn't so sure. |
#2
|
||||
|
||||
EDL cutting using mencoder is pretty spotty. Sometimes it works, other times it doesn't. The most reliable method is using VideoRedo but it costs $$$.
Last edited by evilpenguin; 09-05-2008 at 12:15 AM. |
#3
|
||||
|
||||
I've seen mention of needing to have
-hr-edl-seek as an option to get the cutting working -edl edlfile.edl -hr-edl-seek John |
#4
|
||||
|
||||
Quote:
Thanks. i hadn't seen that option mentioned anywhere. I will try that tonight. |
#5
|
||||
|
||||
well, so far none of my mencoder experiments seemed to have honored the -hr-edl-seek switch. It might be an issue with the source, since i'm using the same clip for my testing. I could try a different file, but i feel if it doesn't work for this one, it prolly won't work for another one at some point, so i'd rather start with a successful effort. I'm intrigued with VideoRedo, particularly since it has commercial detection, as well as cutting.... i'm not quite ready to give up, but it's getting real close...
anyway, thanks for the advice! |
#6
|
||||
|
||||
followup--- i've ditched the menconder option, and switched to the trial videoredoplus. I used the builtin adscan program and so far the commercial cutting seems to be working, but i feel suspicious that some "real" parts of the video are being cut. But i felt confident enough to set it up for my "production" environment and let it scan/cut the actual mpg's i have on all of my sage recording folders.
the problem now is not VideoRedo....as much as Dirmon2. It keeps trying to reprocess the same files over and over. This shows up repeatedly in the activity log: 2008-Sep-06 22:56:46 - Starting: "MyCompress" on "H:\recordings\Access Hollywood_20080702_214824.mpg" 2008-Sep-06 22:56:47 - Processor done due to event. 2008-Sep-06 22:56:47 - Finished: "MyCompress" on "H:\recordings\Access Hollywood_20080702_214824.mpg" The dirmon2 job is set to target mpg and must not exist vprj. The .vprj exists for the file listed above, so i'm fissed as to why it keeps trying to process it? |
#7
|
|||
|
|||
Quote:
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/ |
#8
|
||||
|
||||
Quote:
John |
#9
|
|||
|
|||
The way i use Dir2Mon is after fle processing, i have two files remaining, the .mpg file without the commercials and a log file with the same name as the mpg file but with a .log file extension. Somewhere in Dir2mon, is an option to ignore processing if a file of some filetype is in the same directory. i set this up some time ago so i don't remember exactly how to do it but i know you can.
__________________
- James M - Capture Devices: HDHomerunXTEND, HDHomerunPrime |
#10
|
||||
|
||||
Dirmon2 should absolutely accept command-line arguments. I have used for example Comskip passing it the .ini file with the switch --ini=c:\comskip\comskip.ini. What exactly is the command you're trying to run?
In addition, you shouldn't have to wrap a vbs file in a bat file, you just run it by calling cscript vbsscript.vbs. |
#11
|
||||
|
||||
Quote:
Quote:
FWIW, here's my dirmon2.ini job: [Job Description 1] Name = MyCompress Processor = C:/Program Files/SageTV/utils/mycompress.cmd Targets Are Paths = 1 Targets Are Extensions = 0 Command Line Options = Must Exist 1 = Must Exist Logic = OR Must Exist 2 = Must And Or Must Not Exist Logic = AND Must Not Exist 1 = (\.vprj$) Must Not Exist Logic = OR Must Not Exist 2 = (\.clean\.mpg$) Directory 1 = H:/recordings Directory 2 = I:/recordings Target 1 = (\.mpg$) Resources Needed = 50 Timeout Enabled = 0 Timeout = -1 Priority Boost Due To Job Description = 0 Priority Boost Due To Age = 2 Priority Boost Due To Name = 0 Process Subdirectories = 1 Wait Until File Is Finished = 0 Wait Until File Is Idle = 0 Wait Until File Is Not Growing = 0 Wait Until File Is Not Growing Time = 1 Wait Until Drive Is Idle = 0 Wait Until Drive Is Idle Time = 2 Hide Console = 0 Blackout Enabled = 0 Blackout Start Time = 0 Blackout End Time = 0 Avoid Hidden Files = 1 Avoid Large Files = 0 Avoid Files Larger Than = -1 Avoid Small Files = 0 Avoid Files Smaller Than = -1 Avoid New Files = 0 Avoid Files Newer Than = -1 Avoid Old Files = 0 Avoid Files Older Than = -1 |
#12
|
||||
|
||||
The target filename (including path) is automatically sent as the first (I think, but it may be the last) argument without your having to do anything to get it there.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comskip Monitor: Announcement | Steep | SageTV Customizations | 340 | 09-26-2020 09:23 AM |
STV Import: Comskip Playback for Default STV (v1.5.4 30/August/2008 for SageTV 5/6) | JREkiwi | SageTV Customizations | 600 | 11-23-2011 07:58 AM |
Sage TV partial recordings and Comskip | garyellis | SageTV Customizations | 4 | 04-22-2009 04:33 PM |
ubuntu 8.04 + DirMon2 + comskip | ntk2 | SageTV Customizations | 0 | 07-27-2008 06:50 PM |
Comskip and DirMon2 | bkejser | SageTV Customizations | 5 | 04-02-2006 07:53 PM |