[mythtv] [PATCH] MP3 options for TV recording

Torbjörn Jansson torbjorn.jansson at mbox200.swipnet.se
Mon Dec 8 15:39:59 EST 2003


> > I think this will cause problems with the directshow filters I did.
> > Currently it uses some hardcoded defaults of 128Kbit and 
> CBR, I haven't
> > tried this patch so I don't know for sure.
> > 
> > Using directshow to convert a nuv file to avi (no 
> recompression, direct
> > streaming) will probably make the avi file contain invalid 
> information about
> > the mp3 stream. Maybe it will cause problems on normal playback too.
> > 
> > So I think that it might be nessesary to extend the nuv 
> file format to
> > contain atleast the bitrate and if its cbr/vbr/abr.
> 
> Hmm, every MPEG audio frame has (at least) the bitrate for 
> that frame in
> the frame header, so presumably the decoder should base it's 
> decoding off
> that.. What is being hardcoded?
> 

The MPEGLAYER3WAVEFORMAT struct.
At first I didn't use that struct and that created problems when converting
a nuv file directly to avi, the avi mux filter didn't accept more than one
sample and then aborted.

I don't know exactly how this struct is used and how the decoder uses it but
the bitrate can be viewd in the mp3 decoder filters propertypage and some of
the other stuff from that struct.

Take a look at:
http://cvs.sourceforge.net/viewcvs.py/dsmyth/MythTVReader/DSMyth/NuvReader.c
pp?rev=1.11&view=auto

in CNuvReader::GetAudioType

> It shouldn't matter to the decode side at all what options it 
> was encoded
> with, it should just take each frame and handle whatever bitrate it
> sees. So I'm not sure I see the value to add cbr/vbr/abr, 
> since the only
> difference on the decode side is potentially different 
> bitrates for each
> frame. 
> 
> But I'm no MPEG expert :)
> 

Neighter am i.

> (Happy to try out the directshow filter to see what it does..)
> 

It woud be great if you coud test it.
For example using vbr and some bitrate other than 128 and then try to
convert a nuv file via graphedit to a avi file.
You coud also try and see what virtualdub says about the resulting avi file
since it usualy complains if there is any problems with the mp3 header.



More information about the mythtv-dev mailing list