[MPlayer-dev-eng] mencoder -mf small enhancement

Csan csani at lme.linux.hu
Tue Nov 18 16:17:29 CET 2003


Hello all,

I am planning to add a quick hack to the -mf feature of mencoder which would
delete an image file once mencoder processed it.

The main goal for this would be to enable on-the-fly encoding of quake3 demos to
avi without forcing the user to have tons of gigs of free space on their hard
drive(s) where to keep the screenshots.

The quake3 engine has a limit of 9999 screenshots that it can dump with the
'cl_avidemo' command (you can add the shots per second value as a parameter to
the command). The screenshots would be numbered shot0001.jpg and so on. The
engine would not stop when reaching the 9999 value but would start over from
0001 overwriting existing screenshots.

A dirty hack would be to write an external script which moves all the dumped
screenshots to another sub-directory converting their names at the same time
addig a few more 0's so that there would not be an overflow.
But still, a lot of free space would be required unless mencoder deleted all the
already processed screenshots.

As I can tell (I am not a developer person myself, yet I think I could handle
this easily), this would be a one-liner patch to the mencoder code but I can't
find the relevant place for that one line:

rgrep -r -i -e "-mf" * | grep -v DOCS

doesn't give me a line where I could start off looking for the relevant place.

I'd like to ask you to help me make this first step ;)
My main question would be where to look for the place in the source code to
insert the file deletion code (the best would be to have it as an option of
course, etc...)?

A related question is if `mencoder -mf` would wait for more screenshots should
it be quicker encoding than the q3 engine dumping screenshots?

Thanks a lot.

Regards,

Csan  alias  Janos Holanyi
Debian Group leader - Association of Hungarian Linux Users
URL: http://www.lme.hu/  Email: csani AT lme.linux.hu
gpg --keyserver hkp://pgp.mit.edu --recv-keys 82CBB661



More information about the MPlayer-dev-eng mailing list