[mythtv] Why nuppelvideo mpeg4?

Torbjörn Jansson torbjorn.jansson at mbox200.swipnet.se
Mon Aug 8 16:49:11 EDT 2005

Reza Naima <mailto:reza at reza.net> wrote:
> On Mon, Aug 08, 2005 at 08:40:57PM +0200, Torbjörn Jansson
> sent me this...
>> mythtv-dev-bounces at mythtv.org <> wrote:
>>> I was wondering why we are using the nuppelvideo container for
>>> mpeg4? It can't be hard to convert to a different format - nuv2avi
>>> works great. Why is it that we're not using avi's (for example)
>>> rather than nuv's to store the files?
>> Because the avi file format does not have timestamps, it asumes a
>> fixed frame rate. And avi files are not designed to be streamed
>> (atleast not in the same way as nuv).
> Is there another file format that does, and is more
> useable/friendly?

I don't know.
The existing nuv format works just fine.
I don't see any reason to change it.

> Why is it that mythtv works fine with mepg2 output of pvr's?
> Why can't
> it work just as well with the standard mpeg4 file?

Because for mpeg2 (dvb and pvr cards) the stream that comes from the card is
already compressed in mpeg2 so mythtv doesn't have to do much work.
And with mpeg2 the nuv file is just a mpeg2 file with the extension nuv
instead of mpg.

For mpeg4/rtjpeg the nuv file format is completly different than for mpeg2.

>>> How hard would it be (and are there any reasons no to) modify the
>>> code such that it will generate more friendly mpeg4 files?
>> Hard.
> Well, the mpeg4 is a result of transcoding from mpeg2 (in my case).

(not for me)

>>> p.s. what is all the seek information in the DB for?  why isn't
>>> that in the video file itself? 
>> Because the file may not have finished recording and it might be
>> mpeg2 
> I'm confused.  So the seek information is only added _after_
> the show is
> recorded?

No, the seektable is built as the file is recorded and is written to the db.
Remeber we have 2 different type of files, mpeg2 (ts or ps) and mpeg4/rtjpeg
The seektable is added to the file at the end of the recording if the file
is a nupplevideo type (mpeg4/rtjpeg)

For mpeg2 the seek table information is left in the database.

> It can't be added in real-time?  How about a transcode
> function where it is then added to the file and removed from the
> database? 

See above.

> My personal goals are to :
> 	- remove the DB dependance for generated files


> 	- remove the need to transcode/convert the mpeg4 to another
> 	  format if i want to move it to another device for playback
> 		(mostly for archival purposes)

Asuming the recording finished normaly and the backend did not crash or
something like that, the mpeg4 nuv file should contain everything needed to
play it back.

And if the file is a mpeg2 nuv, you should be able to use almost any
mediaplayer to play it back, for example vlc.

More information about the mythtv-dev mailing list