FFmpeg/FFmpeg — pull request #18 by mjmvisser (2013-05-21 20:31:27+00:00)
Title: Patch to allow drawtext frame_num/n var to start at a number other than 0

In reference to https://ffmpeg.org/trac/ffmpeg/ticket/1949

The suggested workaround to use `expr\\\:n+1` doesn't solve the problem, as the frame number is drawn as a double (1.000000000) instead of as an integer.

I followed the example set by the image2 format and added a start_number parameter. For example, the following draws the frame number at the bottom right, starting at 30:

-vf drawtext="fontsize=15:fontfile=/path/to/font.ttf:text=%{n}:start_number=30:fontsize=25:fontcolor='white':x=w-text_w-line_h:\y=h-text_h-line_h"