[MEncoder-users] Wrong colors after conversion

Bram bram at mencoder.as.avontuur.org
Wed Jan 23 14:22:17 CET 2008


Hi,

I have an AVI file which i converted to H264 using mencoder. Red colors
in the input video turn out blue in the output video. Using ffmpeg, this
problem does not occur.

The mencoder version used is the svn snapshot of 2008.01.14.

The input movie can be found here (13MB): 

http://bram.name/~brama/test_colors.avi

It seems the input color scheme is rgb555, according to ffmpeg -i.

Is this a bug? Or can I detect & prevent this problem? Mencoder works fine
with many other input video files, though this is the only one I've tried 
with rgb555 colorspace.

Conversion command:

#pass 1
IN=test_colors.avi
TMPOUT="${IN}.tmp.mp4"
WIDTH=320
HEIGHT=240
BITRATE=450
mencoder "$IN" -quiet -sws 9 -of lavf -lavfopts format=mp4 \
  -vf scale=$WIDTH:$HEIGHT,dsize=$WIDTH:$HEIGHT,harddup \
  -ovc x264 \
  -x264encopts bitrate=$BITRATE:vbv_maxrate=1500:vbv_bufsize=2000:\
nocabac:me=umh:trellis=1:level_idc=30:global_header:\
threads=2:pass=1:turbo \
  -oac faac \
  -faacopts mpeg=4:object=2:br=160:raw -channels 2 -srate 44100 -o "$TMPOUT"
#pass 2
  mencoder "$IN" -quiet -sws 9 -of lavf -lavfopts format=mp4 \
  -vf scale=$WIDTH:$HEIGHT,dsize=$WIDTH:$HEIGHT,harddup \
  -ovc x264 \
  -x264encopts bitrate=$BITRATE:vbv_maxrate=1500:vbv_bufsize=2000:\
nocabac:me=umh:subq=6:frameref=6:trellis=1:level_idc=30:global_header:\
threads=2:pass=2 \
  -oac faac \
  -faacopts mpeg=4:object=2:br=160:raw -channels 2 -srate 44100 -o "$TMPOUT"


Here follows some version & compile information:

mencoder version information:

MEncoder dev-SVN-r25750-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Xeon(R) CPU            5130  @ 2.00GHz (Family: 6, Model:
15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Configure options:

--prefix=$MYPREFIX/mplayer-svn \
--win32codecsdir=$MYPREFIX/lib/win32 \
--with-extraincdir=$MYPREFIX/include \
--with-extralibdir=$MYPREFIX/lib

Configure output:

  Byte order: little-endian
  Optimizing for: pentium-m

  Languages:
    Messages/GUI: en
    Manual pages: en  

  Enabled optional drivers:
    Input: ftp pvr tv-teletext tv-v4l2 tv-v4l tv libdvdcss(internal) dvdread(internal) vcd dvb network 
    Codecs: x264 xvid libamr_wb libamr_nb libavcodec qtx real xanim win32 faad2 faac libmpeg2 libdca liba52 mp3lib libtheora tremor(internal) libmad 
    Audio output: oss sdl mpegpes(dvb) 
    Video output: sdl pnm jpeg mpegpes(dvb) fbdev xvidix cvidix opengl x11 xover md5sum tga 
    Audio filters: 
  Disabled optional drivers:
    Input: dvdnav vstream radio tv-dshow live555 nemesi cddb cdda smb 
    Codecs: libdv musepack speex toolame twolame liblzo gif 
    Audio output: sun alsa openal jack pulse esd arts v4l2 ivtv dxr2 nas 
    Video output: v4l2 ivtv dxr3 dxr2 vesa gif89a png zr zr2 svga caca aa ggi xmga mga winvidix 3dfx dga xvmc xv dfbmga directfb bl xvr100 tdfx_vid s3fb tdfxfb 
    Audio filters: ladspa 

System info (linux x86_32):
Linux foo 2.6.21.1 #3 SMP PREEMPT Wed Sep 12 15:53:04 CEST 2007 i686 GNU/Linux
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

Best regards,
Bram



More information about the MEncoder-users mailing list