[MEncoder-users] Help with mencoder/mplayer not reading AVS source properly??

Nicolas Hesler nicolas.hesler at sheridanc.on.ca
Tue May 13 21:56:31 CEST 2008


I'm having a difficult time trying to figure out why mplayer/mencoder 
detects that an avs (Avisynth Script) file source is yv12 rather than 
rbg32 (or rgb24 for that matter). 

I'm frameserving from premiere in rgb32 using DebugMode's Frameserver.   
ffmpeg detects the source fine as rgb32, but mplayer/mencoder says yv12. 


The result is that mencoder encodes the file with distorted color values 
from the avisynth source. 

If however, I make an intermediate file from ffmpeg or from premiere as 
Huffyuv or uncompressed the result is better/normal and the colors are 
more accurate.

This is my real reason for concern.  If I'm getting better results 
making an intermediate file, I'm going to have to go that route but if 
anyone has any other ideas, please share.


 Is this a bug in mplayer/mencoder?  I've tried various ways of forcing 
mencoder/mplayer (-demuxer rawvideo -rawvideo format:rgb32, etc.) but it

exits early with : Frame too small! (26<3686400) Wrong format?


Also a quick test with mplayer vs ffplay shows that mplayer's output has 
banding where the ffplay output does not.  (if this proves anything, I'm 
not sure).  **Note that my test video is a misty scene where there is a 
slow gradient.

Below is the mplayer output and below that is the ffmpeg output.





mplayer -msglevel all=9 -identify -frames 0 export.avs
MPlayer Sherpya-SVN-r26446-4.2.3 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Xeon(TM) CPU 3.73GHz (Family: 15, Model: 6, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
this_opt = option: identify
Setting identify=-frames
this_opt = option: frames
Setting frames=0
Adding file export.avs
Config pushed level is now 2
Config pushed level is now 3
get_path('codecs.conf') -> 'C:/mplayer/codecs.conf'
Reading C:/mplayer/codecs.conf: Can't open 'C:/mplayer/codecs.conf': No 
such file or directory
Reading /usr/etc/mplayer/codecs.conf: Can't open 
'/usr/etc/mplayer/codecs.conf':
 No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --enable-static --enable-md5sum 
--enable-menu --dis
able-vidix-internal --disable-sdl --enable-dvdread 
--enable-dvdread-internal --e
nable-libdvdcss-internal --enable-caca --enable-gl --enable-freetype 
--enable-pn
g --enable-jpeg --enable-gif --enable-tga --enable-mad --enable-tv 
--disable-dvb
 --disable-dvbhead --with-extraincdir=/c/Work/mplayer/live 
--enable-matrixview -
-enable-runtime-cpudetection
CommandLine: '-msglevel' 'all=9' '-identify' '-frames' '0' 'export.avs'
init_freetype
get_path('font/font.desc') -> 'C:/mplayer/font/font.desc'
font: can't open file: C:/mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> 'C:/mplayer/fonts'
Using Windows native timing
get_path('input.conf') -> 'C:/mplayer/input.conf'
Parsing input config file C:/mplayer/input.conf
Input config file C:/mplayer/input.conf parsed: 83 binds
get_path('export.avs.conf') -> 'C:/mplayer/export.avs.conf'

[[[init getch2]]]

Playing export.avs.
get_path('sub/') -> 'C:/mplayer/sub/'
WINSOCK2 init: 0
WINSOCK2 init: 0
[file] File size is 61 bytes
STREAM: [file] export.avs
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
s->pos=0  newpos=0  new_bufpos=0  buflen=0
DEMUXER: freeing demuxer at 0p1981008
s->pos=0  newpos=0  new_bufpos=0  buflen=0
DEMUXER: freeing demuxer at 0p1981008
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0p1981008
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0p1981008
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0p1981008
Checking for REAL
DEMUXER: freeing demuxer at 0p1981008
Checking for SMJPEG
DEMUXER: freeing demuxer at 0p1981008
[mkv] no head found
DEMUXER: freeing demuxer at 0p1981008
DEMUXER: freeing demuxer at 0p1981008
DEMUXER: freeing demuxer at 0p1981008
Ogg demuxer : Bad page sync
DEMUXER: freeing demuxer at 0p1981008
Searching demuxer type for filename export.avs ext: .avs
Trying demuxer 38 based on filename extension
s->pos=0  newpos=0  new_bufpos=0  buflen=0
AVS: avs_check_file - attempting to open file export.avs
AVS: Init Ok
AVS file format detected.
AVS: demux_open_avs()
==> Found video stream: 0
ID_VIDEO_ID=0
==> Found audio stream: 0
ID_AUDIO_ID=0
AVS: Clip has audio -> Channels = 2 - Freq = 48000
VIDEO:  [YV12]  1280x720  12bpp  24.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:38  fourcc:0x32315659  size:1280x720  fps:24.00  ftime:=0.0417
get_path('sub/') -> 'C:/mplayer/sub/'
ID_FILENAME=export.avs
ID_DEMUXER=avs
ID_VIDEO_FORMAT=YV12
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=1280
ID_VIDEO_HEIGHT=720
ID_VIDEO_FPS=24.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=1
ID_AUDIO_BITRATE=1536000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=14.62
ID_SEEKABLE=1
<vo_directx><INFO>Initing DirectDraw
<vo_directx><INFO>DirectDraw Initialized
<vo_directx><INFO>initial mplayer windows created
<vo_directx><INFO>checking primary surface
<vo_directx><INFO>primary surface created
<vo_directx><FORMAT PRIMARY>14 BGR32 supported
<vo_directx><INFO>testing supported overlay pixelformats
<vo_directx><FORMAT OVERLAY>0 YV12  supported
<vo_directx><FORMAT OVERLAY>1 I420  not supported
<vo_directx><FORMAT OVERLAY>2 IYUV  not supported
<vo_directx><FORMAT OVERLAY>3 YVU9  supported
<vo_directx><FORMAT OVERLAY>4 YUY2  supported
<vo_directx><FORMAT OVERLAY>5 UYVY  supported
<vo_directx><FORMAT OVERLAY>6 BGR8  not supported
<vo_directx><FORMAT OVERLAY>7 RGB15 not supported
<vo_directx><FORMAT OVERLAY>8 BGR15 not supported
<vo_directx><FORMAT OVERLAY>9 RGB16 not supported
<vo_directx><FORMAT OVERLAY>10 BGR16 not supported
<vo_directx><FORMAT OVERLAY>11 RGB24 not supported
<vo_directx><FORMAT OVERLAY>12 BGR24 not supported
<vo_directx><FORMAT OVERLAY>13 RGB32 not supported
<vo_directx><FORMAT OVERLAY>14 BGR32 not supported
<vo_directx><INFO>Your card supports 4 of 15 overlayformats
<vo_directx><INFO>can mirror up down
<vo_directx><INFO>hardware supports overlay
<vo_directx><INFO>preinit succesfully finished
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
Trying filter chain: vo
vo_debug: query(Planar YV12) returned 0x417 (i=0)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (1280x720->1280x720,flags=0,'MPlayer',0x32315659)
VO: [directx] 1280x720 => 1280x720 Planar YV12
VO: Description: Directx DDraw YUV/RGB/BGR renderer
VO: Author: Sascha Sommer <saschasommer at freenet.de>
<vo_directx><INFO>overlay surfaces released
<vo_directx><INFO>primary surface created
<vo_directx><INFO>overlay with format YV12  created
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
ID_VIDEO_CODEC=rawyv12
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
ID_AUDIO_BITRATE=1536000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
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_dsound: Output Devices:
0 Primary Sound Driver <--
1 SB X-Fi Audio [CCE0]
ao_dsound: DirectSound initialized
ao_dsound: Samplerate:48000Hz Channels:2 Format:s16le
ao_dsound: Buffersize:192000 bytes (1000 msec)
ao_dsound: primary buffer created
ao_dsound: secondary (stream)buffer created
AO: [dsound] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: Windows DirectSound audio output
AO: Author: Gabor Szecsi <deje at miki.hu>
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=pcm
Starting playback...


*** uninit(0xE4B)
Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: pcm
Uninit video: raw
DEMUXER: freeing demuxer at 0p1981008
AVS: Unloading avisynth.dll
DEMUXER: freeing sh_audio at 0p19721f0
DEMUXER: freeing sh_video at 0p19b1de0
WINSOCK2 uninit
<vo_directx><INFO>clipper released
<vo_directx><INFO>back surface released
<vo_directx><INFO>overlay surface released
<vo_directx><INFO>primary released
<vo_directx><INFO>window destroyed
<vo_directx><INFO>GDI resources deleted
<vo_directx><INFO>directdrawobject released
<vo_directx><INFO>ddraw.dll freed
<vo_directx><INFO>uninitialized

[[[uninit getch2]]]
ao_dsound: DirectSound uninitialized
Config poped level=2
Config poped level=1

*** uninit(0x80)

Exiting... (End of file)
max framesize was 0 bytes



ffmpeg -i export.avs

FFmpeg version Sherpya-r12810, Copyright (c) 2000-2008 Fabrice Bellard, 
et al.
  libavutil version: 49.6.0
  libavcodec version: 51.54.0
  libavformat version: 52.13.0
  libavdevice version: 52.0.0
  libavfilter version: 0.0.0
  built on Apr 14 2008 08:19:32, gcc: 4.2.3
Input #0, avs, from 'export.avs':
  Duration: 00:00:14.6, start: 0.000000, bitrate: 0 kb/s
    Stream #0.0: Video: rawvideo, rgb32, 1280x720, 707788 kb/s, 24.00 tb(r)
    Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Must supply at least one output file





More information about the MEncoder-users mailing list