<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>I would like to do CBR H264/AAC with libav like the following command line, is it possible? I need file with constant size.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>To set the bitrate seems not to work.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#010001'>pAVCodecContext</span><span style='font-size:10.0pt;font-family:"Courier New"'>-><span style='color:#010001'>bit_rate</span> = <span style='color:#010001'>video_bitrate</span>;</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>ffmpeg.exe -i D:\test\conv256\20130211_043000.ts -acodec libfaac -vcodec libx264 -s 360x288 -vb 256k -ab 32k D:\test\conv256\20130211_043000_3.mp4<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>ffmpeg version 0.7-rc1, Copyright (c) 2000-2011 the FFmpeg developers<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  built on May 30 2012 16:33:26 with gcc 4.6.2<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  configuration: --enable-shared --disable-static --enable-memalign-hack --enable-nonfree --enable-l<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>ibmp3lame --disable-debug --enable-libfaac --enable-libx264 --enable-librtmp --build-suffix=20120530<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> --enable-gpl --prefix=/2012-05-30 --extra-cflags=-I/local/include --extra-ldflags=-L/local/lib --ta<o:p></o:p></span></p><p class=MsoNormal>rget-os=mingw32<o:p></o:p></p><p class=MsoNormal>  libavutil    50. 40. 1 / 50. 40. 1<o:p></o:p></p><p class=MsoNormal>  libavcodec   52.120. 0 / 52.120. 0<o:p></o:p></p><p class=MsoNormal>  libavformat  52.108. 0 / 52.108. 0<o:p></o:p></p><p class=MsoNormal>  libavdevice  52.  4. 0 / 52.  4. 0<o:p></o:p></p><p class=MsoNormal>  libavfilter   1. 77. 0 /  1. 77. 0<o:p></o:p></p><p class=MsoNormal>  libswscale    0. 13. 0 /  0. 13. 0<o:p></o:p></p><p class=MsoNormal>[mpeg2video @ 01f564c0] mpeg_decode_postinit() failure<o:p></o:p></p><p class=MsoNormal>    <span lang=EN-US>Last message repeated 1 times<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[mpegts @ 0098abd0] max_analyze_duration reached<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Input #0, mpegts, from 'D:\test\conv256\20130211_043000.ts':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  Duration: 00:05:00.04, start: 55627.633700, bitrate: 6128 kb/s<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  Program 1537<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    Stream #0.0[0x78]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 15000 kb/s,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>25 fps, 25 tbr, 90k tbn, 50 tbc<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    Stream #0.1[0x82](fra): Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[buffer @ 0261b310] w:720 h:576 pixfmt:yuv420p<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[scale @ 02433a60] w:720 h:576 fmt:yuv420p -> w:360 h:288 fmt:yuv420p flags:0xa0000004<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] broken ffmpeg default settings detected<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] use an encoding preset (e.g. -vpre medium)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] preset usage: -vpre <speed> -vpre <profile><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] speed presets are listed in x264 --help<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] profile is optional; x264 defaults to high<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[libx264 @ 01f55890] 264 - core 114 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0x1:0 me=dia subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=4 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=0 keyint=12 keyint_min=7 scenecut=0 intra_refresh=0 rc_lookahead=12 rc=abr mbtree=1 bitrate=256 ratetol=1.0 qcomp=0.50 qpmin=2 qpmax=31 qpstep=3 ip_ratio=1.25 aq=1:1.00<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Output #0, mp4, to 'D:\test\conv256\20130211_043000_3.mp4':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  Metadata:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    encoder         : Lavf52.108.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    Stream #0.0: Video: libx264, yuv420p, 360x288 [PAR 64:45 DAR 16:9], q=2-31, 256 kb/s, 25 tbn, 25<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> tbc<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    Stream #0.1(fra): Audio: libfaac, 48000 Hz, stereo, s16, 32 kb/s<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Stream mapping:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  Stream #0.0 -> #0.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  Stream #0.1 -> #0.1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Press [q] to stop encoding<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>frame=  370 fps= 97 q=31.0 Lsize=    1487kB time=14.72 bitrate= 827.6kbits/s dup=6 drop=0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>video:1362kB audio:115kB global headers:0kB muxing overhead 0.647599%<o:p></o:p></span></p></div></body></html>