Wireless sensor networks (WSNs) and video streaming services have gained popularity in recent years. The MPEG-4 H.264/AVC protocol has been widely adopted for video streaming in WSNs, but it is important to transmit sensitive video packets securely to protect the confidentiality of mission-critical applications. It is crucial to ensure that security measures do not negatively impact network performance or video quality. While previous research has focused on secure and energy-efficient video streaming over WSNs, none have addressed the integration of video quality optimization and energy consumption.This study aims to create a more efficient method of encrypting video streaming in wireless sensor networks (WSNs) by combining selective Elliptic Curve Cryptography (ECC) with Evolution of Cub to Predator (ECP). The proposed method improves energy, distortion, and encryption performance by up to 10 dB more than other methods (EEP, UEP (GA), and MCS-RA) through the use of network resource allocation with ECP-RA in WSNs. Quantitative measures such as MSE, PSNR, RMSE, and SSIM demonstrate that this approach is superior to others.