[MPlayer-users] Low bitrate using 2-pass with libavcodec

marcogi at libero.it marcogi at libero.it
Sun Apr 21 00:33:31 CEST 2002


Hallo,

I'm try to make some test encoding a dvd.
I made first and second pass using:
mencoder -dvd 1 -aid 131 -ovc frameno -lameopts q=4 -o frameno.avi
mencoder -dvd 1 -oac copy -vop scale=512:256,crop=720:346:0:112 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=785:vhq:vme=5:vqmin=2 -pass 1 -o pass1.avi

Everything seems to work.
But, when I try to do thirth pass mencoder drops video bitrate to about one
half I set. The bitrate seems stable around 780 for the first frames; after
about 300 frames bitrate drops quikly to 370. The obtained video quality
is visibly lower then first pass one.
Here the command:

mencoder -v -dvd 1 -oac copy -vop scale=512:256,crop=720:346:0:112 -ovc lavc
-lavcopts vcodec=mpeg4:vbitrate=785:vhq:vme=5:vqmin=2 -pass 2 -o pass2.avi

MEncoder CVS-020416-00:06-3.0.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

Reading /home/marco/.mplayer/codecs.conf: 30 audio & 81 video codecs
CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices Athlon TB Thunderbird (Type: 6, Stepping: 2)
extended cpuid-level: 6
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Not an URL!
Detected AVI file format!
list_end=0x146
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
list_end=0xD4
list_end=0x146
list_end=0x6D61398
VIDEO:  [FrNo]  0x0  24bpp  25.00 fps  145.2 kbps (17.7 kbyte/s)
Using pass3 control file: frameno.avi
libdvdcss debug: GetASF authenticated
libdvdcss debug: already authenticated
Reading disc structure, please wait...
There are 3 titles on this DVD.
There are 15 chapters in this DVD title.
There are 1 angles in this DVD title.

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000135
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000001c7
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00001070
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x00313fae
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x00314005
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x003239aa
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x00323a01
libdvdcss debug: vts key initialized
libdvdread: Elapsed time 0
libdvdread: Found 3 VTS's
libdvdread: Elapsed time 1
DVD successfully opened!
[open] audio stream: 0 audio format: ac3 language: en aid: 128
[open] audio stream: 1 audio format: ac3 language: es aid: 129
[open] audio stream: 2 audio format: ac3 language: fr aid: 130
[open] audio stream: 3 audio format: ac3 language: it aid: 131
[open] number of audio channels on disk: 4.
[open] subtitle ( sid ): 0 language: el
[open] subtitle ( sid ): 1 language: en
[open] subtitle ( sid ): 2 language: es
[open] subtitle ( sid ): 3 language: fr
[open] subtitle ( sid ): 4 language: hr
[open] subtitle ( sid ): 5 language: it
[open] subtitle ( sid ): 6 language: iw
[open] subtitle ( sid ): 7 language: pt
[open] subtitle ( sid ): 8 language: en
[open] subtitle ( sid ): 9 language: es
[open] subtitle ( sid ): 10 language: fr
[open] subtitle ( sid ): 11 language: it
[open] number of subtitles on disk: 12
DVD start cell: 0  pack: 0x0-0x409AF  
DVD start=0 end=3223297  
success: format: 0  data: 0x0 - 0x89780800
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x409AF  
Angle-seek synced! skip=0  new_lba=0x0  
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x828eac8  
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x828eac8  
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x828eac8  
Checking for MOV
DEMUXER: freeing demuxer at 0x828eac8  
Checking for VIVO
header block 1 size: 0
DEMUXER: freeing demuxer at 0x828eac8  
Checking for REAL
DEMUXER: freeing demuxer at 0x828eac8  
DEMUXER: freeing demuxer at 0x828eac8  
DEMUXER: freeing demuxer at 0x828eac8  
DEMUXER: freeing demuxer at 0x828eac8  
DEMUXER: freeing demuxer at 0x828eac8  
DEMUXER: freeing demuxer at 0x828eac8  
system stream synced at 0xD (0)!
==> Found video stream: 0
Detected MPEG-PS file format!
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 2)  25.00 fps  10375.0 kbps (1296.9 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
libavcodec: CPU flags: mmx mmxext 3dnow
Opening video filter 'scale' with args '512:256'...
SwScale: 512 x 256
Opening video filter 'crop' with args '720:346:0:112'...
Crop: 720 x 346, 0 ; 112
==========================================================================
Opening Video Decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576, Mpeg PES  
[PP] Sorry, postprocessing is not available
vo_debug: query(Mpeg PES) returned 0x0 (i=0) 
SwScale: -1 x -1
vo_debug: query(Mpeg PES) returned 0x0 (i=0) 
Sorry, selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening Video Decoder: [libmpeg2] MPEG 1/2 Video decoder v2.0
libmpeg2: Using MMXEXT for IDCT transform
libmpeg2: Using MMXEXT for motion compensation
VDec: vo config request - 720 x 576, Planar YV12  
[PP] Sorry, postprocessing is not available
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(Planar YV12) returned 0x441 (i=0) 
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(Planar I420) returned 0x441 (i=1) 
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(Planar IYUV) returned 0x441 (i=2) 
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
video_out->init(720x576->768x576,flags=0,'MPlayer',0x32315659)
crop->config() called
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
REQ: flags=0x441  req=0x400  
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
SwScale scaling 720x346 Planar YV12 to 512x256 Planar YV12  
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 6
SwScaler: reducing / aligning filtersize 7 -> 6

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
SwScaler: using 8-tap MMX scaler for horizontal luminance scaling
SwScaler: using 8-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 720x346 -> 512x256
REQ: flags=0x401  req=0x0  
videocodec: libavcodec (512x256 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
crop->config() return 1
Detected video codec: [mpeg12] drv:1 prio:0 (MPEG 1 or 2)
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=18084 sample=0)
Writing AVI header...
XXX initial  v_pts=0.000  a_pos=8928 (0.504) 
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytesms 0/6
D/S 0/0 
*** [scale] Exporting mp_image_t, 720x346x12bpp YUV planar, 373680 bytes
*** [lavc] Allocating mp_image_t, 512x256x12bpp YUV planar, 196608 bytes
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytesms
0/14 D/S 0/0 
==> Found audio stream: 128 0fps Trem:   0min   0mb  A-V:0.000 [0:0] A/Vms
0/28 D/S 0/0 
==> Found audio stream: 129
==> Found audio stream: 130
==> Found audio stream: 131
==> Found subtitle: 5 0%)  32fps Trem:  76min 405mb  A-V:0.000 [410:154] A/Vms
0/28 D/S 0/2  
Pos: 462.8s  11572f ( 7%)  30fps Trem:  78min 457mb  A-V:0.000 [464:147] A/Vms
0/28 D/S 0/2
Writing AVI index...
Fixup AVI header...

Video stream:  464.442 kbit/s  (58055 bps)  size: 26867960 bytes  462.800 secs
11572 frames

Audio stream:  147.478 kbit/s  (18434 bps)  size: 8540304 bytes  463.272 secs

*** free_stream() called ***

--
Regards,  Marco Gigante
Student at Pisa University - Computer Engineering




More information about the MPlayer-users mailing list