[MEncoder-users] help with simple task: crop, scale, encode
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Sat Apr 29 19:19:24 CEST 2006
On Saturday, 29 April 2006 at 18:07, Molle Bestefich wrote:
> Hi
>
> I'd like to take an input file from a PVR, crop it, scale it to half
> size, and MPEG4 encode it.
>
> It's for a buddy on Windows, so I chose AVI and MSMPEG4v2.
>
> First try:
> # mencoder input.vob \
> -vf crop=700:428:8:74 \
> -vf scale=350:-2 \
man mplayer
Another -vf option overwrites the previous one.
> -ovc lavc -lavcopts vcodec=msmpeg4v2 \
> -oac mp3lame \
> -vo null -of avi -o output.avi
>
> It dies with "-vo is not an MEncoder option".
> Ok, fine (although -vo is in "man mencoder", hmm). I try without -vo:
MEncoder and MPlayer have many common options, but some are specific to each.
This is one of them.
> MEncoder dev-CVS-060415-00:32-3.3.6 (C) 2000-2006 MPlayer Team
> # [...snip...]
> success: format: 0 data: 0x0 - 0xf9c8000
> MPEG-PS file format detected.
> VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 4096.0 kbps (512.0 kbyte/s)
> [V] filefmt:2 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400
> ==========================================================================
> Opening audio decoder: [liba52] AC3 decoding with liba52
> # [...no audio probs, snip...]
> ==========================================================================
> Opening video filter: [expand osd=1]
> Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
> Opening video filter: [scale w=350 h=-2]
>
> # Ok, here I wonder, why is the 'expand' filter loaded?
man mplayer
-noautoexpand
> # And why in the same "========" block as the 'scale' filter?
> #
> # Carrying on...
>
> ==========================================================================
> Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
> VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
> The selected video_out device is incompatible with this codec.
> Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
> VDecoder init failed :(
>
> # Doesn't look too god.
> # Not sure what it means by "vo config request",
> # I haven't requested any vo config.
> #
> # I haven't selected a video_out device either, as
> # mencoder did not accept my "-vo null" option.
> # So how do I tell it to not try to output anything?
> #
> # It tells me to try adding the scale filter, but the scale
> # filter is already added since I want to downscale the video.
Irrelevant, but if you don't like it, add "-vc -mpegpes,"
> Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
> Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
> ==========================================================================
> MP3 audio selected
> VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
>
> SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX
> videocodec: libavcodec (350x262 fourcc=3234504d [MP42])
>
> # Argh!!
> # After cropping, the video should be 700x428, ergo
> # after scaling, it should be 350x214 - NOT 350x262...
> #
> # Why, oh why does it not what I tell it to?
It's not doing any cropping because you use a command which doesn't do what
thought it does.
> Writing header...2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.004 [0:0]
> ODML: Aspect information not (yet?) available or unspecified, not
> writing vprp header.
> Writing header...
> ODML: Aspect information not (yet?) available or unspecified, not
> writing vprp header.
>
> 1 duplicate frame(s)!
> Pos: 0.8s 22f ( 0%) 0.00fps Trem: 2min 29mb A-V:0.084 [0:165]
> Skipping frame!
> Pos: 1.2s 32f ( 0%) 0.00fps Trem: 2min 29mb A-V:0.084 [684:165]
> Skipping frame!
> Pos: 1.6s 42f ( 0%) 0.00fps Trem: 2min 32mb A-V:0.084 [667:166]
> Skipping frame!
> Pos: 2.3s 62f ( 0%) 57.73fps Trem: 2min 32mb A-V:0.084 [646:166]
> Skipping frame!
> Pos: 2.8s 75f ( 0%) 58.00fps Trem: 2min 34mb A-V:0.083 [649:166]
> Skipping frame!
> Pos: 21.6s 547f ( 5%) 55.80fps Trem: 2min 38mb A-V:0.017 [667:171]
> Flushing video frames
> Writing index...
> Writing header...
> ODML: Aspect information not (yet?) available or unspecified, not
> writing vprp header.
>
> Video stream: 667.485 kbit/s (83435 B/s) size: 1798871 bytes
> 21.560 secs 547 frames
> Audio stream: 171.190 kbit/s (21398 B/s) size: 471456 bytes 22.032 secs
>
> # The ODML: warnings doesn't look too good either, what do they mean?
That you haven't specified video aspect.
> # Why does it skip frames?
To maintain A-V sync.
Regards,
R.
--
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the MEncoder-users
mailing list