[mythtv] [PATCH] better GOP detection for HDTV

Jason Hoos jhoos at thwack.net
Wed Dec 17 01:38:34 EST 2003


From: "Doug Larrick" <doug at ties.org>:
>I finally found the real cause of an old problem -- that we weren't
>seeing GOP markers for some video streams.  This is Jason Hoos's
>"pcHDTV GOP detection fix" patch from Oct. 30, where he had simply
>declared every 15th frame to be GOP if we weren't seeing the markers.
>
>It turns out that's because the GOP marker was not within the first
>MPEG-TS packet for these streams.  We now continue searching in video
>stream TS packets until we see the first video slice marker, which per
>the MPEG standard is after all the "interesting" header markers.  Patch
>is attached.

I'll try this out tomorrow night on the station that was originally causing
the problems for me and let you know what happens.  I'm a little leery
though, because I recall that the problem I had wasn't that the code wasn't
seeing the GOP markers, it was that they didn't exist at all.  I actually
inspected the stream manually looking for the 000 00 01 b8 bytes at the
time, and either they weren't there, or they were consistently split across
packet boundaries in a way that a grep of od's output couldn't find them.  I
was able to find them on the other station I get though.  I also think that
at some point I ran across something on the web (which of course I failed to
bookmark) that did allude to GOP markers being an optional part of the MPEG
spec, although who knows how accurate that source was.  Hopefully it'll work
though.

Looking forward to trying the new seeking stuff too. :)

Jason



More information about the mythtv-dev mailing list