Log in

View Full Version : mencoder xvid rgb24


mousemurder
5th March 2009, 00:48
hi, for some reason i cant change the colorspace for my encodes:


[fedora@localhost hyper]$ /usr/bin/mencoder file.avi -o /dev/null \
-vf format=rgb24,hqdn3d=4:3:6,softskip,scale=1920:1080:0:0:5,unsharp=l5x5:0.00:c5x5:0.00,harddup \
-sws 9 -aspect 16:9 -oac mp3lame -lameopts abr:br=64:aq=4:vol=2.2:mode=1 -ovc xvid \
-xvidencopts pass=1:turbo:me_quality=6:vhq=4:threads=1:max_bframes=2:bvhq=1:nopacked:quant_type=h263:qpel:nogmc:trellis:nointerlacing:chroma_me:chroma_opt:hq_ac:nolumi_mask:rc_reaction_delay_factor=0:rc_averaging_period=100:closed_gop:autoaspect \
-passlogfile ./sdos-2.log
MEncoder SVN-r27937 (C) 2000-2008 MPlayer Team
CPU: Genuine Intel(R) CPU T2600 @ 2.16GHz (Family: 6, Model: 14, Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
129 audio & 258 video codecs
success: format: 0 data: 0x0 - 0x71383840
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DIVX] 640x368 24bpp 29.970 fps 1506.5 kbps (183.9 kbyte/s)
[V] filefmt:3 fourcc:0x58564944 size:640x368 fps:29.970 ftime:=0.0334
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 32000 Hz, 2 ch, s16le, 257.8 kbit/25.17% (ratio: 32220->128000)
Selected audio codec: [ffadpcmimawav] afm: ffmpeg (FFmpeg WAV IMA ADPCM audio)
==========================================================================
xvid: using library version 1.1.3 (build xvid-1.1.3)
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: [unsharp=l5x5:0.00:c5x5:0.00]
Opening video filter: [scale w=1920 h=1080 interlaced=0 chr-drop=0 param=5]
Opening video filter: [softskip]
Opening video filter: [hqdn3d=4:3:6]
Opening video filter: [format fmt=rgb24]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
MP3 audio selected.
VDec: vo config request - 640 x 368 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.

Exiting...

but it works without format=rgb24:


[fedora@localhost hyper]$ /usr/bin/mencoder file.avi -o /dev/null \
-vf hqdn3d=4:3:6,softskip,scale=1920:1080:0:0:5,unsharp=l5x5:0.00:c5x5:0.00,harddup \
-sws 9 -aspect 16:9 -oac mp3lame -lameopts abr:br=64:aq=4:vol=2.2:mode=1 -ovc xvid \
-xvidencopts pass=1:turbo:me_quality=6:vhq=4:threads=1:max_bframes=2:bvhq=1:nopacked:quant_type=h263:qpel:nogmc:trellis:nointerlacing:chroma_me:chroma_opt:hq_ac:nolumi_mask:rc_reaction_delay_factor=0:rc_averaging_period=100:closed_gop:autoaspect \
-passlogfile ./sdos-2.log
MEncoder SVN-r27937 (C) 2000-2008 MPlayer Team
CPU: Genuine Intel(R) CPU T2600 @ 2.16GHz (Family: 6, Model: 14, Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
129 audio & 258 video codecs
success: format: 0 data: 0x0 - 0x71383840
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DIVX] 640x368 24bpp 29.970 fps 1506.5 kbps (183.9 kbyte/s)
[V] filefmt:3 fourcc:0x58564944 size:640x368 fps:29.970 ftime:=0.0334
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 32000 Hz, 2 ch, s16le, 257.8 kbit/25.17% (ratio: 32220->128000)
Selected audio codec: [ffadpcmimawav] afm: ffmpeg (FFmpeg WAV IMA ADPCM audio)
==========================================================================
xvid: using library version 1.1.3 (build xvid-1.1.3)
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: [unsharp=l5x5:0.00:c5x5:0.00]
Opening video filter: [scale w=1920 h=1080 interlaced=0 chr-drop=0 param=5]
Opening video filter: [softskip]
Opening video filter: [hqdn3d=4:3:6]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
MP3 audio selected.
VDec: vo config request - 640 x 368 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 11 -> 12
SwScaler: reducing / aligning filtersize 11 -> 12
SwScaler: reducing / aligning filtersize 11 -> 10
SwScaler: reducing / aligning filtersize 11 -> 10
[swscaler @ 0xa9aa5d0]Lanczos scaler, from yuv420p to yuv420p using MMX2
[swscaler @ 0xa9aa5d0]using n-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xa9aa5d0]using n-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xa9aa5d0]using n-tap MMX scaler for vertical scaling (YV12 like)
[swscaler @ 0xa9aa5d0]640x368 -> 1920x1080
unsharp: 5x5:0.00 (don't touch luma)
unsharp: 5x5:0.00 (don't touch chroma)
videocodec: XviD (1920x1080 fourcc=44495658 [XVID])
xvid: par=1/1 (ext), displayed=1920x1080, sampled=1920x1080
xvid: 2Pass Rate Control -- 1st pass
New_Face failed. Maybe the font path is wrong.n 0mb A-V:0.000 [0:0]
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.036s.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.036s.
^CPos: 0.4s 14f ( 0%) 9.66fps Trem: 0min 0mb A-V:0.043 [0:0]
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.036s.

Video stream: 6559.373 kbit/s (819921 B/s) size: 355655 bytes 0.434 secs 14 frames

Audio stream: 61.667 kbit/s (7708 B/s) size: 6660 bytes 0.864 secs
[fedora@localhost hyper]$

but it defaults to yv12 colorspace which i think is making the output kinda' washy.

any help?, thx

Sharktooth
5th March 2009, 04:00
xvid supports yv12 only as well as many other mpeg encoders.

mousemurder
5th March 2009, 17:04
okay, thx from above it says the input divx has 24 bits per pixel:
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DIVX] 640x368 24bpp 29.970 fps 1506.5 kbps (183.9 kbyte/s)
[V] filefmt:3 fourcc:0x58564944 size:640x368 fps:29.970 ftime:=0.0334

is there anyway to force the resulting xvid to also have 24 bits per pixel rather than 12 ?

thanks,
___________________

edit: i just played the original in mplayer and the output contains:
VDec: vo config request - 640 x 368 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
hmm, seems kinda' wasteful.

nm
5th March 2009, 20:52
okay, thx from above it says the input divx has 24 bits per pixel:
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DIVX] 640x368 24bpp 29.970 fps 1506.5 kbps (183.9 kbyte/s)
Your source is YV12. MPlayer just reports 24 bpp for MPEG-4 ASP/AVC at this point, regardless of the actual colorspace. Maybe there is some historic reason for this.