[Libav-user] video bitrate control far from accuracy

谭艳梅 tanyanmei at shineon.cc
Thu Jul 17 11:00:59 CEST 2014


Hey guys,
    I'm transcoding with ffmpeg API .  but the video frame rate of  the target file is far from accuracy .
such as I wanna to get a target file with h263 encode type and 22kbps  video frame rate, but I get a  result file with  video bitrate  26kbps, h263 encode type , which is far from accuracy . 
 I   test it  using ffmpeg.exe official release  with the same source file and  the same paremeter for  target file, but   get the same result.   
why I cann't get the set video bitrate  under CBR mode? Is there any body know this ?


here are concrete information:   
my source file parameter is :
video: encode type : wmv3    resolution ratio: 176*144     bitrate: 2000kbps    framte rate:25fps
audio: encode type: wmav2   bitrate: 128kbps         sample rate:  48k Hz      channels: 2       


my target file parameter is :  
video:  encode type: h263      resolution ratio: 176*144,      bitrate: 22kbps,    frame rate: 5fps
audio:  encode type:amr-nb    bitrate 6kbps, Mono,            sample rate 8kHz   channels: 1


I use ffmpeg.exe to transcode as follows:
ffmpeg.exe -i cq-SD.wmv  -vcodec h263 -r 5 -b:v 22k -ar 8000 -s 176*144 -acodec libopencore_amrnb -ac 1 -b:a 8k 44.3gp


and also I use ffmpeg API to transcode with the encode parameter set as follows:
AVCodecContext * c = st->codec;
       br = 22000;
c->codec_id = codec_id;
 c->width = 176;
        c->height = 144;
 c->bit_rate = 22000;
        c->rc_min_rate = br;
        c->rc_max_rate = br;
c->time_base.den = 5;
        c->time_base.num = 1;
       
but the result file I get is like this:
video:  encode type: h263      resolution ratio: 176*144,      bitrate: 26kbps,    frame rate: 5fps
audio:  encode type:amr-nb    bitrate 6kbps, Mono,            sample rate 8kHz   channels: 1
 
Any advice will be appreciated!
Thanks!




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140717/d8b5deb7/attachment.html>


More information about the Libav-user mailing list