[MPlayer-users] mencoder cropping does not work?

horst.schlonz at gmx.de horst.schlonz at gmx.de
Tue Jan 6 17:53:40 CET 2004


hi,
i ripped an mpeg-file off an svcd with vcdxrip and it has very big black bars. 
i want to reencode this file with the black bars cut off.

here is what i did:

$ mplayer -vf cropdetect avseq01.mpg
MPlayer 1.0pre3-3.3.3 (C) 2000-2003 MPlayer Team

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

Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/headroom/.mplayer/config
Reading /home/headroom/.mplayer/codecs.conf: This codecs.conf is too old and 
incompatible with this MPlayer release! at line 6
Reading /etc/mplayer/codecs.conf: 61 audio & 169 video codecs
Font /home/headroom/.mplayer/font/font.desc loaded successfully! (206 chars)
Failed to open /dev/rtc: Keine Berechtigung (mplayer should be setuid root 
or /dev/rtc should be readable by the user.)
Using usleep() timing
Can't open input config file /home/headroom/.mplayer/input.conf: Datei oder 
Verzeichnis nicht gefunden
Input config file /etc/mplayer/input.conf parsed: 53 binds
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : Keine Berechtigung
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: Datei oder Verzeichnis nicht gefunden
Failed to open LIRC support.
You will not be able to use your remote control.

Playing avseq01.mpg.
Cache fill:  0,00% (0 bytes)    LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  480x480  (aspect 1)  23,976 fps  2500,0 kbps (312,5 kbyte/s)
==========================================================================
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: 28000->176400 (224,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: X11 running at 1440x900 with depth 24 and 32 bpp (":0.0" => local display)
Opening video filter: [cropdetect]
==========================================================================
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.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
SDL: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
AO: [sdl] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 480 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [x11] 480x480 => 480x480 Planar YV12
SwScaler: using unscaled Planar YV12 -> BGR 32-bit special converter
crop area: X: 480..0  Y: 480..0  (-vf crop=-480:-480:480:480),0% 2 0 57%
crop area: X: 480..0  Y: 275..320  (-vf crop=-480:44:480:276),0% 3 0 57%
crop area: X: 239..389  Y: 108..368  (-vf crop=150:260:240:108)% 3 0 57%
crop area: X: 0..479  Y: 107..370  (-vf crop=480:262:0:108) 0,0% 4 0 57%
[going on with the same values until movie ends]

$ mplayer -vf crop=480:262:0:108 avseq01.mpg
[unimportant stuff snipped]
==========================================================================
vo: X11 running at 1440x900 with depth 24 and 32 bpp (":0.0" => local display)
Opening video filter: [crop w=480 h=262 x=0 y=108]
Crop: 480 x 262, 0 ; 108
==========================================================================
[unimportant stuff snipped]
[the movie plays without the black bars]

ok, now for the part where i believe my failure lies:
$ mencoder -oac copy -ovc copy -vf crop=480:262:0:108 -o out.mpg avseq01.mpg
MEncoder 1.0pre3-3.3.3 (C) 2000-2003 MPlayer Team

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

Reading /home/headroom/.mplayer/mencoder_codecs.conf: Can't open '/home/
headroom/.mplayer/mencoder_codecs.conf': Datei oder Verzeichnis nicht 
gefunden
Reading /etc/mplayer/mencoder_codecs.conf: 61 audio & 169 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/headroom/.mplayer/mencoder: Datei oder Verzeichnis 
nicht gefunden
Font /home/headroom/.mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 0  data: 0x0 - 0x2F0B9634
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  480x480  (aspect 1)  23,976 fps  2500,0 kbps (312,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:480x480  fps:23,98  ftime:=0,0417
==========================================================================
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: 28000->176400 (224,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
videocodec: framecopy (480x480 24bpp fourcc=10000002)
audiocodec: framecopy (format=50 chans=2 rate=44100 bits=16 bps=28000 
sample=1)
Writing AVI header...
Pos:   0,9s     22f ( 0%)   0fps Trem:   0min   0mb  A-V:0,088 [0:224]
Skipping frame!
Pos:   1,3s     32f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [1802:224]
Skipping frame!
Pos:2640,5s  63310f (100%) 540fps Trem:   0min 741mb  A-V:0,066 [2130:224]
Writing AVI index...
Fixing AVI header...

Video stream: 2130,715 kbit/s  (266339 bps)  size: 703265137 bytes  2640,485 
secs  63310 frames

Audio stream:  224,000 kbit/s  (28000 bps)  size: 73934263 bytes  2640,509 
secs

so, i thought my mencoder-command should reencode the file with the black bars 
cut off. but they are still there when i play the file with mplayer. also 
mencoder seems to change the container-format from mpeg to avi. where am i 
wrong?

i have debian sid with marillat-packages here.

thank you




More information about the MPlayer-users mailing list