[mythtv-users] Solved: CC (and maybe Teletext) to DVD

Anthony Zawacki azmail at thezawackis.com
Tue Feb 26 17:36:02 UTC 2008


faginbagin wrote:
>>> Anyway, I have come up with an alternative approach. I've tinkered with
>>> mythburn.py (the 0.20.2 version). One of the things I've done is to
>>> create chapter marks using the commercial marks mythcommflag stores in
>>> the database. As a result, you can use your DVD remote's skip buttons to
>>> bypass the commercials. I'm planning to include a patch for anyone who's
>>> interested. I skimmed the latest code in trunk, and I think there's a
>>> good chance my patch might apply cleanly to the latest mythburn.py
> 
>> Using this information, shouldn't it be possible to create the dvd in a
>> way that the default movie would then automatically skip the commercials
>> by arranging the chapter order?  You would still have the commercials on
>> the dvd in unreferenced chapters, but you would still get captions and
>> the movie would play straight through.
> 
> That's a thought, although I'm not sure it can be done with dvdauthor.
> Maybe some other tool?

Unfortunately, I don't have a direct example, but I believe that it is 
possible.  It should be able to be done using the <pre> or <post> tags 
for the <pgc>.

> Another thought I had would be to cut commercials from the "final.mpg"
> created after the CC based subtitle stream has been added. I don't know
> if a mythtv utility can do this and preserve the subtitles, but perhaps
> another tool, combined with a SQL query of the mythtv database to get
> the commercial marks?

I'm less familiar with how captions work than mpeg files in general. 
However, when I get home tonight, I will experiment with gopchop to see 
if captions survive cutting out commercials with it.  The last time I 
looked at gopchop, it didn't support EDLs (Edit Decision Lists, which is 
essentially the list of commercials to be cut) but that was quite some 
time ago.

> FWIW, the IVTV VBI data stream headers have their own time base, very
> different from the time base of the video and audio streams. I suspect
> the tools that demux and remux the video and audio streams aren't using
> the time stamps in MPEG2 stream headers. At least, they don't look like
> consistent sources of time stamps. I suspect the tools rely more on
> frame counts and fps. That's one reason why I think doing commercial
> cutting using the original recording would be tricky. So far, I've only
> figured out how to decode the stream headers, not the stream data, so I
> have no idea where frames begin and end.

My understanding, in a simplistic manner, is that MPEG has a Group Of 
Pictures (GOP) which basically is a frame that is the complete picture, 
and then a series of diffs to this first frame.  So, if you cut on a GOP 
marker, you can cut from there to the next GOP marker losslessly.  But 
how the subtitles are folded into the GOPs, I don't know.  I'm fairly 
confident that some subtitles will survive cutting a recording using 
gopchop.  I'm not confident in what the result will be as I could see 
several different possibilities, worse case the subtitles are not cut, 
and they get further and further off with each subsequent cut in the 
video stream.

Anthony




More information about the mythtv-users mailing list