[mythtv-users] software encoding to MPEG2

Chris Pinkham cpinkham at bc2va.org
Tue Sep 25 01:58:21 UTC 2007


* On Mon Sep 24, 2007 at 03:58:17PM -0400, Tom Metro wrote:
> I'm thinking of installing an analog capture card that has no hardware 
> encoder (Philips SAA7130 tuner) to capture shows on the rare occasion 

> While I'm sure I can always rig up a custom transcoder to post-process 
> the videos to MPEG2, I was wondering if it is possible to encode them as 
> MPEG2 in the first place. The wiki seems to suggest that MPEG4 and 
> RTjpeg are the only options for built-in software encoders.

The Wiki is correct, currently you can only software-encode to MPEG-4
and RTjpeg.  It is a 2-part issue.  You have the encoding method and
the container format.  I made some modifications to SVN a while back to
allow MPEG-2 data in .nuv files, but didn't hook up the GUI parts.  This
code was part of a larger patch that I'm working on to use libavformat
and libavcodec to allow generating mpeg-ps and .flv files from the
software encoder.  I have a working patch, but it needs a bit more glue
and quite a bit more testing before it is SVN-worthy.

I used to have a pair of mvpmc boxes, but sold them in favor of using
a couple msntv2 boxes since they can be full-featured frontends.  If
you email me off-list, I can give you a test MPEG-2/mp3 mpeg-ps file
to test on your mvmpmc box.  That will let me know whether my current
patch is generating mpg files usable by the mvpmc.  I have played
them successfully on my DSM-320 UPNP box.  I also have it generating
.flv files that are playable in a web browser, I just need to work out
an issue in the audio rate conversion code since flv only supports
specific audio rates.

My current code is pretty invasive because it breaks out the file
writing portions of NuppelVideoRecorder into new FileWriter,
AVFormatWriter, and NuppelWriter classes which handle all the
writing.  I've used it with my Plextor ConvertX to test writing to
a mpeg-ps container format and also with mythtranscode to transcode
HD video down to SD resolutions while keeping the mpeg-ps container
format.  As part of this I'm also working on code to keep the AC3
audio without having to downconvert to stereo mp3 in the new file.
Given all that, it's not ready for testers yet, so don't bother asking. :)

--
Chris


More information about the mythtv-users mailing list