[MEncoder-users] Black/gray showing as completely black.

Mike Smith perlfu at gmail.com
Tue Jan 9 16:09:21 CET 2007


Recently I've been trying to convert an xvid encoded avi into a
dvd-compliant mpeg.

Here's some information on the xvid video I'm using:

Playing [Pino-no-Usagi]_Ergo_Proxy_18_[5D0FBCD3].avi.
get_path('sub/') -> '/root/.mplayer/sub/'
[file] File size is 182697984 bytes
STREAM: [file] [Pino-no-Usagi]_Ergo_Proxy_18_[5D0FBCD3].avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x2292
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 37020   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  704 x 396
==========================
list_end=0x10F4
==> Found video stream: 0
ID_VIDEO_ID=0
====== STREAM Header =====
Type: vids   FCC: xvid (64697678)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 2997/125 = 23.976
Start: 0   Len: 37020
Suggested BufferSize: 170840
Quality 10000
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 704
  biHeight 396
  biPlanes 1
  biBitCount 24
  biCompression 1145656920='XVID'
  biSizeImage 1672704
===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x2186
==> Found audio stream: 1
ID_AUDIO_ID=1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 24000/576 = 41.667
Start: 0   Len: 64335
Suggested BufferSize: 12096
Quality -1
Sample size: 576
==========================
Found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 24000
Block align: 576
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=576
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
==========================================================================
list_end=0x2292
AVI: dmlh found (size=248) (total_frames=37020)
list_end=0x22D2
hdr=Software  size=44
Software  : VirtualDubMod 1.5.10.2 (build 2540/release)
list_end=0xAD1A828
Found movie at 0x280C - 0xAD1A828
Reading INDEX block, 74029 chunks for 37020 frames (fpos=181512240).
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x2F4C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=143828050 (37020) audio size=37056960 (64335)
VIDEO:  [XVID]  704x396  24bpp  23.976 fps  745.2 kbps (91.0 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:704x396  fps:23.98  ftime:=0.0417
Clip info:
 Software: VirtualDubMod 1.5.10.2 (build 2540/release)
ID_CLIP_INFO_NAME0=Software
ID_CLIP_INFO_VALUE0=VirtualDubMod 1.5.10.2 (build 2540/release)
ID_CLIP_INFO_N=1
get_path('sub/') -> '/root/.mplayer/sub/'
ID_FILENAME=[Pino-no-Usagi]_Ergo_Proxy_18_[5D0FBCD3].avi
ID_DEMUXER=avi
ID_VIDEO_FORMAT=XVID
ID_VIDEO_BITRATE=745200
ID_VIDEO_WIDTH=704
ID_VIDEO_HEIGHT=396
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=192000
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=1544.04
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
ID_VIDEO_CODEC=ffodivx
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
^MMPEG 1.0, Layer III, 48000 Hz 192 kbit Stereo, BPF: 576
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
ID_AUDIO_BITRATE=192000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: Null audio output
AO: Author: Tobias Diedrich <ranma+mplayer at tdiedrich.de>
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
ID_AUDIO_CODEC=mp3
Starting playback...
[ffmpeg] aspect_ratio: 1.777778
VDec: vo config request - 704 x 396 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7778
VO Config (704x396->704x396,flags=0,'MPlayer',0x32315659)
VO: [null] 704x396 => 704x396 Planar YV12

Using the following syntax:

mencoder -ovc lavc -oac lavc -of mpeg -mpegopts
format=dvd:tsaf:telecine:vaspect=16/9 -vf
pullup,softskip,expand=720:480,dsize=16/9,harddup -srate 48000 -af
lavcresample=48000 -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:acodec=ac3:
abitrate=192:vstrict=0:aspect=16/9:vpass=1 -ofps 24000/1001 movie.avi
-o movie.mpg

mencoder -ovc lavc -oac lavc -of mpeg -mpegopts
format=dvd:tsaf:telecine:vaspect=16/9 -vf
pullup,softskip,expand=720:480,dsize=16/9,harddup -srate 48000 -af
lavcresample=48000
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:trell:mbd=2
subcmp=10:cmp=10:dia=-10:predia=-10:dc=10:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9:
vpass=2 -ofps 24000/1001

The result looks great when played back with mplayer, but when I
actually burn it to dvd and
view the video on various players it comes out fairly dark, and not
just dark... in many cases
when there is an area in the movie that contains a lot of darker grays
it displays as totally
black.  It's almost hard to see what's going on.  Is there something
in my encoding options
that's missing/wrong that could be causing this?

Thanks in advance,
Mike Smith.



More information about the MEncoder-users mailing list