[FFmpeg-devel] [PATCH] Add support for writing VBR MP3 tags
Sat May 30 13:00:13 CEST 2009
On Sat, May 30, 2009 at 10:59:21AM +0000, Jai Menon wrote:
> On Sat, May 30, 2009 at 10:06 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, May 30, 2009 at 06:39:47AM +0000, Jai Menon wrote:
> >> On Fri, May 29, 2009 at 9:24 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Fri, May 29, 2009 at 07:51:08PM +0000, Jai Menon wrote:
> >> >> On Fri, May 29, 2009 at 7:22 PM, Jai Menon <jmenon86 at gmail.com> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > As in subject.
> >> >>
> >> >> Slightly modified version attached.
> >> >
> >> > I dont see how this code could work
> >> > example, stream copy from mpeg-ps -> .mp3
> >> Well, that would require a vbr tag writer which constructs the avg.
> >> bitrate toc. During my experiments, the bitrate changes were not
> >> visible in the muxer. So this, I think would require more work.
> > AVPacket.size and duration should provide the rate ...
> Stream duration is zero in this case so this doesnt work. or is there
> some other duration value?
AVPacket.duration is 0 ?
maybe that should be fixed, else, well its pretty much a constant for mp*
frame_size also might help
> >> Anyway, patch was meant to address one issue for the time being. I
> >> hope someone can write a more general solution.
> > i cannot accept the hack in the lame mp3 encoding wraper, its not part
> > of a correct solution, its just a step in the wrong direction, that is
> > code we would have to remove later.
> Okay, so is this acceptable :
> - mp3_write_header checks if the input stream is vbr and writes an
> empty frame after the header
how would mp3_write_header() do that?
> - mp3_write_packet updates the bitrate toc for the vbr tag
> - mp3_write_trailer patches in the vbr tag
> also, where should this code be? in a separate file?
is there a disadvantage putting it in libavforat/mp3(enc).c ?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel