[MEncoder-users] Trouble with enabling B-frames for DVD-compliant MPEG-2

Giacomo Comes comes at naic.edu
Tue Oct 2 01:05:32 CEST 2007


On Tue, Oct 02, 2007 at 12:27:56AM +0200, Francois Visagie wrote:
> Dear List,
> 
> I am using MEncoder 1.0rc1-3.4.2 on Windows for making DVD-compliant
> encodes. The trouble I'm having is that it crashes when I enable B-frames
> with vmax_b_frames<>0. By process of elimination, the only way to prevent it
> from crashing is to remove from -lavcopts both vrc_buf_size=1835 and
> vrc_maxrate=9800, which are necessary for DVD compliance.
> 
> The command line I'm using - with a nice high bitrate due to the shortness
> of the movie - is:
> 
> mencoder %1 -aspect 4/3 -mc 0 -noskip -vf hqdn3d=2:1:2,harddup -ovc lavc
> -oac lavc -lavcopts
> aspect=4/3:ildct:ilme:keyint=15:vbitrate=7345:vb_strategy=1:vcodec=mpeg2vide
> o:vmax_b_frames=1:vpass=1:vrc_buf_size=1835:vrc_maxrate=9800:vstrict=0:acode
> c=ac3:abitrate=128:psnr -of mpeg -mpegopts format=dvd:tsaf -o %OUTPUT%
> 
> The bitrate has no influence on this behaviour - either I have to disable
> B-frames, which hurts quality, or I have to remove the above two -lavcopts
> which breaks DVD compliance.
> 
> When MEncoder crashes in this way, it doesn't do it very informatively. The
> display shows:
> ---
> MEncoder 1.0rc1-3.4.2 (C) 2000-2006 MPlayer Team
> CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13,
> Stepping: 8)
> 
> CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
> Compiled with runtime CPU detection.
> c:\windows\fonts\arial.ttf doesn't look like a bitmap font description,
> ignoring
> .
> Cannot load bitmap font: c:\windows\fonts\arial.ttf
> success: format: 0  data: 0x0 - 0xf205000
> AVI file format detected.
> AVI_NI: No video stream found.
> libavformat file format detected.
> VIDEO:  [dvsd]  720x576  0bpp  25.000 fps  28800.0 kbps (3515.6 kbyte/s)
> [V] filefmt:35  fourcc:0x64737664  size:720x576  fps:25.00  ftime:=0.0400
> ==========================================================================
> Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
> Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> ==========================================================================
> 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: [hqdn3d=2:1:2]
> ==========================================================================
> Opening video decoder: [dshow] DirectShow video codecs
> Decoder supports the following YUV formats: YUY2 UYVY
> Decoder is capable of YUV output (flags 0x9)
> VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
> [PP] Using codec's postprocessing, max q = 4.
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> VDec: using Packed YUY2 as output csp (no 0)
> Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 1
> SwScaler: reducing / aligning filtersize 9 -> 8
> 
> SwScaler: BICUBIC scaler, from yuyv422 to yuv420p using MMX2
> SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
> SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
> SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like)
> SwScaler: 720x576 -> 720x576
> videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
> VideoDecoder::SetExtAttr: registry failure
> Selected video codec: [qdv] vfm: dshow (Sony Digital Video (DV))
> ==========================================================================
> Limiting audio preload to 0.4s.
> Increasing audio density to 4.
> Writing header...1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
> INITV: 0.200, 0.160, fps: 25.000
> Pos:   0.1s      3f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
> ---
> 
> At which point the Microsoft "mencoder.exe has encountered a problem and
> needs to close.  We are sorry for the inconvenience." error dialogue is
> displayed.
> 
> I've searched this list's archives but found no posts that link the use of
> these options with B-frames as a cause of crashing.
> 
> Does anybody have a fix or work-around to suggest for this, please?
> Alternatively I'd be happy to post a full bug report with detailed stack
> dump from that Microsoft dialogue, just let me know.

The problem you are experiencing is a known issue of 1.0rc1.
It as been fixed many months ago in svn.
If you use a more recent version from svn you wont have the crash.

Ciao
Giacomo



More information about the MEncoder-users mailing list