[mythtv] Changeset 12847 - Add TS support to mythtranscode
mythtv0368 at phracturedblue.com
Sat Feb 24 18:04:21 UTC 2007
On 2/24/07, Paul Harrison wrote:
> I need to split the files as part of the DVD creation process used by
> MythArchive. There's several reasons it's done . One is so I can use
> mplex to remux the video and audio streams back together adding the NAV
> packets needed to create the DVD.
Mythtranscode can (well, should be able to) do this while keeping the
> Second in order to create compliant
> DVD's in ntsc countries the mp2 audio stream needs to be converted to
> ac3. It also allows us to pick and choose which audio stream(s) to use
> in the DVD if there are several available to pick from.
Yes, this capability doesn't otherwise exist today, but could be added
to mythtranscode. One of the reasons I didn't write an mp2->ac3
translator is that in my experience the AC3s written by liba52 are not
compatible with many standalone DVD players. This may have changed
since last time I looked at it a couple years ago though. I'll add
these items to my todo list.
> The hack used in mythreplex detects jumps in the pts and either inserts
> or deletes audio frames to compensate. If an audio frame needs to be
> added then a blank (silent) frame is encoded and inserted. If a frame
> needs to be removed then the frame is just skipped over when writing the
Yes...well, I thought that was too much work, which is why I didn't do
it to mythtranscode, but since you've already written the code, it
should likely be moved from replex to mythtranscode. I'll look into
> If you now repeat the process from step 3 and add '--fix_sync' to the
> mythreplex command which enables the hack you should see a file where
> everything stays in sync at least that is what I see.
Well, I don't think you'll be able to get exact frame-syncing this
way, but you should be able to keep it within ~ 0.008 sec (for mp2
based streams. ac3 based ones should be able to be kept within ~0.001
sec) which should be sufficient.
DVD does, in theory, support PTS jumps, though I have no idea how well
supported it is. Fixing the audio PTS is certainly going to be more
> One user said it
> makes things worse not better for files that have been run though
> mythtranscode --mpeg2 twice though.
That's not good. It sounds like a bug to me. mythtranscode should
not apply any transformations if you feed it its own output as an
Anyhow, thanks for the explanation. I would like to work to remove
the dependency of mythreplex/mplex for mytharchive by adding the
requisite functionality to mythtranscode, but it'll have to wait till
I have some time to devote to looking at it.
More information about the mythtv-dev