Answer the question
In order to leave comments, you need to log in
Why is the time variable not processed in the batch file?
Good afternoon! The bottom line is this: you need to overlay the current system time on the video stream.
Does not work.
When I run it via cmd it works:
mpv.exe --geometry=0:0 --autofit=960x540 --ontop --no-border --lavfi-complex=[aid1]asplit[ao][a];[a]showvolume=o=v:w=1000:h=60:r=50:b=5:f=0.001[a1];[vid1]drawtext=fontfile='C\:\\Windows\\Fonts\\Arial.ttf':fontsize=90:fontcolor=white:text='%{localtime\:%X}'[vout1];[vout1]drawtext=fontfile='C\:\\Windows\\Fonts\\Arial.ttf':text='online-ru-hotbird-high':fontcolor=white:fontsize=72:box=1:boxcolor=black:x=720:y=10[vout1];[vout1]drawtext=fontfile='C\:\\Windows\\Fonts\\Arial.ttf':timecode='00\:00\:00\:00':rate=24/1.001:fontsize=72:fontcolor=white:boxcolor=0x000000AA:box=1:x=main_w/2-text_w/2:y=main_h-text_h-20:boxborderw=10[vout2];[vout2][a1]overlay=x=(main_w-overlay_w):y=(main_h-overlay_h)[vo] --alpha=no stream.mp4
'%{localtime\:%X}'
Answer the question
In order to leave comments, you need to log in
In batch files, the percent symbol must be escaped. Look carefully which command is actually executed from batch - percentages will be skipped there (both, or only one). Those that are skipped should be doubled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question