[mythtv] Changeset 12847 - Add TS support to mythtranscode

Geoffrey Hausheer mythtv0368 at phracturedblue.com
Thu Feb 22 23:55:41 UTC 2007

On 2/22/07, Paul Harrison wrote:
> One change I did make to mythreplex was to work around a problem when
> mythtranscode is used to remove commercials from an mpeg2 file and  then
> mythreplex is the used to split the file. After each cut the audio gets
> further and further out of sync. My understanding from an explanation
> from Daniel is that the length (in time) of the audio and video packets
> don't always match up at the cut points. mythtranscode must allow for
> this by changing the time codes around cut points because the resulting
> file plays fine but when the file is split these differences add up and
> after 5 or more cuts there is quite a noticeable sync difference. Is
> there any way mythtrancode could keep track of these differences and
> compensate for them so the hack in mythreplex to compensate could be
> removed?
It's not really possible to do this properly (which is why I didn't)
because the framerates are different between audio and video.  This is
one reason why mythtranscode was written in the first place, since all
other utilities seem to split the stream losing the timecodes in the
process before doing manipulation.  If you told me what you did to
hack around the issue, I my be able to do something similar, but if
the input stream is broken (and I've seen lots of those) I believe it
will be very hard to do properly (basically requires re-encoding the

It would be better if I understood why you needed to split the streams
in the 1st place, as this is generally a poor way to deal with MPG,
which is specifically designed to use the PES packets for


More information about the mythtv-dev mailing list