Based on the block compressed sensing theory (BCS), combined with the five-dimensional chaotic system, we propose and analysis a novel spectrogram visual security encryption algorithm. The research is devoted to solving the compression, encryption and steganography problems of spectrograms with large data volume and high complexity. Firstly, Discrete wavelet transform (DWT) is applied to process the spectrogram to generate the coefficient matrix. Then block compressed sensing is applied to compress and pre-encrypt the spectrogram. Secondly, the study designed a new five-dimensional chaotic system. Then several typical evaluation methods, such as phase diagram, Lyapunov exponent (LE), bifurcation diagram and sample entropy (SE) are applied to deeply analyze the chaotic behavior and dynamic performance of the system. Moreover, the corresponding Simulink model has been built, which proves the realizability of the chaotic system. Importantly, the measurement matrix required for compressed sensing is constructed by the chaotic sequence. Thirdly, performing dynamic Josephus scrambling and annular diffusion on the secret image to get the cipher image. Finally, an improved least significant bit embedding method (LSB) and Alpha channel synchronous embedding are designed to obtain the steganographic image with visual security properties. To make the initial keys of each image is completely different from other images, the required keys are produced using the SHA-256 algorithm. The experimental results confirm that the visual