[mythtv] ConvertX MPEG2

Chris Pinkham cpinkham at bc2va.org
Thu Apr 5 18:10:43 UTC 2007

* On Thu Apr 05, 2007 at 03:51:16PM +0200, Troels Blum wrote:
> I have been using MythTV for over 2 years. During this time hoping for
> MPEG2 support with Plextor's ConvertX (TV402U). 
> It seems that nobody is working on it, even though it has been requested
> from time to time in the forums. So now I think that maybe I should take
> a look at it.

I just ordered a M402U card from tigerdirect that should be here in a
few days.  One of the things that was going to be added to my already-long
TODO list was to investigate using it with MPEG-2 instead of MPEG-4.

> So first of all: 
> Is anybody working on MPEG2 support with the go7007 chip? 

Not that I know of.

> Could I get some pointers to get started:
> What would be the best (MythTV) way to implement it? Should it be a new
> device "USB MPEG2" or options for the ConvertX device?

I think the preferred method is going to be to enhance the software
encoder (aka NuppelVideoRecorder) to allow it to spit out mpeg-ps files
as an option to the existing .nuv nuppel files.  I have a working patch
that already does this, allowing creation of mpeg-ps files containing
MPEG-2 video and MP2 or AC3 audio, but it isn't finished and needs a bit
more testing.  I haven't worked on this lately, but did recently bring it
up to current SVN so it should apply fairly cleanly to recent SVN trunk

I could see MPEG-2 support for the Go7007 driver being added in 2 steps.
The first and probably easiest by far is to just add MPEG-2 support in
the existing .nuv nuppel files.  That would confirm the MPEG-2 capture is
working fine and stable.  Once that is done, then the large process of
allowing NVR to write out other container formats such as mpeg-ps files.

> I'm guessing the the implementation should NOT go in NuppelVideoRecorder
> since it would not go in a Nupple container. So should the
> implementation go in libmythtv/mpegrecorder.cpp, or somewhere completely
> different?

I've considered the possibility of changing NuppelVideoRecorder to
SoftwareRecorder or some other more appropriate name if/when I ever
finished and committed this multi-format patch.  Possibly the best
name might be avformatrecorder.cpp since this is really a complement
to avformatdecoder.cpp.  My current patch uses the libavcodec code to
encode the audio instead of lame as NVR currently does.  The other
recorders are all receiving streams which they write out virtually
unchanged.  NVR (or whatever it is called) actually has to create the
container itself from the raw or precompressed frames it is grabbing.
So, a avformatrecorder.cpp containing the AvFormatRecorder class might
be more appropriate if we did decide to do a rename down the line.

If  you want to talk about this more off-list, feel free to email me
directly and I can work with you some on this.  Once you/we have
MPEG-2 video working in the .nuv container, we could go further down
the path of writing out different container formats.  My current patch
is hacked together, but does work.  I've successfully used the 'lossy'
side of mythtranscode to transcode HD recordings off of my air2pc cards
down to a mpeg-ps file with MPEG-2 video and the original AC3 audio
and the files play correctly on my D-Link DSM-320 UPNP client.


More information about the mythtv-dev mailing list