[mythtv-users] Commercial Removal Before Final Transcode?

John Pilkington J.Pilk at tesco.net
Fri Oct 31 20:41:50 UTC 2014


On 31/10/14 20:17, Brian J. Murrell wrote:
> On Fri, 2014-10-31 at 15:42 -0400, jim wrote:
>> I have read numerous discussions on this topic - many so old I wonder if
>> they have been overcome by events. What is the current best way to
>> remove commercials prior to transcoding to the target format? I have the
>> commercial flagging start when the recording starts and review of the
>> recording in MythTV reveals that most of the commercials are skipped.
>
> I am jealous.  Most of my recordings are mixed-framerate so mythcommflag
> does not accurately record where the commercials are.  It finds them
> accurately enough but because it assumes a single framerate, the markers
> end up being placed at the wrong times/frames.
>
> It has been mentioned previously that framerate changes are now recorded
> in the markup file (which IIRC is the same file that the commercial
> start/stop flags are recorded in) so I think, in theory, that one could
> even fix up the start/stop markers by just reading that file and
> adjusting the existing commercial markers for the framerate changes and
> not even having to touch the mythcommflag code.
>
> Of course this is the less-than-ideal solution, but ISTM that it should
> be possible.  I just have not had time to actually test it out.  I
> probably have to figure out how the framerate markers are recorded
> first.  I seem to recall looking at them before and it not being obvious
> (to a non-video-processing guy) how they were indicating what the
> frame-rate was.
>
> Somebody please let me know if I'm crazy with that idea.
>
> Cheers,
> b.

The seektable now gives, for every keyframe, the frame number, the time 
into the recording and the byte offset.  I don't know whether 
mythtranscode now uses all that, but it ought to be enough. See mythutil 
--help.

John P






More information about the mythtv-users mailing list