[PATCH] Add prefix to filename of files created by PNG video output
I was wondering if Mplayer couldn't add a prefix to the filename of the PNG created using PNG 'video' output. Thus, I created a small patch that allows the usage of a prefix for the PNG output filename. The new option is "outfile", which is used to define the 'png_outfile_prefix' variable. The default behaviour is the same as Mplayer currently has (default value for 'png_outfile_prefix' is an empty string), so backwards compatibility is kept. The patch was created against MPlayer svn #32707. Regards, Marco Aurélio
On Sun, Dec 12, 2010 at 03:04:33PM -0200, Marco Aurélio Graciotto Silva wrote:
I was wondering if Mplayer couldn't add a prefix to the filename of the PNG created using PNG 'video' output.
Thus, I created a small patch that allows the usage of a prefix for the PNG output filename. The new option is "outfile", which is used to define the 'png_outfile_prefix' variable. The default behaviour is the same as Mplayer currently has (default value for 'png_outfile_prefix' is an empty string), so backwards compatibility is kept.
The patch was created against MPlayer svn #32707.
Regards,
Marco Aurélio
Index: libvo/vo_png.c =================================================================== --- libvo/vo_png.c (revision 32707) +++ libvo/vo_png.c (working copy)
It seems we forgot your patch, sorry. I'll test and commit it tonight if it works. -- Clément B.
On Tue, 1 Feb 2011 17:01:55 +0100, Clément Bœsch wrote:
On Sun, Dec 12, 2010 at 03:04:33PM -0200, Marco Aurélio Graciotto Silva wrote:
I was wondering if Mplayer couldn't add a prefix to the filename of the PNG created using PNG 'video' output.
Thus, I created a small patch that allows the usage of a prefix for the PNG output filename. The new option is "outfile", which is used to define the 'png_outfile_prefix' variable. The default behaviour is the same as Mplayer currently has (default value for 'png_outfile_prefix' is an empty string), so backwards compatibility is kept.
The patch was created against MPlayer svn #32707.
Regards,
Marco Aurélio
Index: libvo/vo_png.c =================================================================== --- libvo/vo_png.c (revision 32707) +++ libvo/vo_png.c (working copy)
It seems we forgot your patch, sorry. I'll test and commit it tonight if it works.
feature request: it would be better if there were a generic filename output modifyer for vo_gif vo_jpeg vo_tga vo_png etc -compn
On Sun, Dec 12, 2010 at 03:04:33PM -0200, Marco Aurélio Graciotto Silva wrote:
I was wondering if Mplayer couldn't add a prefix to the filename of the PNG created using PNG 'video' output.
Thus, I created a small patch that allows the usage of a prefix for the PNG output filename. The new option is "outfile", which is used to define the 'png_outfile_prefix' variable. The default behaviour is the same as Mplayer currently has (default value for 'png_outfile_prefix' is an empty string), so backwards compatibility is kept.
The patch was created against MPlayer svn #32707.
Tested with upstream. It works. I was ready to apply but I realized "outfile" wasn't much appropriate, I'd prefer if you could change it into "prefix" (or similar). Though, since it's a matter of taste, I won't block it for this if anyone (you?) object. And btw, if you feel like it, please try to implement the feature Compn asked for instead, he has a good point here. Also, sorry for the delay. Regards, -- Clément B.
2011/2/1 Clément Bœsch <ubitux@gmail.com>:
Tested with upstream. It works. I was ready to apply but I realized "outfile" wasn't much appropriate, I'd prefer if you could change it into "prefix" (or similar). Though, since it's a matter of taste, I won't block it for this if anyone (you?) object.
No problem. The new patch is attached to this email.
And btw, if you feel like it, please try to implement the feature Compn asked for instead, he has a good point here.
Indeed, it is a good idea. Actually I was already working on merging a function shared between png/pnm/jpg regarding directory creation, so it shouldn't be a problem to do a common prefix_outfile feature for all of them. I'll take a look upon this next weekend. Anyway, could you apply the current PNG patch? Regards, Marco
On Tue, Feb 01, 2011 at 11:55:55PM -0200, Marco Aurélio Graciotto Silva wrote:
2011/2/1 Clément Bœsch <ubitux@gmail.com>:
Tested with upstream. It works. I was ready to apply but I realized "outfile" wasn't much appropriate, I'd prefer if you could change it into "prefix" (or similar). Though, since it's a matter of taste, I won't block it for this if anyone (you?) object.
No problem. The new patch is attached to this email.
Thanks.
And btw, if you feel like it, please try to implement the feature Compn asked for instead, he has a good point here.
Indeed, it is a good idea. Actually I was already working on merging a function shared between png/pnm/jpg regarding directory creation, so it shouldn't be a problem to do a common prefix_outfile feature for all of them.
Yes, good initiative. Thanks.
I'll take a look upon this next weekend. Anyway, could you apply the current PNG patch?
Sure. Applied, thank you. -- Clément B.
participants (3)
-
Clément Bœsch -
compn -
Marco Aurélio Graciotto Silva