[MPlayer-users] MEncoder not able to crop a video when reincoding

Thomas Kempkes mplayer-users at familie-kempkes.de
Tue Aug 10 11:14:32 CEST 2004


Hi there,

I habe a problem with mencoder. I can't use the crop function to crop
some ugly black borders.
I used the latest cvs version from this morning. I did:

./configure --enable-debug=3 --enable-gui --enable-largefiles --cc=gcc-3.4.1

make

sudo make install

gdb /usr/local/bin/mencoder
GNU gdb 5.3.92
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
(gdb) run Solaris_2003_CD1.mpg -ovc lavc -lavcopts vcodec=mpeg4 -vf crop=0:479:99:375 -oac copy -o sol1.avi
Starting program: /usr/local/bin/mencoder Solaris_2003_CD1.mpg -ovc lavc -lavcopts vcodec=mpeg4 -vf crop=0:479:99:375 -oac copy -o sol1.avi
[New Thread 16384 (LWP 19688)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MEncoder dev-CVS-040810-10:03-3.4.1 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2020 MHz (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Reading /home/kempkes/.mplayer/codecs.conf: 61 audio & 157 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/kempkes/.mplayer/mencoder: Datei oder Verzeichnis nicht gefunden
font: can't open file: /home/kempkes/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
success: format: 0  data: 0x0 - 0x3086E1D4
MPEG-PS file format detected.
VIDEO:  MPEG2  480x480  (aspect 2)  29,970 fps  2450,0 kbps (306,2 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:480x480  fps:29,97  ftime:=0,0334
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 24000->176400 (192,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [crop w=0 h=479 x=99 y=375]
Crop: 0 x 479, 99 ; 375
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 480 x 480 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
audiocodec: framecopy (format=50 chans=2 rate=44100 bits=16 bps=24000 sample=1)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
VDec: vo config request - 480 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,33:1 - prescaling to correct movie aspect.
crop: bad position/width/height - cropped area is out of the original!
FATAL: Cannot initialize video driver.
draw_slice: dmpi not stored by vf_expand 0min   0mb  A-V:0,003 [0:0]
draw_slice: dmpi not stored by vf_expand
draw_slice: dmpi not stored by vf_expand
draw_slice: dmpi not stored by vf_expand
draw_slice: dmpi not stored by vf_expand
draw_slice: dmpi not stored by vf_expand
draw_slice: dmpi not stored by vf_expand

2 duplicate frame(s)!
Pos:   0,1s      3f ( 0%)   0fps Trem:   0min   0mb  A-V:0,007 [0:0]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 19688)]
0x080879bb in fast_memcpy (to=0x0, from=0x40e9b040, len=480) at aclib_template.c:213
213                     __asm__ __volatile__ (
(gdb) bt
#0  0x080879bb in fast_memcpy (to=0x0, from=0x40e9b040, len=480) at aclib_template.c:213
#1  0x080a4be5 in put_image (vf=0x84e78d0, mpi=0x84d3fd8) at fastmemcpy.h:52
#2  0x08099bd0 in decode_video (sh_video=0x84d3b08, start=0x7 <Address 0x7 out of bounds>, in_size=7, drop_frame=0)
    at dec_video.c:332
#3  0x0806990e in main (argc=7, argv=0x7) at mencoder.c:1306
(gdb)

Is this a problem of me (since mencoder tells me "The selected video_out
device is incompatible with this codec.") or a problem of mencoder
(which should not crash anyway, I suppose)? I wanted to transform the
film to be able to view it on my Palm Tungsten T3 with MMPlayer from
http://www.mmplayer.com/ which would fit perfectly if only I could crop
the black borders. A pure scaling to 320x320 pixel works fine, but since
I have a larger display I want to have it with a width of 480 pixel.
Should I try other options? MMPlayer supports

Video codecs H263
             MPEG 1,2,4
             DivX
             MJPEG

Audio codecs MPEG audio (layer 1,2,3 -aka MP3-)
             AAC
             Ogg Vorbis
             PCM

on the palm. Other options I should try to get a cropped version playin
on my palm?
Thank in advance!

BYe Thomas

-- 
            Yes, I've heard of "decaf." What's your point?




More information about the MPlayer-users mailing list