[MPlayer-dev-eng] [PATCH] Multiple files for MEncoder

Matthias Schwarzott zzam at gmx.de
Fri Feb 25 15:49:02 CET 2005


On Friday 25 February 2005 15:02, Oded Shimon wrote:
> On Friday 25 February 2005 14:45, Matthias Schwarzott wrote:
>
> Yes, -frames is a per file option. I might add a -totframes option...
Would be nice.

>
> > But trying
> > two-pass encoding the divx2pass.log file only contains 998 lines. Should
> > that be around three times 1000 lines, as my output file has around 3000
> > frames?
>
> Oops, 10l cola goes to me.
> I never tested the patch in 2 pass, so, good for pointing that out.
> There are 3 possible solutions:
> 1. make -divx2pass a per file option, or even append to it a _1
> automatically. Easy, but not the best.
I think this does not garantue a fair bit-distribution over all files, ie one 
simple and one complex file of same length.

> 2. make some vfctl to make MEncoder communicate with the ve after each file
> what frame we are up to. Possible, but hackish.
> 3. Find some way to uninit the video without uniniting the VE, and use that
> same VE for all the next files. Ideal, but hardest...
> Anyone have a better suggestion?... I'm gonna try to do 3 for now
Both 2 and 3 sound correct IMO.

>
> > Is there a possibility to seek to any point in the concatenated files and
> > encode exactly n frames oder n seconds from that point.
>
> Hmm, what do you mean, do you mean something like this?
>
> mencoder a.avi -ss 5 -frames 500 b.avi -ss 30 -frames 1000 ....
>
> This was the design I intended all along for this.

What I meant was a more abstract sense. View all files given on commandline as 
one big file and then jump to positions in this big file.

Example
1.avi - 1000frames
2.avi - 2000frames
3.avi - 2000frames

mencoder -jumptoframe 1500 -totframes 2500 1.avi 2.avi 3.avi

should start encoding at frame 1500 which is frame 500 in 2.avi and encode 
2500 frames from this point, meaning up to frame 1000 in 3.avi.




With my main usage of this, files from vdr, which are mpg-pes-streams split in 
multiple files, I wonder if it is better to simply write a new file-reader 
like the dvd://-protocol which makes it look like a big file.
And this also makes it possible for mencoder to know the size of the input and 
seek to given positions. This could be used for all files which are just 
split and not independent (means without a file-header).

With more work it is even possible to support the keyframe-indeces from vdr.

>
> - ods15

Matthias




More information about the MPlayer-dev-eng mailing list