Topic - Problem using mencoder to cut files

Reply to this topic

Topic Starter ebreeze - Posted on Thursday, July 2 2009 01:48:26 PM
I have a problem using mencoder to cut files.
I use the following command to make a clip from a video:

mencoder -ss 00:00:04 -endpos 17 1246453040.mpg -ovc copy -oac copy -o clipping.mpg

The first time it seems to work fine.

Here is the original input file:

Here is the output file:

However, when I try to cut a part of the clipping created as a result of the above command there is a problem. I rename this file from clipping.mpg to clipping.avi and run the following command:

mencoder -ss 00:00:03 -endpos 4 clipping.avi -ovc copy -oac copy -o clipping_new.mpg

Unfotunately the output file clipping_new.mpg is less than 5Kb and does not play in any player! Here is the log:

MEncoder 2:1.0~rc2-0ubuntu19 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (Family: 6, Model: 23, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
get_path("config") problem

success: format: 0 data: 0x0 - 0x12747d2
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [ ] 640x480 24bpp 30.000 fps 9016.7 kbps (1100.7 kbyte/s)
[V] filefmt:3 fourcc:0x10000001 size:640x480 fps:30.00 ftime:=0.0333
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 32000 Hz, 2 ch, s16le, 64.0 kbit/6.25% (ratio: 8000->128000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
videocodec: framecopy (640x480 24bpp fourcc=10000001)
audiocodec: framecopy (format=50 chans=2 rate=32000 bits=16 B/s=8000 sample-1)
Pos: 0.0s 1f (100%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 9099.600 kbit/s (1137450 B/s) size: 37915 bytes 0.033 secs 1 frames

Audio stream: nan kbit/s (-2147483648 B/s) size: 0 bytes 0.000 secs

I do not understand where the error is.

An interesting fact is that if I run the command (the second time) with ‘–ss 00:00:00’ instead of ‘-ss 00:00:03’ the output file is fine just as the first time.

Can anybody help me solve this issue?