[FFmpeg-devel] [PATCH] Re: FLV1 codec; video bitrate not set

Michael Niedermayer michaelni
Fri Jan 30 17:17:18 CET 2009


On Wed, Jan 28, 2009 at 08:18:03PM +0100, Stefan de Konink wrote:
> Stefan de Konink wrote:
>> Should I prepare a patch or is there more going on?
>
> A little bit more :) The first patch adds the right video bitrate to the 
> right location.
>
>
> The second patch would be a fix, that someone should decide if it is 
> 'right' or not. Should we store *only* the videobitrate to the 
> videodatarate variable?
>
> If this is accepted I would also propose to set the audiodatarate. I didn't 
> test the encoder side; decoder is tested.
>
>
> Signed-off-by: Stefan de Konink <stefan at konink.de>
>
>
> Stefan

[...]

> Index: libavformat/flvenc.c
> ===================================================================
> --- libavformat/flvenc.c	(revision 16847)
> +++ libavformat/flvenc.c	(working copy)
> @@ -214,7 +214,7 @@
>          put_amf_double(pb, video_enc->height);
>  
>          put_amf_string(pb, "videodatarate");
> -        put_amf_double(pb, s->bit_rate / 1024.0);
> +        put_amf_double(pb, video_enc->bit_rate / 1024.0);
>  
>          put_amf_string(pb, "framerate");
>          put_amf_double(pb, framerate);

likely missing regression test update


> Index: libavformat/flvenc.c
> ===================================================================
> --- libavformat/flvenc.c	(revision 16847)
> +++ libavformat/flvenc.c	(working copy)
> @@ -224,6 +224,9 @@
>      }
>  
>      if(audio_enc){
> +        put_amf_string(pb, "audiodatarate");
> +        put_amf_double(pb, audio_enc->bit_rate / 1024.0);
> +
>          put_amf_string(pb, "audiosamplerate");
>          put_amf_double(pb, audio_enc->sample_rate);
>  

same

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090130/d6a2c26c/attachment.pgp>



More information about the ffmpeg-devel mailing list