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 07-17-2008, 07:33 PM
Tundra- Tundra- is offline
Sage User
 
Join Date: Feb 2005
Posts: 9
Workaround for divergent commercial skipping in Sage!

I've long since had an issue where commercial breaks don't seem to line up properly in Sagetv with the timestamps generated by Comskip or Showanalyzer...resulting in commercial skipping that is often significantly too far ahead or too far behind the end of the commercial break. (I don't use autoskip, but I suppose it would hose that also).

I've seen that some other people have noticed this as well. In some cases, people have indicated that switching from txt to edl or updating Tssplitter.ax or increasing the frequency of NTP clock syncs has helped. My situation seems to have nothing to do with any of that...and for the longest time I just ignored the issue assuming it was due to some rounding error or keyframe issue or clock sync issue or some other such mysterious thing.

Eventually, it annoyed me enough to take a much closer look -- after all, it seems silly to me that even with so much computing power and technology I can't even rely on being within a few seconds of a frame-precise comskip'd or Showanalyzer'd file.

In my case (other's cases may be quite different), I noticed that alternate media players would report a media file duration which was usually quite different than the scheduled sagetv recording time (note this has nothing to do with padding). For example, just about every recorded file I have shows up about 5 seconds shorter or longer than the sage media player shows on its timebar. 4-5 seconds isn't perfect, but is probably not a big deal. However, some shows are much worse than 5 seconds. Some extremely long files, such as 3-5 hour Tour de France stages , are off by up to 30 seconds or more by the end. This has an extremely negative impact on the accuracy of the commercial skipping within Sagetv -- even though the actual comskip/sa edls are perfectly accurate. The issue worsens as the show progresses as the Sagetv timeline diverges more and more from the 'real' timeline of the media file.

Evidently, my recordings are not being done at precisely 29.97 fps. I cannot say exactly what it is that makes the recording run long or short; however, after some pondering, it seemed apparent to me that if I were to go back and fudge the edl numbers to correspond to this ratio of 'scheduled duration' vs 'actual duration' it might be able to correct the issue.

Basically, I created a script which takes a file argument and calls a process to gather the media file's actual duration information and creation/last_modification timestamp information. (I'm currently using open source project MediaInfo (command line version at http://mediainfo.sourceforge.net to gather the duration info). It then parses that info and uses it to rewrite the edl with adjusted timestamps.

From my tests so far, it seems to solve my problem completely. I now have literally split-second accurate commercial skipping within sagetv! Since I kick off all of my comskipping with independent batch files and such, it is an easy matter for me to integrate this script into my normal comskip processing. It only takes a few seconds to run the skipfix after comskip/sa finishes analyzing the file.

It is of note that adjusting the edl timestamps could potentially break something else...perhaps media extenders or placeshifters could then have accuracy issues...or there may be issues specific to HD setups or nonMpeg2 files...I have no idea. But for my setup (windows, non-hd, pvr250s, server and client), it works great.

So, if you've experienced inaccurate skipping, take a look at your media files in an alternate player. If the duration differs from the sagetv player duration by even a few seconds, then you likely suffer from the same issue.
If someone else has an easier solution to this issue, let me know!
Otherwise, if people besides me are still having this problem, let me know and I'll clean up my code and post it.
Hopefully, with these and further insights, we'll find ways to squash this issue once and for all!


Tundra-

Last edited by Tundra-; 07-18-2008 at 06:40 AM.
Reply With Quote
  #2  
Old 07-18-2008, 10:02 PM
EmuZombie's Avatar
EmuZombie EmuZombie is offline
Sage User
 
Join Date: May 2006
Posts: 52
Thumbs up

I'd definately love to see this posted.

I'm having the same trouble. Durations differ by a few seconds, but like you said, after a few hours that ads up
Reply With Quote
  #3  
Old 07-19-2008, 06:28 AM
kevine kevine is offline
Sage Expert
 
Join Date: Aug 2007
Posts: 514
I'd like to see it too. Thanks.
Reply With Quote
  #4  
Old 07-19-2008, 01:05 PM
Tundra- Tundra- is offline
Sage User
 
Join Date: Feb 2005
Posts: 9
Here you go...short and sweet. I tried to clean it up a bit and add some comments.
Check the comments at the top of the script for info.

Tundra-
Attached Files
File Type: zip skipfix.zip (1.6 KB, 242 views)
Reply With Quote
  #5  
Old 09-27-2008, 07:45 AM
boonest boonest is offline
Sage User
 
Join Date: Sep 2008
Posts: 22
VB error

I love the idea, but can't get it to work. I get a VB error. Should I have a certain version of VB runtime installed? I'm using WinXP Pro. Also I am using Sagemc with comskip and would like to know if there is a way to have skipfix automatically run when comskip is done.

Thank you for your time and effort
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Videos that play in WMP choke Sage? wirecreative SageTV Software 1 02-22-2008 03:44 PM
Sage DVD player skipping chapters randomly pratt733 SageTV Software 0 03-12-2007 01:08 PM
USB-UIRT does not transmit with Sage 5. Albert Hawking Hardware Support 2 06-18-2006 03:45 PM
Sage UI disappears during playback Keith SageTV Software 17 03-03-2006 03:31 AM
my new favorite way to configure nvidia card for sage aoehlke Hardware Support 0 11-22-2005 11:15 AM


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


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