fo0d Wrote:Well I did some more testing with a recording that had all the commercials correctly marked by verifying in mythtv frontend. I found that XBMC was skipping them but there was a delay like what pbjr said.
I started XBMC up, went to just before the commercial, stopped the recording, enabled debug logging, restarted XBMC and started the recording. At 13:07 the commercial starts, 13:08 the recording pauses for a slight second then resumes again and at 13:20 its skips to the end of the commercial break.
http://pastebin.com/m2855e863
Thanks for the log. After reviewing it there are a few things at play here:
1) The current functionality "autowinds" into the commercial break by 2 seconds, e.g. skips 2 seconds after the start of the break was detected by MythTV, and starts playing again 2 seconds before the end of the break was detected by MythTV. This is why you see the commercial break start at 13:07 but the seek doesn't start until just after 13:08.
2) Seeking in mpegts files is heinously bad after ~2Gb into the file for some reason. 13:07 shouldn't of hit that marker for what you were playing though. I'm assuming that normal seeking works fast for you still <20 minutes into the recording - can you confirm? Automated seeking later in the mpegts file might be slower - it is for us. Seeking at the start is a snap, and then later in the file it goes really slow (
http://trac.xbmc.org/ticket/6009)
3) The current automated seeking is done "accurately". This was to match the existing Seek method, but that seems to have changed. I can change this and that should make things faster. I will test for a little bit longer and then commit this change.
What do people think is a better option for how to resolve 1? I have found that MythTV seems to identify the start of the recording a bit too early sometimes leading us to wonder if that really was the start of a commercial break. We have found that the end is generally quite accurate but marked a bit too late so we miss the first few seconds.
I can create some advanced settings for "autowind" with sensible defaults so people can tweak them as they need to based on how well mythcommflag is marking commercial breaks.
Perhaps after 3 is changed people can see comment on how things are working for them before I make any changes to 1.