[mythtv-users] Video flagged with mythcommflag shows as "not

Andrew Dodd atd7 at cornell.edu
Thu Feb 12 19:02:14 EST 2004


Quoting Chris Pinkham <cpinkham at bc2va.org>:

> > I'm having a weird problem that I can't figure out.
> > 
> > For some reason, any video I've flagged with mythcommflag (I changed
> detection
> > methods because spurious noise wreaks havoc with blank frame detection)
> shows as
> > "not flagged" when I try to skip commercials in 0.14.
> 
> Just to verify your setup.  Are you using just scene-change detection
> and have the "Try Unflagged" setting OFF right?
> 
> I think there may be a place in the code that assumes you have a
> blank-frame
> map and if you use just scene-change detection you won't have one.
Actually, that appears to be the case.

I'm using scenechange + blank frame detection.  I would just use BFD, except
that there's a noise source that puts small but bright bands of static on the
screen that screw with the blank frame detection mode.  The end result is that
on many programs, not a single blank frame is detected.

The offending code is in libmyth/NuppelVideoPlayer.cpp:
-------------
bool NuppelVideoPlayer::DoSkipCommercials(int direction)
{
    if (( ! hasblanktable) ||
        (livetv) ||
        (watchingrecording && nvr_enc && nvr_enc->IsValidRecorder()))
    {
        hasblanktable = false;
        hascommbreaktable = false;
        LoadBlankList();
        if (!blankMap.isEmpty())
        {
            hasblanktable = true;
            blankIter = blankMap.begin();
            commBreakMap.clear();
        }
    }
----------
In short, if there are no blank frames, the commercial skip code will nuke any
existing commercial flag table.  Kind of nonsensical behavior to me.

I simply removed the ( ! hasblanktable) and it seems to be working now.  I think
in the case of an autoflagged episode of something I recorded on CBS, I was
lucky that a blank frame was actually detected.

Hopefully in a week or so this will be a nonissue - Cablevision dropped the
price of their broadcast basic package down to $7/month, which finally made me
decide to get cable instead of working on improving my antenna.  (I'll
eventually have to work on the antenna later though...  It's simply too
borderline for HD reception atm.  :)  Blank frame detection is (in my
experience) much more accurate than scenechange detection in situations where
the blank frames can be easily identified.

I'd send a patch to the dev list, but I don't know enough about the code to know
if that tweak would have any unintended side effects.



More information about the mythtv-users mailing list