[mythtv] mythtranscode -> avi

Geoffrey Hausheer mythtv0368 at phracturedblue.com
Thu Aug 19 19:29:57 EDT 2004

Sorry it's taken me so long to reply.  Moving across the country will do that.

On Thu, 05 Aug 2004 11:56:54 -0700, Chris Petersen wrote:
> (semi-repost)
> There has been a lot of talk lately about getting mythtranscode to
> export other formats (any supported by libaviformat, or whatever it's
> called), but the devs decided that there really wasn't much of a need
> for effort to be put into this because other tools do it well enough on
> their own.
> However, since mplayer (and transcode, and ffmpeg) still continue to NOT
> support myth's nuv files, there is currently no way to convert an nuv
> file to an avi file without transcoding/reencoding.  This is the single
> most oft-asked-about feature for nuvexport, and frankly it would allow
> for more standardized transoding options (ie. could use "transode" for
> all conversions, since it seems to have slightly faster and better
> quality output than nuvexport's "normal" options).

I assume you want to translate from mpeg4-nuv->divx (or some other
mpeg4 container) right?

> In the rewrite of nuvexport, I'd like to be able get away from the
> somewhat complex set of exporters (particularly the "transode" and
> non-transcode versions of the same output format).  This would also open
> the door for using the files more easily with nuv->dvd programs.

This is something different (converting mpeg4->mpeg2).  I don't think
we really want to go there.

> And please correct me if I'm wrong, but having mythtranscode do the avi
> conversion instead of mencoder (if it is ever made to work) would also
> allow myth's meta data to stay in the file (title/subtitle/description
> at the very least)

In theory, though there should be an easy way of doing that today as well.

> Anyway, this email is basically me asking/begging/pleading for someone
> who knows the mythtranscode code to implement the avi container output
> (I guess that would also mean having the ability to specify an outfile),
> since I've gathered that it should be relatively easy to do so.  I'm
> also hoping to get an official "ok" about this idea, since it'd be nice
> to know that any patches would get accepted.

Well, that would probably be me, and I just don't have time for it. 
You still haven't given me a convincing argument (I can see the
argument for nuv(MPEG4)->xvid) but for anything that actually requires
changing the stream, not so much.  Fundamentally mythtranscode can do
2 things (1) write valid NUV formats, and (2) decode NUV streams to
raw data.  In both situations it has teh capability to physically
remove commercial segments from the stream.

That last bit is what makes doing container modifications difficult. 
Basically, we can't get frame-level accuracy around cut-points in any
other container except NUV.  I've looked at lots of options, and they
are all pretty messy (the one I finally settled on was the easiest at
the time, though perhaps not, in the end, the best choice)

As for doing conversions of the stream, that requires two steps
(writing a valid container, and doing the actual format conversion). 
The work I did for MPEG2 commercial-clipping was a step towards
supporting multiple containers, but it has never worked reliably.  It
is quite difficult to make libavformat write out valid MPEG2
containers (due to how padding, DTS and PTS is handled.  this may have
improved since last time I looked at it).  I've never looked at other
containers, but they are perhaps easier (or not).  Once the container
handling is done, reencoding the audio/video shouldn't be too
difficult.  However I don't see much point in it, since there are
other tools specifically designed for encoding that will be more
flexible than mythtranscode is likely to be.

So, I guess I'm saying that it isn't someting I'll have time for, or
see much need for.  But I guess you knew that already.


More information about the mythtv-dev mailing list