[MEncoder-users] mencoder apparently not obeying video bitrate settings

Eric A erpo41 at gmail.com
Mon Jul 21 07:21:58 CEST 2008


Hi,

The problem:
I'm using a program called DeVeDe to create video DVDs from AVI files,
but the final ISO files it generates are always around 2GB, regardless
of the target mpeg2 video bitrate setting. When I try to play the
resulting DVDs on my set top DVD player (or my friend's set top DVD
player), the video appears choppy, almost as if frames are being
dropped. When I use vlc to play the ISO file on my computer, the video
appears basically OK but occasionally stutters.

The troubleshooting so far:
DeVeDe uses mencoder as a backend, so I began troubleshooting by
finding the options DeVeDe uses and running mencoder with those
options from a console. Here is a transcript:


---BEGIN TRANSCRIPT---
$ /usr/bin/mencoder -oac lavc -ovc lavc -of mpeg -mpegopts
format=dvd:tsaf -ofps 24000/1001 -vf
expand=576:324:0:10,scale=720:480,harddup -lavcopts
vcodec=mpeg2video:trell:mbd=2:sc_threshold=1000000000:cgop:vstrict=0:vrc_maxrate=8476:vrc_buf_size=1835:vbitrate=8000:keyint=15:acodec=ac3:abitrate=224:aspect=16/9
-o /home/eric/movie_01_01.mpg input.avi

MEncoder 2:1.0~rc2-0ubuntu13 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU     T9300  @ 2.50GHz (Family: 6,
Model: 23, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x2bb6b000
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [XVID]  576x304  24bpp  23.976 fps  765.9 kbps (93.5 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:576x304  fps:23.98  ftime:=0.0417
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [scale w=720 h=480]
Opening video filter: [expand w=576 h=324 x=0 y=10]
Expand: 576 x 324, 0 ; 10, osd: 0, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
VDec: vo config request - 576 x 304 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.89:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
[swscaler @ 0xdd9330]SwScaler: BICUBIC scaler, from yuv420p to yuv420p
using MMX2
[swscaler @ 0xdd9330]SwScaler: using 4-tap MMX scaler for horizontal
luminance scaling
[swscaler @ 0xdd9330]SwScaler: using 4-tap MMX scaler for horizontal
chrominance scaling
[swscaler @ 0xdd9330]SwScaler: using n-tap MMX scaler for vertical
scaling (YV12 like)
[swscaler @ 0xdd9330]SwScaler: 576x324 -> 720x480
videocodec: libavcodec (720x480 fourcc=3267706d [mpg2])
[VE_LAVC] High quality encoding selected (non-realtime)!
Full DR not possible, trying SLICES instead!
Writing header...
INITV: 0.200, 0.158, fps: 23.976
Full DR not possible, trying SLICES instead!min   0mb  A-V:0.000 [0:0]
Pos: 598.2s  14343f (11%) 55.91fps Trem:  33min 2224mb  A-V:0.050 [3253:224]
Flushing video frames.
Writing index...

Overhead: 2.353% (6117542 / 260009818)
Writing header...

Video stream: 3253.169 kbit/s  (406646 B/s)  size: 243264922 bytes
598.223 secs  14343 frames

Audio stream:  224.000 kbit/s  (28000 B/s)  size: 16760576 bytes  598.592 secs
---END TRANSCRIPT---

I hit ^C when mencoder was about 11% finished. The output file size
was 255MB, so the full file would have been around 2300MB, far too
small considering the video bitrate was set to 8000kbps.

My first thought was that since mpeg2 is a patent-encumbered format,
mencoder on Ubuntu 8.04 might be crippled in some way, but I could
find no evidence for this.

So, any thoughts?

Cheers,
Eric



More information about the MEncoder-users mailing list