[MPlayer-users] Trying to get mencoder to start at exact offsets

Bradley Rosser b_rosser at yahoo.com
Fri Apr 25 16:15:01 CEST 2003


A few days ago I was asking for a way to get mencoder to commence
encoding from a particular offset within a source video:

> Is there an option with mencoder that will allow
> me to specify a'start' offset as well as using -endpos to impose an
> endpoint?

Albeu was kind enough to reply:

> I think what you nned is -ss but it's not always very accurate. There
> is also -sb wich might be useful too in some cases. See the man page.
>     Albeu

I looked up (I'd made the mistake of limiting myself to the options under
'MENCODER ONLY' on the man page; I've now worked out what other options
also apply!) the -ss option and checked it out.  It's what I want but, as
Albeu stated, it's not very accurate.

I need to convert source videos - mpeg-1, mpeg-2, DivX - into raw DV AVI
files.  45 minutes of video ends up being about 9.5GB of AVI, which I
have to split into less-than-2GB segments as part of my process of
feeing them through 'dvavi' of the 'libdv' package and then transferring
them down to my camcorder.

I therefore tried an experiment of running mencoder to encode each
successive five-minute slice of a 45-minute video, using -ss to start
from 00:00:00, 00:05:00, etc.  There was something like 15 seconds or
more of 'overlap' between the ending of the first file and the beginning
of the second, which grew with each iteration.  In the end there would have
been about eight minutes of 'overlap' at least across the entire movie.
As it stands I wouldn't be able to stitch the pieces together without
coming across roughly half a minute or more of overlap every five
minutes or so!

Is there any way I can specify a more exact starting offset for mencoder?
-frames seems to be like -endpos, specifiying only an end point.  -ss
seems to be the only way to specify a starting position.

If I convert the source file - which will be in a compressed format,
mpeg or DivX, etc - into a straight (large!) uncompressed AVI file,
will mencoder then be able to treat a -ss offset with better accuracy?
Knowing nothing about the code I'm wondering if the inaccuracy I've
seen is due to the complexity of it having to decompress things as
it works out where it's supposed to start?

Any help or pointers on how I might be able to get mencoder to start
at accurate places within a video file would be most appreciated!
Or otherwise how I can 'split' a large (9.5GB) raw-dv AVI file into
smaller pieces.  I've tried transcode's 'avisplit' but it won't work
with the file that mencoder creates (I got a single reply on the
transcode mailing list saying "yes, transcode tends to only work
right on AVI files made with transcode").  If there are other tools
that will split an mencoder-produced 9+GB AVI file I'd love to know
about it, if I can't get mencoder to produce segments with better
accuracy!

Many thanks,


Brad Rosser
b_rosser at yahoo.com


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



More information about the MPlayer-users mailing list