[FFmpeg-trac] #288(avcodec:new): Theora encode bitrate bug.
FFmpeg
trac at avcodec.org
Mon Jun 20 15:18:06 CEST 2011
#288: Theora encode bitrate bug.
---------------------+------------------------
Reporter: igor | Type: defect
Status: new | Priority: important
Component: avcodec | Version:
Keywords: | Blocked By:
Blocking: | Reproduced: 0
Analyzed: 0 |
---------------------+------------------------
In ./libavcodec/libtheoraenc.c:
{{{
t_info.target_bitrate = avc_context->bit_rate;
}}}
It's wrong!
Right way is:
From ffmpeg2theora
(http://svn.xiph.org/trunk/ffmpeg2theora/src/ffmpeg2theora.c)
{{{
/*Account for the Ogg page overhead.
This is 1 byte per 255 for lacing values, plus 26 bytes per
4096 bytes for
the page header, plus approximately 1/2 byte per packet
(not accounted for
here).
*/
t_info.target_bitrate = (int) (64870 * (ogg_int64_t)avc_context->bit_rate
>> 16);
}}}
Attach small path
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/288>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list