import subprocess,sys,pathlib
# Input is the Browser panel recording at 1280x800. Permanent crop excludes
# environment selectors, custom executable path, sidebar and provider catalog.
source,dest=sys.argv[1:3]
filters="scale=1280:800,crop=596:216:610:226,pad=596:256:0:40:color=0x141414,drawtext=text='Linux web | dark | synthetic ACP | real time':x=12:y=12:fontsize=16:fontcolor=white"
subprocess.run(['ffmpeg','-y','-i',source,'-vf',filters,'-fps_mode','vfr','-enc_time_base','1:1000','-c:v','libx264','-preset','fast','-crf','20','-an',dest],check=True)
