Micael, this might be exactly what I have been looking for, I'll try it. And duhu to me for not spotting the "localtime" setting.... ;)
Byron Johnson On Tue, Nov 12, 2019 at 4:07 PM Micael Silva <micaelsi...@gmail.com> wrote: > On Tue, Nov 12, 2019 at 5:37 PM Byron J <byron...@gmail.com> wrote: > > > Hello, > > > > What are some methods of timestamping video? I found one method using the > > framerate but I would like to use the PC clock. > > > > Any help would be greatly appreciated. If anyone is interested, payment > for > > the solution could be a possibility. > > > > Here is the .bat file with the FFMPEG commands running the > postprocessing. > > > > > > setlocal > > @echo off > > set sourcefile=%~1 > > set destfile=%~2 > > shift > > shift > > REM Variables > > set sourcefile=%sourcefile% > > set destfile=%destfile% > > set tempfile=%sourcefile:~0,-3%_tmp.mp4 > > set logofile=C:\Users\Public\WinTV\fox49-logo-header-v2.png > > set hour=%sourcefile:~-7,2% > > set min=%sourcefile:~-5,2% > > set year=%date:~10,4% > > set month=%date:~4,2% > > set day=%date:~7,2% > > set dts=%year%_%month%_%day% > > echo WinTV8 Post processing log. > postprocess.log > > echo sourcefile = %sourcefile% >> postprocess.log > > echo destfile = %destfile% >> postprocess.log > > echo tempfile = %tempfile% >> postprocess.log > > echo logofile = %logofile% >> postprocess.log > > echo hour = %hour% >> postprocess.log > > echo min = %min% >> postprocess.log > > echo dts = %dts% >> postprocess.log > > REM Video Processing > > echo Starting timecode overlay... >> postprocess.log > > ffmpeg -y -i %sourcefile% -b:v 1M -vcodec libx264 -preset ultrafast -s > > 480X360 -vf drawtext="text='%dts%\ \ \ \ > > ':timecode='%hour%\:%min%\:00\:00': rate=25: > > fontfile=C\\:\\Windows\\Fonts\\Ariel.ttf: x=400: y=h-lh-1: > > > > > fontcolor=white:shadowcolor=black:shadowx=1:shadowy=1:fontsize=72:box=1:boxcolor=black@0.5 > > :boxborderw=5:" > > %tempfile% > > echo End timecode overlay. >> postprocess.log > > echo Starting image overlay... >> postprocess.log > > ffmpeg -y -i %tempfile% -i %logofile% -filter_complex > > "[1:v]format=argb,geq=r='r(X,Y)':a='0.5*alpha(X,Y)'[image]; > > [0:v][image]overlay=(main_w-overlay_w-0):(main_h-overlay_h-2)" %destfile% > > echo End image overlay. >> postprocess.log > > REM Validate file exsists and cleanup > > if exist "%destfile%" ( > > del %tempfile% >> postprocess.log > > del %sourcefile% >> postprocess.log > > ) else ( > > echo Error processing file %sourcefile%. >> postprocessing.log > > ) > > echo End post processing. >> postprocess.log > > endlocal > > > > > It you want to use the current time of the encoding you can use > '%{localtime\:%X}' on text option in the drawtext filter > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".