[mythtv-users] Commercial Detection

Brian J. Murrell brian at interlinx.bc.ca
Fri Apr 17 16:28:22 UTC 2015


On Fri, 2015-04-17 at 11:14 -0400, Tom Dexter wrote:
> 
> Years ago it was almost
> flawless,

Indeed -- and still is pretty good under some conditions... (more on
that below)

> but I think the broadcasters have made changes over the
> years that have started tripping it up a bit.

My uninformed opinion on it is that it's the framerate changes (i.e.
between the "content" and the commercials -- some commercials are at a
different rate than the content which is usually consistent) that are
present in digital broadcasts that are tripping it up.

I had a look at the commdetect code a long time ago and it seemed to me
that it was reading the framerate from the beginning of the recording
and assuming that it was constant (i.e. not checking in every frame)
through to the end and then setting up the commercial markers based on
that framerate.  But when the actual framerates change, that fouls it
all up.

The evidence leading to my hypothesis (other than that look into the
code a long time ago) is that commercial detection worked wonderfully
when I was recording analog cable using PVR-150/250/500 cards, which did
record at a constant framerate.  It went way down hill when I started
capturing clear qam, where the framerate could be clearly seen as
changing by playing those recording with mplayer, for example.

Commercial detection seems to have gotten a lot better again now that I
am transcoding all of my (i.e. mpeg2) digital recording captures into
h.264 and at the same time forcing the framerate to be constant again.
I then run a pass of commercial detection over the resulting
constant-rate h.264 encoding.

Cheers,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150417/8e5757a4/attachment.sig>


More information about the mythtv-users mailing list