Log in

View Full Version : encoding with ffmpeg - final result is bigger with enabled B-Frames


may24
20th May 2010, 11:59
Hi all,

I got a capture from my tv-card in mpeg-2 + AC3 -> .ts which I want to convert to Xvid + mp3 -> .avi

Here is my cmd:
ffmpeg-rev23170 -i "capture-19052010.ts" -s 640x480 -vcodec libxvid -qscale 3 -bf 2 -b_qfactor 1.5 -b_qoffset 1.0 -acodec libmp3lame -ab 192000 -aq 2 "capture-19052010.avi"

I first tried the whole thing without: "-bf 2 -b_qfactor 1.5 -b_qoffset 1.0". Doing so, no B-Frames will be generated and the resulting file was aprox. 56 MB in size.
Then I added the parameters to have b-Frames enabled and in order to save some bytes, but instead the final file size was 57 MB.

Well, the qscale 3 should encode I and P frames with a constant quantizer of 3 but given b_qfactor & b_qoffset the BVOP quant should be around 4.5 and 5.5 (AVG(past VOP quant, future VOP quant) * quant ratio + quant offset)
But it doesn't. Actually it seems that setting those parapeters have no effect at all ...

Is this a bug or am I missing something ?

Here is my analysis with avinaptic:

[ About file ]

Name: capture-19052010.avi
Date: 19/05/2010 22:17:25
Size: 58,276,210 bytes (55.577 MB)

[ Generic infos ]

Play duration: 00:03:52 (231.773208 s)
Container type: AVI OpenDML
Number of streams: 2
Type of stream nr. 0: video
Type of stream nr. 1: audio
Audio streams: 1
ISFT: Lavf52.62.0
JUNK: odmldmlhø

[ Relevant data ]

Resolution: 640 x 480
Width: multiple of 32
Height: multiple of 32
Average DRF: 3
Standard deviation: 0
Std. dev. weighted mean: 0

[ Video track ]

FourCC: xvid/xvid
Resolution: 640 x 480
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 24:23 = 1.043478
Display aspect ratio: 32:23 = 1.391304
Vprp aspect ratio: 32:23 = 1.391304
Framerate: 23.976023 fps
Number of frames: 5557
Stream size: 52,089,353 bytes
Bitrate: 1797.942165 kbps
Qf: 0.244105
Key frames: 470 (0; 13; 24; 36; 50; ... 5551)
Null frames: 2 (2; 3)
Min key int: 1
Max key int: 14
Avg key int: 11.823404
Delay: 0 ms

[ Audio track ]

Audio tag: 0x55 (MP3)
Bitrate (container): 192 kbps VBR
Channels (container): 2
Sample rate (container): 44100 Hz
Chunks: 8873
Stream size: 5,824,131 bytes
Preload: 26 ms
Max A/V diff: 99 ms
Type: MPEG-1 Layer III
MPEG frames: 8873
Play duration: 00:03:52 (231.784489 s)
Bitrate (bitstream): 201.018834 kbps VBR
Chunk-aligned: Yes
Emphasis: none
Mode: joint stereo
Delay: 0 ms

[ About MPEG4 encoding ]

User data: DivX503b1393p
User data: XviD0050
Packed bitstream: Yes (*)
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Custom pixel shape (24:23 = 1.043478)
Quant type: H.263
Number of frames: 5557
Drop/delay frames: 2
Corrupted frames: 0

I-VOPs: 470 ( 8.456 %) ##
P-VOPs: 2210 ( 39.763 %) ##########
B-VOPs: 2876 ( 51.745 %) #############
S-VOPs: 0 ( 0.000 %)
N-VOPs: 0 ( 0.000 %)

Max consecutive B-VOPs: 2
1 consec: 1212 ( 59.295 %) ###############
2 consec: 832 ( 40.705 %) ##########

[ DRF analysis ]

Average DRF: 3
Standard deviation: 0
Max DRF: 3

DRF<3: 0 ( 0.000 %)
DRF=3: 5556 (100.000 %) #########################
DRF>3: 0 ( 0.000 %)

I-VOPs average DRF: 3
I-VOPs std. deviation: 0
I-VOPs max DRF: 3

P-VOPs average DRF: 3
P-VOPs std. deviation: 0
P-VOPs max DRF: 3

B-VOPs average DRF: 3
B-VOPs std. deviation: 0
B-VOPs max DRF: 3

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: 23.976023 <> 25
Min buffer fill: 80%

This report was created by AVInaptic (18-11-2007) on 20 mag 2010, h 00:14:50