A police officer has described the moment he captured Daniel Khalife on a canal towpath before the “jovial” former soldier offered his congratulations for catching him, a court has heard.