[Ffmpeg-devel] Changing "-vstats" option behaviour
Tue Apr 17 11:41:57 CEST 2007
On date Monday 2007-04-16 15:02:36 +0100, M?ns Rullg?rd encoded:
> Stefano Sabatini wrote:
> > Hi to all FFmpeg devs.
> > I'm setting up a testing framework for ffmpeg/libavcodec. I'm encoding
> > streams using different parameters, dumping the output in the vstats
> > file using the -vstats option.
> > Actually the vstats filename is automatically detected, and precisely
> > its format is defined by the following snippet in ffmpeg.c:
> > snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour,
> > today->tm_min,
> > today->tm_sec);
> > I would like to change the behaviour of the -vstats option to let the
> > user specify the name of the outputted filename. For example it could
> > work like this:
> > ffmpeg ... -vstats vstats_test1.log
> > In this way I could automatically do a report of the vstats file just
> > as the encoding ends without the need to guess the vstats filename.
> I think this makes sense.
> > %H (2 digit hour number)
> > %M (2 digit minute number)
> > %S (2 digit seconds number)
> > %s (seconds since epoch)
> > %Y (4 digit year number)
> > %y (2 digit year number)
> > %m (2 digit month number)
> > %d (2 digit day number)
> > %p (pid of the process)
> > and so on (where time parameters have the same meaning as for the date
> > unix command).
> I don't really see naming of files based on the current time important
> enough to warrant this. If the user wants it, he can format the filename
> himself using the date command (naturally a female user could do the same,
> but I can't be bothered to think up a PC synonym for every pronoun).
It was to retain backward compatibility (but I also don't regard this
feature so much important). In each case if someone regards it useful
I can try to code that feature.
In attachment there is the svn diff.
I changed the -vstats option name to -vstats_file, that seems clearer
and, being different from the previous option name, should also get
the change more apparent to the user that was used to the previous
I also changed the name of the function do_video_stats to do_vstats,
which seems to me more consistent with the rest of the code.
Is it OK to commit?
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4772 bytes
Desc: not available
More information about the ffmpeg-devel