[MEncoder-users] splitting avi files

Joachim Jautz lists.mencoder-users at jay-jay.net
Thu Jul 14 16:46:18 CEST 2005


On Thu, Jul 14, 2005 at 09:41:43AM +0200, Assa Yeroslaviz wrote:
> 
> how can i split avi file size based?
> I've tried this line :
> mencoder -ovc copy -oac copy -ss 699mb -o Confessions_cd1_part1.avi Confessions_cd1.avi
> to split it to a file size of 699 mb, but it gyve me a file size of ~373mb (complete file size is ~752mb, so it's about half the size of it)
> 
> what's wrong with these options?

I assume the .avi file you are talking about is a DivX movie.
Otherwise I'm not sure if the following is applicable for your
problem.

There is a quite simple way how you can do this:
- run
  $ mencoder -ovc copy -oac copy -endpos 696mb -o /dev/null
  to find out (1) the frame number and (2) the playtime at the
  point where you want to split. The final status line will look
  similar to this: Pos:4150.0s 103751f ...
- for the 1st part:
  $ mencoder -ovc copy -oac copy -frames <frame_count_from_above> -o ...
- for the 2nd part:
  $ mencoder -ovc copy -oac copy -ss <playtime_from_above> -o ...


Personally, I prefer to split at a keyframe (which should minimize
the artefacts at the beginning of the second part) but this means
a bit more work. If you're interested you can take a look in the
manual of the script I've written, section 3.9 and/or its source:
http://www.jay-jay.net/src/bash/dvd2divx/index.html


I'm quite sure there are other/better ways than these, but that's
all I know about splitting with mencoder.

Joachim




More information about the MEncoder-users mailing list