Most existing wireless network coding mechanisms do not consider the impact of wireless link quality on video transmission, resulting in the degradation in video quality. To address the above issue, this paper proposes an Optimized Opportunistic Network Coding (O2NC) mechanism, in combination with opportunistic routing, for video transmission in wireless networks. The candidate relay set is computed according to the transmission path gain and the importance of video data. Meanwhile, the comprehensive utility of a coded packet is estimated by considering the parameters of coding ratio and the priority of video data. On this basis, the coded packet with the largest utility is chosen for transmission. Simulation results demonstrate that, compared with typical network coding protocols, O2NC achieves significant performance improvement in terms of decodable frame ratio and average Peak Signal to Noise Ratio (PSNR) of video clips.