A method for encryption of a video stream, comprising: acquiring the video stream, the video stream comprising an I frame; encrypting bytes at a preset position of a data part of the I frame by using a first encryption algorithm to obtain first encrypted data; and encrypting an encryption key of the first encrypted data by using a second encryption algorithm to obtain second encrypted data, and then storing the second encrypted data in a frame header of the I frame, such that an encrypted I frame is obtained, characterized in that, wherein the video stream further comprises a P frame located after the I frame, and after encrypting the encryption key of the first encrypted data by using the second encryption algorithm to obtain the second encrypted data, and storing the second encrypted data in the frame header of the I frame, the method further comprises: performing a hash operation on the encrypted I frame to obtain a first hash value; and storing the first hash value in a frame header of the P frame, wherein the performing the hash operation on the encrypted I frame to obtain the first hash value comprises: performing the hash operation on the frame header and the data part of the I frame to obtain the first hash value, performing the hash operation on the data part of the I frame to obtain the first hash value, or performing the hash operation on the bytes at the preset position of the data part of the I frame to obtain the first hash value. acquiring the video stream, the video stream comprising an I frame; encrypting bytes at a preset position of a data part of the I frame by using a first encryption algorithm to obtain first encrypted data; and encrypting an encryption key of the first encrypted data by using a second encryption algorithm to obtain second encrypted data, and then storing the second encrypted data in a frame header of the I frame, such that an encrypted I frame is obtained, characterized in that, wherein the video stream further comprises a P frame located after the I frame, and after encrypting the encryption key of the first encrypted data by using the second encryption algorithm to obtain the second encrypted data, and storing the second encrypted data in the frame header of the I frame, the method further comprises: performing a hash operation on the encrypted I frame to obtain a first hash value; and storing the first hash value in a frame header of the P frame, wherein the performing the hash operation on the encrypted I frame to obtain the first hash value comprises: performing the hash operation on the frame header and the data part of the I frame to obtain the first hash value, performing the hash operation on the data part of the I frame to obtain the first hash value, or performing the hash operation on the bytes at the preset position of the data part of the I frame to obtain the first hash value. performing a hash operation on the encrypted I frame to obtain a first hash value; and storing the first hash value in a frame header of the P frame, wherein the performing the hash operation on the encrypted I frame to obtain the first hash value comprises: performing the hash operation on the frame header and the data part of the I frame to obtain the first hash value, performing the hash operation on the data part of the I frame to obtain the first hash value, or performing the hash operation on the bytes at the preset position of the data part of the I frame to obtain the first hash value.