move metadata overlay drawing into visualize.cc