First principles calculations are performed to investigate the structural stability, elastic, lattice dynamical and thermal properties of osmium carbides with various crystal structures. Our calculation indicates that the I4Te type structure is energetically the most favourable for Os4C. Based on stress-strain relationships, elastic constants are obtained, and the relevant mechanical properties are also discussed. The phonon dispersion relation and the dynamical stability are also predicted. We have found that the predicted structures are mechanically stable as well as dynamically stable except for cubic-Os4C. Through the quasi-harmonic Debye model, the temperature and pressure effects on the bulk modulus, thermal expansion coefficient, heat capacity, Gruneisen parameter and Debye temperature are presented.