BUG: %q on_movie_end always returns "00"
Unlike on_picture_save, %q always returns "00" when used on_movie_end
- I would really love if %q would equal the last frame number which would essentially give the number of frames in the movie when used on_movie_end.
Paste in your error messages, config settings, terminal window output etc in this text field.
Environment
Motion version: |
3.2.10 |
ffmpeg version: |
|
Shared libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
|
--
BobSaggeth - 06 Apr 2008
Follow up
%q gets the "shot" number, a counter of frames within same second. First shot in a second is 0, next 1 etc. It is restarted at 0 in the beginning of next second.
If you records a movie, the movie ends after "gap" time, n seconds after last frame with movement. This check dosn't use the shot number, so the move ends always in the first frame in a sec. This results in %q always returns 0 in on_movie_end.
--
DagErlandsson - 06 Apr 2008
I saw in the IRC channel that you wanted to use this to calculate the movie length.
One way to calculate the movie length is to use the
text_event option, this is a string that is created in the beginning of an event. If you specify any time conversion specifier you have the time when an event started. You can use this text in the on_movie_end using the %C modifier. Then you have time when the event started and ended and can calulate the duration in a script. I recomend use %s, numer of ceconds since Epoch as it easy to just substract the two times to get number of seconds.
--
DagErlandsson - 06 Apr 2008
Thanks Dag, that is most helpful
-- much better than the mplayer -identify -frames 0 -vo null I was using before!
--
BobSaggeth - 06 Apr 2008
Fix record