Improving commercial break skip support for MythTV
#46
the xbmc calculated times are rounded down in this code:
Code:
strBuffer += StringUtils::Format("%.3f\t%.3f\t%i\n", (float)(m_vecCuts[i].start / 1000),
                                               (float)(m_vecCuts[i].end / 1000),
                                               m_vecCuts[i].action == MUTE ? 1 : 0);

This is in the WriteMPlayerEdl function in xbmc/cores/dvdplayer/Edl.cpp

The calculation is down between 2 integers and then casted to a float. That is why all the times end in 000.


For commercial skips that start seconds too early are mainly caused in longer shows, or shows with more variability to their frame rate. And also the initial reported frame rate.

The EDL code in xbmc assumes a constant framerate. So for longer shows the error is increased later in the show.

By using the milliseconds that mythtv now provides for the marks the xbmc code should not have to calculate the time of the mark, it can just write it to the EDL file.

But whatever method is used, the WriteMplayerEdl function will always truncate the time to .000 unless that function uses floats to calculate instead of ints.

Change:
Code:
(float)(m_vecCuts[i].start / 1000)
to
Code:
(float)m_vecCuts[i].start / 1000

And you should get the desired results.
Reply
#47
Reading through this thread again (with no baby in my lap) I see that on page 2 nerddtvg has posted a patch to get the information from mythtv's recordedseek table.
Reply
#48
Looks like that patch is included in cmyth v1.8.13 and later. See https://github.com/fetzerch/xbmc-pvr-add...its/master re: Oct 6, 2013 commits.

I will check more rigorously later, but my strong impression is that commercial skips are coming in several seconds early, even when the ad is just a few minutes into a show. I note, however, that I updated to myth .27 only about a week ago, and if the behaviour has changed since .26, I may not yet have noticed it.
Reply
#49
After scouring more of my logs. I am finding that the scene markers (using milliseconds) are coming from mythtv correctly and being put into the cutlist vector fine. I will have to try to watch some of these recordings back on myth as well as xbmc to see if they skip at the same spots. I also have not looked yet into the accuracy of the mythtv millisecond offsets in longer shows.

However the final output of the EDL file will still cause up to about 1 second early skips due to the casting issue.
Reply
#50
I can tell you that, running both Myth and XBMC on a mac (OS X), the commercials skip perfectly, as long as they are marked correctly. I only have the early skip issue with XBMC on the Pi.

On the Pi it also freezes up momentarily before the skip, whereas it is a smooth transition on a mac in both Myth and XBMC.
Reply
#51
floyduww, see http://forum.xbmc.org/showthread.php?tid...pid1555821
Reply
#52
Sorry to resurrect this thread if a fix has been posted elsewhere, but I am seeing this behavior with XBMX 13.1 for Android on Amazon FireTV with the cmyth plugin that is installed automatically. I am running MythTV 0.27 on Ubuntu server 14.04. Is there a fix that has been identified? I find that not only do the skips start early, but they don't necessarily end accurately either. Sometimes this skip ends with a few seconds of commercials left (no big deal) but sometimes the skip ends a second or two into the show which I would like to avoid. Should I just make some changes to advancedsettings.xml?
Reply
#53
I just upgraded to MythTV 0.27.1 from 0.26, and any new recording gets the commercial skipping right now. Anything under 0.26 is messed up for commercial skips that was recorded from cable, anything OTA is good.

Was the 0.27 an upgrade, or fresh install? What type of capture device are you using?
Reply
#54
(2014-06-23, 20:45)tdavis Wrote: I just upgraded to MythTV 0.27.1 from 0.26, and any new recording gets the commercial skipping right now. Anything under 0.26 is messed up for commercial skips that was recorded from cable, anything OTA is good.

Was the 0.27 an upgrade, or fresh install? What type of capture device are you using?

This is a fresh install of 0.27. I am using HDHR Plus for OTA. I also have an old HDHR Dual for my 3rd and 4th tuners, but have not had enough programs recording at once yet that MythTV has tried to record on those tuners.
Reply
#55
Just to follow up, this seems to have improved after turning off h.264 transcoding on my HDHR Plus. In fact the overall performance and stability of XBMC on Fire TV is improved after turning off transcoding. Something about the h.264 profile used by Silicon Dust doesn't agree with XBMC, Android, the Fire TV or a combination of the three.
Reply

Logout Mark Read Team Forum Stats Members Help
Improving commercial break skip support for MythTV0