[MPlayer-dev-eng] [PATCH] appending with mencoder
Georgi Hristov
georgi at eontechnologies.bg
Tue Jan 7 10:24:54 CET 2003
> > the way i do it is add few more variables to mirror *demuxer, *stream,
> > *sh_*, and use them to open the second file, then in mencoder's main
loop
> > when the at_eof gets triggered, i switch the variables to the new ones,
and
> > thus continue until they are done too. this is just about 20-30 lines of
> > code added to mencoder.c plus the option "-append" added to
cfg-mencoder.h,
> > which takes the second filename.
>
> actually this is an ugly mess / hack :(
> we should use the playtree (playlist+per-file configs) there, and the
> current code extended with a condition.
> somewhat:
>
> main(){
> while(there are more files){
> if(first_file){
> initialize headers, codecs
> open output file (init muxer layer)
> } else {
> check if headers are compatible, stop with error otherwise
> }
> process file
> }
> close muxer, print stats
> }
>
> this way even appending different format files (even different codec,
> size whatever) could be possible (scaled to the same size & framerate)
hi arpi,
i know it's ugly, but the proper way to do it would an almost total rewrite
of mencoder, so isn't there anyone else interested in such a feature?
if not, i'll continue playing with it, though this is the only thing
stopping me from dumping virtualdub at the moment, and i was hoping it would
go in the todo list long time ago...
joro
More information about the MPlayer-dev-eng
mailing list