The effects of hydrogen dilution and substrate temperature on the properties of amorphous silicon nitrite (a-$SiN_x:H$) film have been studied. With increasing hydrogen dilution ratio, the refractive index, optical gap energy and hydrogen content decrease and the leakage current increases. On the other hand, increasing the substrate temperature causes hydrogen content and leakage current to increase, but the ratio of N-H to Si-H bond absorption measured by FTIR spectroscopy to increase. Based on the experimental results of a-$SiN_x:H$ film, the optimal conditions for a-Si:H TFT insulator are discussed.