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
  #241  
Old 09-23-2004, 01:12 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Quote:
Originally posted by stanger89
Hey for those of you interested in cleaning up all those txt files orphaned when Sage deletes recordings I've found a rather simple way to do it. Simply enter the following at a command prompt. It assumes you are in the SageTV recordings dir
Code:
for /f "tokens=1 delims=." %i in ('dir /s/b *-0.txt') do if NOT EXIST %i.mpg (del %i.txt)
And if you would like to test it (to see what will be deleted) with out deleting anything:
Code:
for /f "tokens=1 delims=." %i in ('dir /s/b *-0.txt') do if NOT EXIST %i.mpg (echo %i.txt)
I already had my SageTV video directories samba mounted on my linux box. So I just wrote a simple perl script to delete orphaned txt files and set it to run from crontab once an hour. I know this doesn't help most people, but I thought I'd mention it incase anyone else samba mounts their sage dirs.
Reply With Quote
  #242  
Old 09-23-2004, 01:26 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Malore,
Would it be difficult to add a txt search dir property? i. e. comskip_search_dirs=e:\tv,f:\tv
then the client would check these dirs for txt files that match the mpg. Right now I can't use comskip on one of my clients because it is on a different subnet then the server. I have a linux box doing port forwarding between the client and server for sagetv. The linux box samba mounts my sagetv video drives and shares those drives to my client. Basiclly what I'm saying is I can't use UNC paths to make comskip work, but I could make it work if I had a property to add directories to check for txt files. I'm sorry if you find this post confusing.

-Scott

P.S. Thanks for the kickass mod.
Reply With Quote
  #243  
Old 09-23-2004, 05:51 AM
JasonJoel JasonJoel is offline
Sage Icon
 
Join Date: Mar 2003
Location: St. Louis, MO
Posts: 1,043
Although this doesn't help you, I just want to point out that you do NOT need UNC paths setup.

You can also just map the drives with the same drive letter they have on the SageTV server and comskip works fine.

Obviously if you are recording on your C drive though, you are SOL with that method...

Jason Bottjen

Quote:
Originally posted by turak
Malore,
Would it be difficult to add a txt search dir property? i. e. comskip_search_dirs=e:\tv,f:\tv
then the client would check these dirs for txt files that match the mpg. Right now I can't use comskip on one of my clients because it is on a different subnet then the server. I have a linux box doing port forwarding between the client and server for sagetv. The linux box samba mounts my sagetv video drives and shares those drives to my client. Basiclly what I'm saying is I can't use UNC paths to make comskip work, but I could make it work if I had a property to add directories to check for txt files. I'm sorry if you find this post confusing.

-Scott

P.S. Thanks for the kickass mod.
Reply With Quote
  #244  
Old 09-23-2004, 06:20 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Quote:
Originally posted by JasonJoel
Although this doesn't help you, I just want to point out that you do NOT need UNC paths setup.

You can also just map the drives with the same drive letter they have on the SageTV server and comskip works fine.

Obviously if you are recording on your C drive though, you are SOL with that method...

Jason Bottjen
Yeah. I managed to get it to work on one of my video directories by mapping the samba share to F:\tv, but my other video directory is on drive E: which is used by my DVD+/-RW on the client. I just think having a variable in the properties file with dirs to do a file test on would make it more compatible with different peoples setups (including mine ) with little effort involved in implementing it.
Reply With Quote
  #245  
Old 09-23-2004, 09:43 AM
JasonJoel JasonJoel is offline
Sage Icon
 
Join Date: Mar 2003
Location: St. Louis, MO
Posts: 1,043
Yeah, I had to move my DVD/CD drive to another drive letter because of that same issue. But since it is really easy to do that in XP, I did it and haven't looked back since.

That said, it would be nice if you didn't have to do all of that!

Jason Bottjen


Quote:
Originally posted by turak
Yeah. I managed to get it to work on one of my video directories by mapping the samba share to F:\tv, but my other video directory is on drive E: which is used by my DVD+/-RW on the client. I just think having a variable in the properties file with dirs to do a file test on would make it more compatible with different peoples setups (including mine ) with little effort involved in implementing it.
Reply With Quote
  #246  
Old 09-23-2004, 11:48 AM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
Quote:
Originally posted by redman
Does anyone have the logic details that describe how the frames are calculated into a commercial?
First it reads through the entire video file and saves the frame numbers that are black. Then it looks for gaps between black frames that are greater than the minimum commercial size and less than the maximum comercial size. It joins consecutive commercials together to form a commercial break. It then goes through the list of commercial breaks and prints out only the ones greater than the minimum commercial break and less than the maximum commercial break.

If you set verbose=2 in the comskip.ini you will be able to see this process.

Example:
start: 791, end: 968, len: 5.91s
--start: 968, end: 1088, len: 4.00s 9.91s
--start: 1088, end: 3306, len: 74.01s 83.92s

start: 8856, end: 9767, len: 30.40s
--start: 9767, end: 10666, len: 30.00s 60.39s
--start: 10666, end: 11566, len: 30.03s 90.42s
--start: 11566, end: 11715, len: 4.97s 95.40s
--start: 11715, end: 12039, len: 10.81s 106.21s
--start: 12039, end: 12465, len: 14.21s 120.42s
--start: 12465, end: 13366, len: 30.06s 150.48s

start: 23828, end: 23948, len: 4.00s
--start: 23948, end: 24869, len: 30.73s 34.73s
--start: 24869, end: 25768, len: 30.00s 64.73s
--start: 25768, end: 26667, len: 30.00s 94.73s
--start: 26667, end: 27568, len: 30.06s 124.79s

--------------------
792 3301
8865 13366
23873 27568
Reply With Quote
  #247  
Old 09-26-2004, 07:03 PM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
ComSkip Version 0.30 Available Here!!!

I haven't been able to commit to the sage community website in a while so I'll post an update here.

Changelist to Ver 0.30
  • An XXX.log file will be created for any verbose setting (to aid in troubleshooting)
  • Added scene change detection
  • Added fuzzy logic - MAJOR ADDITION (recommend running with verbose=1 to understand) (I think this is the key to perfect detection!)
  • Console window now shows the timecode of frame being analyzed (easier to understand than frame numbers)
  • MPEG path and filename can contain spaces. (ATTN: ellweber)
  • Started support for "special cases" (e.g. Home Improvement always has a 2-4 second "sponsored by" segment followed by a 10 second commercial followed by 30-60 seconds of credits/outtakes - Mark the outtakes as show)
  • Various internal cleaning and optimization
I'm attaching two zip files. Everyone will need comskipexe.zip. Just replace the files in the SageTV directory and you should be good to go. The comskipsrc.exe is for anyone who wants the changes I made to the source files.

If comskip doesn't work 100% for you, I would appreciate it if you would follow this procedure:
  1. Change the comskip.ini verbose to "verbose=10".
  2. Run comskip on the trouble mpg.
  3. Email the resultant .log file along with an explanation of the problem (i.e. It didn't mark a commercial from 4:56 to 5:34) to jere.jones@gmail.com
  4. Wait for feedback and/or updated comskip.
If even a few people do that with a wide enough variety of shows, I think we can have comskip up to 99.9% effectiveness.

Jere
Attached Files
File Type: zip comskipexe.zip (87.4 KB, 316 views)
File Type: zip comskipsrc.zip (20.2 KB, 261 views)
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7

Last edited by Jere_Jones; 09-27-2004 at 05:17 PM.
Reply With Quote
  #248  
Old 09-26-2004, 07:19 PM
redman's Avatar
redman redman is offline
Sage Advanced User
 
Join Date: Apr 2004
Location: Malaysia
Posts: 159
Gonna play with this just as soon as I can.

Excellent.
__________________
"I Love it when a plan comes together"
Reply With Quote
  #249  
Old 09-26-2004, 07:24 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
Awesome!

Thank you very much for your time and contribution. Giving it a try now!

I.

Quote:
Originally Posted by Jere_Jones
I haven't been able to commit to the sage community website in a while so I'll post an update here.

Changelist to Ver 0.30
  • An XXX.log file will be created for any verbose setting (to aid in troubleshooting)
  • Added scene change detection
  • Added fuzzy logic - MAJOR ADDITION (recommend running with verbose=1 to understand) (I think this is the key to perfect detection!)
  • Console window now shows the timecode of frame being analyzed (easier to understand than frame numbers)
  • MPEG path and filename can contain spaces. (ATTN: ellweber)
  • Started support for "special cases" (e.g. Home Improvement always has a 2-4 second "sponsored by" segment followed by a 10 second commercial followed by 30-60 seconds of credits/outtakes - Mark the outtakes as show)
  • Various internal cleaning and optimization
I'm attaching two zip files. Everyone will need comskipexe.zip. Just replace the files in the SageTV directory and you should be good to go. The comskipsrc.exe is for anyone who wants the changes I made to the source files.

If comskip doesn't work 100% for you, I would appreciate it if you would follow this procedure:
  1. Change the comskip.ini verbose to "verbose=10".
  2. Run comskip on the trouble mpg.
  3. Email the resultant .log file along with an explanation of the problem (i.e. It didn't mark a commercial from 4:56 to 5:34) to jere@sage-community.org
  4. Wait for feedback and/or updated comskip.
If even a few people do that with a wide enough variety of shows, I think we can have comskip up to 99.9% effectiveness.

Jere
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.
Reply With Quote
  #250  
Old 09-26-2004, 08:23 PM
heffe2001's Avatar
heffe2001 heffe2001 is offline
Sage Icon
 
Join Date: Mar 2004
Location: Conover, NC
Posts: 1,269
Just stuck it on my box, but only had one show with no commercials detected (having a problem with Sage firing off Comskip, but I'm using Neilm's STV, not sure if it's that, or something on my setup), it's running on that file now, will post if I have any problems...
__________________
Server: AMD Phenom 2 920 2.8ghz Quad, 16gb Ram, 4tb Storage, 1xHVR-2250, 1 Ceton Cable Card adapter, Windows 7 SP1
Reply With Quote
  #251  
Old 09-26-2004, 08:34 PM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
I've noticed a similar problem with Nielm's STV. If it comskip runs automatically, it runs fine, but if I tell it to run on a specific show (via Malore's Recording's Option menu), then it doesn't work right at all.

I'm not sure what the problem is, but I'm looking for a fix internal to Comskip.

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #252  
Old 09-26-2004, 09:25 PM
heffe2001's Avatar
heffe2001 heffe2001 is offline
Sage Icon
 
Join Date: Mar 2004
Location: Conover, NC
Posts: 1,269
I'd REALLY like it to run like the suggestion above, basically have a executable I could run on ANY machine (no client/server needed), that will parse the directory for any shows recorded without txt files, and create them automatically. The only problem I can see is that if the program is currently being recorded, the above program would try to comskip it too (and comskip stuff off the movie channels, which would be bad as well).
__________________
Server: AMD Phenom 2 920 2.8ghz Quad, 16gb Ram, 4tb Storage, 1xHVR-2250, 1 Ceton Cable Card adapter, Windows 7 SP1
Reply With Quote
  #253  
Old 09-27-2004, 05:00 PM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
ComSkip Version 0.31 Available Here!!!

This is just minor update that allows the path to comskip and the path to the mpeg to contain spaces. This is in response to a/an (upcoming?) change to Nielm's stv to correct a problem with Sage "forgetting" what the current working directory is.

For those developers out there: now that comskip doesn't have a problem with spaces, I HIGHLY recommend calling it with the FULL path of the exe and the mpeg.

Jere
Attached Files
File Type: zip comskip.0.31.zip (87.6 KB, 409 views)
File Type: zip comskip.0.31.src.zip (20.4 KB, 308 views)
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #254  
Old 09-28-2004, 04:02 PM
Gaurav's Avatar
Gaurav Gaurav is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Sugar Land, TX
Posts: 205
Hey Jere,
i had CA working perfectly before this latest update to comskip and Neilm's STV. Now it's throwing Dr Watson errors at random. All i get is a logo file and an empty txt file.
Reply With Quote
  #255  
Old 09-28-2004, 07:05 PM
Jere_Jones's Avatar
Jere_Jones Jere_Jones is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Jacksonville, FL
Posts: 993
Gaurav,

Search your drives for a file called comskip.exe.bat

If you find it, what is it's path? What happens if you run it?

Jere
__________________
Death to commercials!!!
Latest ShowAnalyzer Beta version: 0.9.7
Reply With Quote
  #256  
Old 09-28-2004, 09:04 PM
Gaurav's Avatar
Gaurav Gaurav is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Sugar Land, TX
Posts: 205
as it usually happens, the problem disappeared as soon as i posted it.
Reply With Quote
  #257  
Old 09-29-2004, 02:00 PM
rrussell's Avatar
rrussell rrussell is offline
Sage Aficionado
 
Join Date: May 2003
Posts: 290
Gaurav - that's the strangest looking cat avatar I have ever seen.
Reply With Quote
  #258  
Old 09-30-2004, 12:47 AM
TiltRod's Avatar
TiltRod TiltRod is offline
Sage User
 
Join Date: Dec 2003
Posts: 39
Send a message via AIM to TiltRod Send a message via MSN to TiltRod Send a message via Yahoo to TiltRod
Jere,

I am having a similar problem with the paths.

When I drag and drop the mpg onto comskip, it works like a charm. However, if i let sage background detect it hangs with a cmd.exe process.

I did a search for the comskip.exe.bat file and i found it on my D: drive. This drive is only used for backups and i don't understand why it is being created there. My Sage directory is on the c: drive. i "ass"ume that since the bat file is referencing ".\comskip.exe" it is not finding it to execute because it sees D:\ as the working directory. Is this correct. I haven't tried this yet, but i again assume that if i made a copy of comskip.exe on D: that it would work.

My issue is what in the code is sending it to a drive that doesn't contain either the sage directory structure nor my video files. Any help is appreciated.

-D

BTW this is in reference to 0.31 version
Reply With Quote
  #259  
Old 09-30-2004, 03:45 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Just FYI, there is a bug in nielm.stv v1.4 which stops background comm detect from working... Fixed in v.1.5
Reply With Quote
  #260  
Old 09-30-2004, 05:32 AM
Gaurav's Avatar
Gaurav Gaurav is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Sugar Land, TX
Posts: 205
Quote:
Originally Posted by rrussell
Gaurav - that's the strangest looking cat avatar I have ever seen.
it might be strange but at least i have one
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 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:41 AM.


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