[mythtv] transcoder documentation.

Geoffrey Hausheer ou401cru02 at sneakemail.com
Sat Aug 9 09:25:38 EDT 2003

On Fri, 08 Aug 2003 21:26:45 -0700, "Chris Petersen
lists-at-forevermore.net |mythtv/1.0-Allow|"
<o8f8hesx3k0t at sneakemail.com> said:
> > > the second method can be used on already transcoded files, and only the
> > > frames immediately following a cut section will be reencoded (thus there
> > > is very minimal quality loss)
> > is this true?   I've been waiting for this feature for a long time, but
> > there's been no info in mythtranscoder about it - heck, mythtranscoder
> > doesn't even tell me what format to give the starttime in.
> ok, so mythtranscoder uses the myth time format:  YYYY-MM-DDTHH:MM:SS (T
> being an actual letter T).
> Anyway, I ran this, and it started transcoding.  and by the speed
> (slow), I'm pretty sure it wasn't merely cutting things.
> back to waiting for more info...

Would I lie? :)  Yes it is true.  However, it is slow because it still
decodes every single frame.  Also, it hammers on the threadwriter.  I see
lots of waiting for IO messages (which are irrelevant).  To use this
feature you must specify a profile which is identical to the input
format, and use --honorcutlist.  It shouldn't be too difficult to get rid
of most of the decodes, since the transcoder usually knows ahead of time
whether a frame needs to be decoded or not.  It has been something I've
been planning on for a while, and I will eventually get around to adding
that feature.  Even still it should run significantly faster than when it
is doing full processing, since encoding is significantly slower than
A note of caution: I wouldn't delete your old files immediately.  The
method I chose for adjusting key-frames due to the commercial cut works
great for me, but it will generate files which are incompatible with
mencoder (until the mencoder patch is updated).  Also, that code is a bit
overzealous, and tends to do naughty things if there are a lot of
skippend frames in a recording (I think the correct thing to do in this
case is add a 'no-change' frame, but currently it just renumbers the
frame, leading to the audio and video getting out of sync.  This is
usally unnoticable, unless there are lots of skipped frames, but it is
still something that needs to be fixed.  Lastly, I still haven't istalled
my PVR250 (My system really doesn't like change, and seems to be working
well as it is), so I have done no testing of MPEG2 streams.  Of course,
there is no MPEG2 encoder in mythtv, so the 'remove-commercial' part
won't work unless also transcoding to MPEG4 or RTJpeg. 

Oh yeah, and I don't recommend using mythtranscode from the command-line
if your goal is to remove the commercials (or do anything else where the
result will be used by mythtv).  The commercials keys are stored in the
DB, and need to be removed once the commercials are deleted.  mythbackend
(the transcode polling thread) normally takes care of that, but only if
it is running, and controlling the transcoder.  I would recommend instead
using 'x' from watching a recording, or if you want to do it in bulk, add
entries to the 'transcoding' table with a status of '-2' (this indicates
'retry', and the polling thread will automaticallly pick it up and start
the transcoder.  Of course the transcoder must be enabled (via running
'setup' and setting the correct sawitches)

  Geoffrey Hausheer

More information about the mythtv-dev mailing list