The CoreUtils project for Windows http://gnuwin32.sourceforge.net/packages/coreutils.htm has a date command that provides you with the same features as Linux.
Download the software and rename date.exe to gnudate.exe to avoid a conflict with the Dos date command. You need the libintl-2.dll and libiconv-2.dll to run the command.
For all available options, enter:
gnudate --help
For example, gnudate "+%a %e %b %Y %H:%M:%S" will give:
Sun 10 apr 2016 21:52:35
The gnudate +%s command will give seconds since Epoch:
1460325461
The following Dos batch file shows the use of gnudate. You will need to double the % value in the gnudate +%s parameter.
rem set the variable s to the epoch seconds. for /f "tokens=1 delims=" %%A in ('gnudate +%%s') do set s=%%A rem use `%s%` for the time offset parameter of the ffmpeg drawtext filter. ffmpeg -y -f lavfi -i testsrc=duration=15.3:size=cif:r=10 -vf "drawtext=fontfile=arial.ttf:text=%%{pts\\\:localtime\\\:%s%\\\:%%a %%d %%b %%Y %%H\\\\\\:%%M\\\\\\:%%S}:fontsize=10:x=w-text_w:y=h-lh:box=1" a.mp4 ffplay a.mp4
This batch file was tested with Windows 8 on a Linux virtual machine.
To run it, you need to install ffmpeg .
You can download Static build from https://ffmpeg.zeranoe.com/builds/ .
Arjen rodenhuis
source share