Motion detection frequently employs Optic Flow to get the velocity of solid targets in imaging sequences. This paper suggests calculate the gas diffusion velocity in infrared gas leaking videos by optic flow algorithms. Gas target is significantly different from solid objects, which has variable margin and gray values in diffusion. A series of tests with various scenes and leakage rate were performed to compare the effect of main stream methods, such as Farneback algorithm, PyrLK and BM algorithm. Farneback algorithm seems to have the best result in those tests. Besides, the robustness of methods used in uncooled infrared imaging may decline seriously for the low resolution, big noise and poor contrast ratio. This research adopted a special foreground detection method (FDM) and spectral filtering technique to address this issue. FDM firstly computes corresponding sample sets of each pixel, and uses the background based on the sets to make a correlation analysis with the current frame. Spectral filtering technique means get two or three images in different spectrum by band pass filters, and show a better result by mixing those images. In addition, for Optic Flow methods have ability to precisely detect directional motion and to ignore the nondirectional one, these methods could be employed to highlight the gas area and reduce the background noise. This paper offers a credible way for obtaining the diffusion velocity and resolves the robust troubles in practical application. In the meanwhile, it is an exploration of optic flow in varied shape target detection.