The present application provides a method and device for video classification, the method comprising: receiving a video from a video source; obtaining M video frames P from the video; 1 , P 2 ,…,P M and M adjacent frames Q 1 , Q 2 , …, Q M , where the adjacent frame Q 1 is the video frame P 1 The adjacent video frames, the adjacent frames Q 2 is the video frame P 2 adjacent video frames, ..., the adjacent frames Q M is the video frame P M Adjacent video frames; Determine the distance D of M videos 1 , D 2 , …, D M , where the video distance D 1 is the video frame P 1 and adjacent frame Q 1 The
Hamming distance between them, video distance D 2 is the video frame P 2 and adjacent frame Q 2 The
Hamming distance between, ..., video distance D M is the video frame P M and adjacent frame Q M The
Hamming distance between the M videos is D 1 , D 2 , …, D M are compared with the threshold values to obtain the comparison result {H 1 , H 2 , ..., H M}; According to the comparison result {H 1 , H 2 , ..., H M}Determine the
classification result to which the video belongs; compress the video according to the
classification result and send it to the
content distribution system.